vidspotai-shared 1.0.82 → 1.0.83

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 (442) hide show
  1. package/lib/globals/aiModels/enums.d.ts +11 -1
  2. package/lib/globals/aiModels/enums.d.ts.map +1 -1
  3. package/lib/globals/aiModels/enums.js +24 -1
  4. package/lib/globals/aiModels/index.d.ts.map +1 -1
  5. package/lib/globals/aiModels/index.js +2 -0
  6. package/lib/globals/aiModels/providers/anthropic.d.ts +12 -0
  7. package/lib/globals/aiModels/providers/anthropic.d.ts.map +1 -0
  8. package/lib/globals/aiModels/providers/anthropic.js +88 -0
  9. package/lib/globals/aiModels/providers/google.d.ts.map +1 -1
  10. package/lib/globals/aiModels/providers/google.js +82 -0
  11. package/lib/globals/aiModels/providers/openai.d.ts.map +1 -1
  12. package/lib/globals/aiModels/providers/openai.js +63 -4
  13. package/lib/globals/aiModels/tierHelpers.d.ts +12 -0
  14. package/lib/globals/aiModels/tierHelpers.d.ts.map +1 -1
  15. package/lib/globals/aiModels/tierHelpers.js +83 -0
  16. package/lib/globals/aiModels/types.d.ts +19 -0
  17. package/lib/globals/aiModels/types.d.ts.map +1 -1
  18. package/lib/globals/types.d.ts +120 -1
  19. package/lib/globals/types.d.ts.map +1 -1
  20. package/lib/globals/types.js +135 -1
  21. package/lib/models/agent.model.d.ts +41 -1
  22. package/lib/models/agent.model.d.ts.map +1 -1
  23. package/lib/models/index.d.ts +1 -0
  24. package/lib/models/index.d.ts.map +1 -1
  25. package/lib/models/index.js +1 -0
  26. package/lib/models/social.model.d.ts +180 -0
  27. package/lib/models/social.model.d.ts.map +1 -0
  28. package/lib/models/social.model.js +2 -0
  29. package/lib/models/user.model.d.ts +10 -0
  30. package/lib/models/user.model.d.ts.map +1 -1
  31. package/lib/models/video.model.d.ts +6 -0
  32. package/lib/models/video.model.d.ts.map +1 -1
  33. package/lib/schemas/brief.schema.d.ts +46 -0
  34. package/lib/schemas/brief.schema.d.ts.map +1 -1
  35. package/lib/schemas/brief.schema.js +72 -1
  36. package/lib/schemas/index.d.ts +1 -0
  37. package/lib/schemas/index.d.ts.map +1 -1
  38. package/lib/schemas/index.js +1 -0
  39. package/lib/schemas/project.schema.d.ts +67 -0
  40. package/lib/schemas/project.schema.d.ts.map +1 -1
  41. package/lib/schemas/project.schema.js +12 -0
  42. package/lib/schemas/social.schema.d.ts +91 -0
  43. package/lib/schemas/social.schema.d.ts.map +1 -0
  44. package/lib/schemas/social.schema.js +114 -0
  45. package/lib/schemas/videoPlan.schema.d.ts +114 -0
  46. package/lib/schemas/videoPlan.schema.d.ts.map +1 -1
  47. package/lib/schemas/videoPlan.schema.js +141 -1
  48. package/lib/services/agent/chatAgent.d.ts +25 -1
  49. package/lib/services/agent/chatAgent.d.ts.map +1 -1
  50. package/lib/services/agent/chatAgent.js +145 -9
  51. package/lib/services/agent/costPreflight.d.ts +11 -1
  52. package/lib/services/agent/costPreflight.d.ts.map +1 -1
  53. package/lib/services/agent/costPreflight.js +18 -1
  54. package/lib/services/agent/covers/coverPlanner.d.ts +41 -0
  55. package/lib/services/agent/covers/coverPlanner.d.ts.map +1 -0
  56. package/lib/services/agent/covers/coverPlanner.js +278 -0
  57. package/lib/services/agent/covers/covers.schema.d.ts +158 -0
  58. package/lib/services/agent/covers/covers.schema.d.ts.map +1 -0
  59. package/lib/services/agent/covers/covers.schema.js +166 -0
  60. package/lib/services/agent/covers/index.d.ts +3 -0
  61. package/lib/services/agent/covers/index.d.ts.map +1 -0
  62. package/lib/services/agent/covers/index.js +18 -0
  63. package/lib/services/agent/critic.d.ts +10 -0
  64. package/lib/services/agent/critic.d.ts.map +1 -1
  65. package/lib/services/agent/critic.js +37 -1
  66. package/lib/services/agent/editClassifier.d.ts +2 -2
  67. package/lib/services/agent/editClassifier.js +2 -2
  68. package/lib/services/agent/editExisting/editAssembler.d.ts +78 -0
  69. package/lib/services/agent/editExisting/editAssembler.d.ts.map +1 -0
  70. package/lib/services/agent/editExisting/editAssembler.js +172 -0
  71. package/lib/services/agent/editExisting/editExisting.schema.d.ts +119 -0
  72. package/lib/services/agent/editExisting/editExisting.schema.d.ts.map +1 -0
  73. package/lib/services/agent/editExisting/editExisting.schema.js +157 -0
  74. package/lib/services/agent/editExisting/highlightPicker.d.ts +48 -0
  75. package/lib/services/agent/editExisting/highlightPicker.d.ts.map +1 -0
  76. package/lib/services/agent/editExisting/highlightPicker.js +199 -0
  77. package/lib/services/agent/editExisting/index.d.ts +4 -0
  78. package/lib/services/agent/editExisting/index.d.ts.map +1 -0
  79. package/lib/services/agent/editExisting/index.js +19 -0
  80. package/lib/services/agent/eval/seedBriefs.d.ts +4 -3
  81. package/lib/services/agent/eval/seedBriefs.d.ts.map +1 -1
  82. package/lib/services/agent/eval/seedBriefs.js +283 -3
  83. package/lib/services/agent/eval/types.d.ts +10 -0
  84. package/lib/services/agent/eval/types.d.ts.map +1 -1
  85. package/lib/services/agent/executor/core.d.ts +70 -0
  86. package/lib/services/agent/executor/core.d.ts.map +1 -0
  87. package/lib/services/agent/executor/core.js +250 -0
  88. package/lib/services/agent/executor/duration.d.ts +20 -0
  89. package/lib/services/agent/executor/duration.d.ts.map +1 -0
  90. package/lib/services/agent/executor/duration.js +46 -0
  91. package/lib/services/agent/executor/index.d.ts +15 -0
  92. package/lib/services/agent/executor/index.d.ts.map +1 -0
  93. package/lib/services/agent/executor/index.js +32 -0
  94. package/lib/services/agent/executor/types.d.ts +183 -0
  95. package/lib/services/agent/executor/types.d.ts.map +1 -0
  96. package/lib/services/agent/executor/types.js +29 -0
  97. package/lib/services/agent/executor/visual.d.ts +32 -0
  98. package/lib/services/agent/executor/visual.d.ts.map +1 -0
  99. package/lib/services/agent/executor/visual.js +400 -0
  100. package/lib/services/agent/executor/voice.d.ts +17 -0
  101. package/lib/services/agent/executor/voice.d.ts.map +1 -0
  102. package/lib/services/agent/executor/voice.js +119 -0
  103. package/lib/services/agent/extendChain.d.ts +101 -0
  104. package/lib/services/agent/extendChain.d.ts.map +1 -0
  105. package/lib/services/agent/extendChain.js +177 -0
  106. package/lib/services/agent/index.d.ts +11 -1
  107. package/lib/services/agent/index.d.ts.map +1 -1
  108. package/lib/services/agent/index.js +11 -1
  109. package/lib/services/agent/llmCaller.d.ts +7 -8
  110. package/lib/services/agent/llmCaller.d.ts.map +1 -1
  111. package/lib/services/agent/llmCallerAnthropic.d.ts +44 -31
  112. package/lib/services/agent/llmCallerAnthropic.d.ts.map +1 -1
  113. package/lib/services/agent/llmCallerAnthropic.js +135 -60
  114. package/lib/services/agent/llmCallerFactory.d.ts +34 -0
  115. package/lib/services/agent/llmCallerFactory.d.ts.map +1 -0
  116. package/lib/services/agent/llmCallerFactory.js +31 -0
  117. package/lib/services/agent/llmCallerGemini.d.ts +62 -0
  118. package/lib/services/agent/llmCallerGemini.d.ts.map +1 -0
  119. package/lib/services/agent/llmCallerGemini.js +235 -0
  120. package/lib/services/agent/llmCallerOpenai.d.ts +56 -0
  121. package/lib/services/agent/llmCallerOpenai.d.ts.map +1 -0
  122. package/lib/services/agent/llmCallerOpenai.js +230 -0
  123. package/lib/services/agent/llmCallerRegistry.d.ts.map +1 -1
  124. package/lib/services/agent/llmCallerRegistry.js +7 -7
  125. package/lib/services/agent/llmCallerRouting.d.ts +63 -0
  126. package/lib/services/agent/llmCallerRouting.d.ts.map +1 -0
  127. package/lib/services/agent/llmCallerRouting.js +124 -0
  128. package/lib/services/agent/llmModelRegistry.d.ts +59 -0
  129. package/lib/services/agent/llmModelRegistry.d.ts.map +1 -0
  130. package/lib/services/agent/llmModelRegistry.js +168 -0
  131. package/lib/services/agent/llmRetry.d.ts +57 -0
  132. package/lib/services/agent/llmRetry.d.ts.map +1 -0
  133. package/lib/services/agent/llmRetry.js +102 -0
  134. package/lib/services/agent/modelRouter.d.ts +3 -3
  135. package/lib/services/agent/modelRouter.d.ts.map +1 -1
  136. package/lib/services/agent/modelRouter.js +27 -13
  137. package/lib/services/agent/planMutations.d.ts +54 -1
  138. package/lib/services/agent/planMutations.d.ts.map +1 -1
  139. package/lib/services/agent/planMutations.js +78 -0
  140. package/lib/services/agent/planner/Planner.d.ts +0 -17
  141. package/lib/services/agent/planner/Planner.d.ts.map +1 -1
  142. package/lib/services/agent/planner/Planner.js +67 -303
  143. package/lib/services/agent/planner/overlayRegen.d.ts +38 -0
  144. package/lib/services/agent/planner/overlayRegen.d.ts.map +1 -0
  145. package/lib/services/agent/planner/overlayRegen.js +145 -0
  146. package/lib/services/agent/planner/plannerMessages.d.ts +34 -0
  147. package/lib/services/agent/planner/plannerMessages.d.ts.map +1 -0
  148. package/lib/services/agent/planner/plannerMessages.js +185 -0
  149. package/lib/services/agent/planner/promptSections.d.ts +12 -0
  150. package/lib/services/agent/planner/promptSections.d.ts.map +1 -1
  151. package/lib/services/agent/planner/promptSections.js +57 -0
  152. package/lib/services/agent/planner/scriptFirstPlanner.d.ts +35 -0
  153. package/lib/services/agent/planner/scriptFirstPlanner.d.ts.map +1 -0
  154. package/lib/services/agent/planner/scriptFirstPlanner.js +140 -0
  155. package/lib/services/agent/planner/structuralRules.d.ts +10 -0
  156. package/lib/services/agent/planner/structuralRules.d.ts.map +1 -1
  157. package/lib/services/agent/planner/structuralRules.js +92 -9
  158. package/lib/services/agent/planner/validators.d.ts +18 -0
  159. package/lib/services/agent/planner/validators.d.ts.map +1 -1
  160. package/lib/services/agent/planner/validators.js +97 -0
  161. package/lib/services/agent/planner.d.ts +2 -1
  162. package/lib/services/agent/planner.d.ts.map +1 -1
  163. package/lib/services/agent/planner.js +5 -1
  164. package/lib/services/agent/priorProject.d.ts +26 -0
  165. package/lib/services/agent/priorProject.d.ts.map +1 -0
  166. package/lib/services/agent/priorProject.js +51 -0
  167. package/lib/services/agent/providerFallback/chains.d.ts.map +1 -1
  168. package/lib/services/agent/providerFallback/chains.js +27 -15
  169. package/lib/services/agent/repurpose/index.d.ts +3 -0
  170. package/lib/services/agent/repurpose/index.d.ts.map +1 -0
  171. package/lib/services/agent/repurpose/index.js +18 -0
  172. package/lib/services/agent/repurpose/repurpose.schema.d.ts +132 -0
  173. package/lib/services/agent/repurpose/repurpose.schema.d.ts.map +1 -0
  174. package/lib/services/agent/repurpose/repurpose.schema.js +144 -0
  175. package/lib/services/agent/repurpose/shortsPicker.d.ts +25 -0
  176. package/lib/services/agent/repurpose/shortsPicker.d.ts.map +1 -0
  177. package/lib/services/agent/repurpose/shortsPicker.js +218 -0
  178. package/lib/services/agent/runHelpers.d.ts +21 -2
  179. package/lib/services/agent/runHelpers.d.ts.map +1 -1
  180. package/lib/services/agent/runHelpers.js +71 -2
  181. package/lib/services/agent/tools/animateImage.tool.d.ts +1 -0
  182. package/lib/services/agent/tools/animateImage.tool.d.ts.map +1 -1
  183. package/lib/services/agent/tools/animateImage.tool.js +12 -0
  184. package/lib/services/agent/tools/chapterOutline.tool.d.ts +42 -0
  185. package/lib/services/agent/tools/chapterOutline.tool.d.ts.map +1 -0
  186. package/lib/services/agent/tools/chapterOutline.tool.js +115 -0
  187. package/lib/services/agent/tools/composeScene.tool.d.ts +63 -0
  188. package/lib/services/agent/tools/composeScene.tool.d.ts.map +1 -1
  189. package/lib/services/agent/tools/estimateCost.tool.d.ts +27 -0
  190. package/lib/services/agent/tools/estimateCost.tool.d.ts.map +1 -1
  191. package/lib/services/agent/tools/estimateCost.tool.js +55 -7
  192. package/lib/services/agent/tools/extendVideo.tool.d.ts +26 -0
  193. package/lib/services/agent/tools/extendVideo.tool.d.ts.map +1 -0
  194. package/lib/services/agent/tools/extendVideo.tool.js +149 -0
  195. package/lib/services/agent/tools/generateScript.tool.d.ts +184 -0
  196. package/lib/services/agent/tools/generateScript.tool.d.ts.map +1 -0
  197. package/lib/services/agent/tools/generateScript.tool.js +123 -0
  198. package/lib/services/agent/tools/generateVideo.tool.d.ts +1 -0
  199. package/lib/services/agent/tools/generateVideo.tool.d.ts.map +1 -1
  200. package/lib/services/agent/tools/generateVideo.tool.js +20 -1
  201. package/lib/services/agent/tools/index.d.ts +4 -0
  202. package/lib/services/agent/tools/index.d.ts.map +1 -1
  203. package/lib/services/agent/tools/index.js +4 -0
  204. package/lib/services/agent/tools/matchBrollToScript.tool.d.ts +50 -0
  205. package/lib/services/agent/tools/matchBrollToScript.tool.d.ts.map +1 -0
  206. package/lib/services/agent/tools/matchBrollToScript.tool.js +139 -0
  207. package/lib/services/agent/tools/planVideo.tool.d.ts +56 -0
  208. package/lib/services/agent/tools/planVideo.tool.d.ts.map +1 -1
  209. package/lib/services/agent/tools/planVideo.tool.js +3 -3
  210. package/lib/services/agent/tools/render.tool.d.ts +21 -0
  211. package/lib/services/agent/tools/render.tool.d.ts.map +1 -1
  212. package/lib/services/aiGen/aiGenFactory.service.d.ts.map +1 -1
  213. package/lib/services/aiGen/aiGenFactory.service.js +18 -3
  214. package/lib/services/aiGen/providers/anthropic/anthropic.service.d.ts +26 -0
  215. package/lib/services/aiGen/providers/anthropic/anthropic.service.d.ts.map +1 -0
  216. package/lib/services/aiGen/providers/anthropic/anthropic.service.js +95 -0
  217. package/lib/services/aiGen/providers/google/google.service.d.ts +24 -1
  218. package/lib/services/aiGen/providers/google/google.service.d.ts.map +1 -1
  219. package/lib/services/aiGen/providers/google/google.service.js +87 -243
  220. package/lib/services/aiGen/providers/google/googleErrors.d.ts +13 -0
  221. package/lib/services/aiGen/providers/google/googleErrors.d.ts.map +1 -0
  222. package/lib/services/aiGen/providers/google/googleErrors.js +102 -0
  223. package/lib/services/aiGen/providers/google/googleFetch.d.ts +8 -0
  224. package/lib/services/aiGen/providers/google/googleFetch.d.ts.map +1 -0
  225. package/lib/services/aiGen/providers/google/googleFetch.js +96 -0
  226. package/lib/services/aiGen/providers/google/googleMusic.d.ts +15 -0
  227. package/lib/services/aiGen/providers/google/googleMusic.d.ts.map +1 -0
  228. package/lib/services/aiGen/providers/google/googleMusic.js +77 -0
  229. package/lib/services/aiGen/providers/kling/kling.service.d.ts +7 -3
  230. package/lib/services/aiGen/providers/kling/kling.service.d.ts.map +1 -1
  231. package/lib/services/aiGen/providers/kling/kling.service.js +23 -367
  232. package/lib/services/aiGen/providers/kling/klingCredits.d.ts +9 -0
  233. package/lib/services/aiGen/providers/kling/klingCredits.d.ts.map +1 -0
  234. package/lib/services/aiGen/providers/kling/klingCredits.js +63 -0
  235. package/lib/services/aiGen/providers/kling/klingRequests.d.ts +32 -0
  236. package/lib/services/aiGen/providers/kling/klingRequests.d.ts.map +1 -0
  237. package/lib/services/aiGen/providers/kling/klingRequests.js +194 -0
  238. package/lib/services/aiGen/providers/kling/klingStatus.d.ts +16 -0
  239. package/lib/services/aiGen/providers/kling/klingStatus.d.ts.map +1 -0
  240. package/lib/services/aiGen/providers/kling/klingStatus.js +173 -0
  241. package/lib/services/bullmq.service.d.ts +61 -0
  242. package/lib/services/bullmq.service.d.ts.map +1 -1
  243. package/lib/services/bullmq.service.js +101 -1
  244. package/lib/services/crypto/index.d.ts +2 -0
  245. package/lib/services/crypto/index.d.ts.map +1 -0
  246. package/lib/services/crypto/index.js +17 -0
  247. package/lib/services/crypto/tokenVault.d.ts +47 -0
  248. package/lib/services/crypto/tokenVault.d.ts.map +1 -0
  249. package/lib/services/crypto/tokenVault.js +179 -0
  250. package/lib/services/editor/captionStyleHint.d.ts +3 -0
  251. package/lib/services/editor/captionStyleHint.d.ts.map +1 -0
  252. package/lib/services/editor/captionStyleHint.js +112 -0
  253. package/lib/services/editor/planToProject.d.ts +7 -66
  254. package/lib/services/editor/planToProject.d.ts.map +1 -1
  255. package/lib/services/editor/planToProject.helpers.d.ts +40 -0
  256. package/lib/services/editor/planToProject.helpers.d.ts.map +1 -0
  257. package/lib/services/editor/planToProject.helpers.js +177 -0
  258. package/lib/services/editor/planToProject.js +197 -180
  259. package/lib/services/editor/planToProject.types.d.ts +94 -0
  260. package/lib/services/editor/planToProject.types.d.ts.map +1 -0
  261. package/lib/services/editor/planToProject.types.js +2 -0
  262. package/lib/services/firestore.service.d.ts +5 -0
  263. package/lib/services/firestore.service.d.ts.map +1 -1
  264. package/lib/services/firestore.service.js +13 -0
  265. package/lib/services/index.d.ts +12 -0
  266. package/lib/services/index.d.ts.map +1 -1
  267. package/lib/services/index.js +12 -0
  268. package/lib/services/promptEnhancer/index.d.ts +18 -0
  269. package/lib/services/promptEnhancer/index.d.ts.map +1 -0
  270. package/lib/services/promptEnhancer/index.js +33 -0
  271. package/lib/services/promptEnhancer/models.d.ts +54 -0
  272. package/lib/services/promptEnhancer/models.d.ts.map +1 -0
  273. package/lib/services/promptEnhancer/models.js +37 -0
  274. package/lib/services/promptEnhancer/profiles/agent.profile.d.ts +14 -0
  275. package/lib/services/promptEnhancer/profiles/agent.profile.d.ts.map +1 -0
  276. package/lib/services/promptEnhancer/profiles/agent.profile.js +40 -0
  277. package/lib/services/promptEnhancer/profiles/avatar.profile.d.ts +13 -0
  278. package/lib/services/promptEnhancer/profiles/avatar.profile.d.ts.map +1 -0
  279. package/lib/services/promptEnhancer/profiles/avatar.profile.js +40 -0
  280. package/lib/services/promptEnhancer/profiles/base.d.ts +28 -0
  281. package/lib/services/promptEnhancer/profiles/base.d.ts.map +1 -0
  282. package/lib/services/promptEnhancer/profiles/base.js +35 -0
  283. package/lib/services/promptEnhancer/profiles/image.profile.d.ts +11 -0
  284. package/lib/services/promptEnhancer/profiles/image.profile.d.ts.map +1 -0
  285. package/lib/services/promptEnhancer/profiles/image.profile.js +42 -0
  286. package/lib/services/promptEnhancer/profiles/index.d.ts +12 -0
  287. package/lib/services/promptEnhancer/profiles/index.d.ts.map +1 -0
  288. package/lib/services/promptEnhancer/profiles/index.js +33 -0
  289. package/lib/services/promptEnhancer/profiles/video.profile.d.ts +15 -0
  290. package/lib/services/promptEnhancer/profiles/video.profile.d.ts.map +1 -0
  291. package/lib/services/promptEnhancer/profiles/video.profile.js +81 -0
  292. package/lib/services/promptEnhancer/promptEnhancer.service.d.ts +45 -0
  293. package/lib/services/promptEnhancer/promptEnhancer.service.d.ts.map +1 -0
  294. package/lib/services/promptEnhancer/promptEnhancer.service.js +157 -0
  295. package/lib/services/promptEnhancer/schema.d.ts +19 -0
  296. package/lib/services/promptEnhancer/schema.d.ts.map +1 -0
  297. package/lib/services/promptEnhancer/schema.js +43 -0
  298. package/lib/services/promptEnhancer/types.d.ts +112 -0
  299. package/lib/services/promptEnhancer/types.d.ts.map +1 -0
  300. package/lib/services/promptEnhancer/types.js +2 -0
  301. package/lib/services/socialAI/captionGen.d.ts +81 -0
  302. package/lib/services/socialAI/captionGen.d.ts.map +1 -0
  303. package/lib/services/socialAI/captionGen.js +206 -0
  304. package/lib/services/socialAI/hookScore.d.ts +85 -0
  305. package/lib/services/socialAI/hookScore.d.ts.map +1 -0
  306. package/lib/services/socialAI/hookScore.js +170 -0
  307. package/lib/services/socialAI/index.d.ts +3 -0
  308. package/lib/services/socialAI/index.d.ts.map +1 -0
  309. package/lib/services/socialAI/index.js +18 -0
  310. package/lib/services/socialAccounts/index.d.ts +2 -0
  311. package/lib/services/socialAccounts/index.d.ts.map +1 -0
  312. package/lib/services/socialAccounts/index.js +17 -0
  313. package/lib/services/socialAccounts/socialAccountService.d.ts +25 -0
  314. package/lib/services/socialAccounts/socialAccountService.d.ts.map +1 -0
  315. package/lib/services/socialAccounts/socialAccountService.js +105 -0
  316. package/lib/services/socialEngage/factory.d.ts +7 -0
  317. package/lib/services/socialEngage/factory.d.ts.map +1 -0
  318. package/lib/services/socialEngage/factory.js +25 -0
  319. package/lib/services/socialEngage/index.d.ts +6 -0
  320. package/lib/services/socialEngage/index.d.ts.map +1 -0
  321. package/lib/services/socialEngage/index.js +21 -0
  322. package/lib/services/socialEngage/meta.engage.d.ts +17 -0
  323. package/lib/services/socialEngage/meta.engage.d.ts.map +1 -0
  324. package/lib/services/socialEngage/meta.engage.js +128 -0
  325. package/lib/services/socialEngage/metaWebhook.d.ts +50 -0
  326. package/lib/services/socialEngage/metaWebhook.d.ts.map +1 -0
  327. package/lib/services/socialEngage/metaWebhook.js +93 -0
  328. package/lib/services/socialEngage/types.d.ts +72 -0
  329. package/lib/services/socialEngage/types.d.ts.map +1 -0
  330. package/lib/services/socialEngage/types.js +10 -0
  331. package/lib/services/socialEngage/youtube.engage.d.ts +9 -0
  332. package/lib/services/socialEngage/youtube.engage.d.ts.map +1 -0
  333. package/lib/services/socialEngage/youtube.engage.js +87 -0
  334. package/lib/services/socialFormat/aspectGeometry.d.ts +74 -0
  335. package/lib/services/socialFormat/aspectGeometry.d.ts.map +1 -0
  336. package/lib/services/socialFormat/aspectGeometry.js +135 -0
  337. package/lib/services/socialFormat/index.d.ts +2 -0
  338. package/lib/services/socialFormat/index.d.ts.map +1 -0
  339. package/lib/services/socialFormat/index.js +19 -0
  340. package/lib/services/socialInsights/index.d.ts +3 -0
  341. package/lib/services/socialInsights/index.d.ts.map +1 -0
  342. package/lib/services/socialInsights/index.js +18 -0
  343. package/lib/services/socialInsights/recommendations.d.ts +131 -0
  344. package/lib/services/socialInsights/recommendations.d.ts.map +1 -0
  345. package/lib/services/socialInsights/recommendations.js +277 -0
  346. package/lib/services/socialInsights/timeBuckets.d.ts +35 -0
  347. package/lib/services/socialInsights/timeBuckets.d.ts.map +1 -0
  348. package/lib/services/socialInsights/timeBuckets.js +78 -0
  349. package/lib/services/socialMetrics/factory.d.ts +5 -0
  350. package/lib/services/socialMetrics/factory.d.ts.map +1 -0
  351. package/lib/services/socialMetrics/factory.js +24 -0
  352. package/lib/services/socialMetrics/index.d.ts +6 -0
  353. package/lib/services/socialMetrics/index.d.ts.map +1 -0
  354. package/lib/services/socialMetrics/index.js +21 -0
  355. package/lib/services/socialMetrics/meta.metrics.d.ts +22 -0
  356. package/lib/services/socialMetrics/meta.metrics.d.ts.map +1 -0
  357. package/lib/services/socialMetrics/meta.metrics.js +137 -0
  358. package/lib/services/socialMetrics/tiktok.metrics.d.ts +8 -0
  359. package/lib/services/socialMetrics/tiktok.metrics.d.ts.map +1 -0
  360. package/lib/services/socialMetrics/tiktok.metrics.js +43 -0
  361. package/lib/services/socialMetrics/types.d.ts +54 -0
  362. package/lib/services/socialMetrics/types.d.ts.map +1 -0
  363. package/lib/services/socialMetrics/types.js +2 -0
  364. package/lib/services/socialMetrics/youtube.metrics.d.ts +8 -0
  365. package/lib/services/socialMetrics/youtube.metrics.d.ts.map +1 -0
  366. package/lib/services/socialMetrics/youtube.metrics.js +43 -0
  367. package/lib/services/socialOAuth/factory.d.ts +7 -0
  368. package/lib/services/socialOAuth/factory.d.ts.map +1 -0
  369. package/lib/services/socialOAuth/factory.js +42 -0
  370. package/lib/services/socialOAuth/index.d.ts +11 -0
  371. package/lib/services/socialOAuth/index.d.ts.map +1 -0
  372. package/lib/services/socialOAuth/index.js +26 -0
  373. package/lib/services/socialOAuth/linkedin.oauth.d.ts +14 -0
  374. package/lib/services/socialOAuth/linkedin.oauth.d.ts.map +1 -0
  375. package/lib/services/socialOAuth/linkedin.oauth.js +127 -0
  376. package/lib/services/socialOAuth/meta.oauth.d.ts +31 -0
  377. package/lib/services/socialOAuth/meta.oauth.d.ts.map +1 -0
  378. package/lib/services/socialOAuth/meta.oauth.js +214 -0
  379. package/lib/services/socialOAuth/oauthState.d.ts +14 -0
  380. package/lib/services/socialOAuth/oauthState.d.ts.map +1 -0
  381. package/lib/services/socialOAuth/oauthState.js +66 -0
  382. package/lib/services/socialOAuth/pinterest.oauth.d.ts +15 -0
  383. package/lib/services/socialOAuth/pinterest.oauth.d.ts.map +1 -0
  384. package/lib/services/socialOAuth/pinterest.oauth.js +126 -0
  385. package/lib/services/socialOAuth/threads.oauth.d.ts +14 -0
  386. package/lib/services/socialOAuth/threads.oauth.d.ts.map +1 -0
  387. package/lib/services/socialOAuth/threads.oauth.js +129 -0
  388. package/lib/services/socialOAuth/tiktok.oauth.d.ts +15 -0
  389. package/lib/services/socialOAuth/tiktok.oauth.d.ts.map +1 -0
  390. package/lib/services/socialOAuth/tiktok.oauth.js +151 -0
  391. package/lib/services/socialOAuth/types.d.ts +67 -0
  392. package/lib/services/socialOAuth/types.d.ts.map +1 -0
  393. package/lib/services/socialOAuth/types.js +2 -0
  394. package/lib/services/socialOAuth/x.oauth.d.ts +17 -0
  395. package/lib/services/socialOAuth/x.oauth.d.ts.map +1 -0
  396. package/lib/services/socialOAuth/x.oauth.js +134 -0
  397. package/lib/services/socialOAuth/youtube.oauth.d.ts +15 -0
  398. package/lib/services/socialOAuth/youtube.oauth.d.ts.map +1 -0
  399. package/lib/services/socialOAuth/youtube.oauth.js +156 -0
  400. package/lib/services/socialPublish/factory.d.ts +5 -0
  401. package/lib/services/socialPublish/factory.d.ts.map +1 -0
  402. package/lib/services/socialPublish/factory.js +32 -0
  403. package/lib/services/socialPublish/index.d.ts +10 -0
  404. package/lib/services/socialPublish/index.d.ts.map +1 -0
  405. package/lib/services/socialPublish/index.js +25 -0
  406. package/lib/services/socialPublish/linkedin.publish.d.ts +9 -0
  407. package/lib/services/socialPublish/linkedin.publish.d.ts.map +1 -0
  408. package/lib/services/socialPublish/linkedin.publish.js +143 -0
  409. package/lib/services/socialPublish/meta.publish.d.ts +28 -0
  410. package/lib/services/socialPublish/meta.publish.d.ts.map +1 -0
  411. package/lib/services/socialPublish/meta.publish.js +149 -0
  412. package/lib/services/socialPublish/pinterest.publish.d.ts +13 -0
  413. package/lib/services/socialPublish/pinterest.publish.d.ts.map +1 -0
  414. package/lib/services/socialPublish/pinterest.publish.js +130 -0
  415. package/lib/services/socialPublish/threads.publish.d.ts +12 -0
  416. package/lib/services/socialPublish/threads.publish.d.ts.map +1 -0
  417. package/lib/services/socialPublish/threads.publish.js +96 -0
  418. package/lib/services/socialPublish/tiktok.publish.d.ts +13 -0
  419. package/lib/services/socialPublish/tiktok.publish.d.ts.map +1 -0
  420. package/lib/services/socialPublish/tiktok.publish.js +118 -0
  421. package/lib/services/socialPublish/types.d.ts +47 -0
  422. package/lib/services/socialPublish/types.d.ts.map +1 -0
  423. package/lib/services/socialPublish/types.js +2 -0
  424. package/lib/services/socialPublish/x.publish.d.ts +12 -0
  425. package/lib/services/socialPublish/x.publish.d.ts.map +1 -0
  426. package/lib/services/socialPublish/x.publish.js +147 -0
  427. package/lib/services/socialPublish/youtube.publish.d.ts +9 -0
  428. package/lib/services/socialPublish/youtube.publish.d.ts.map +1 -0
  429. package/lib/services/socialPublish/youtube.publish.js +107 -0
  430. package/lib/services/stock/index.d.ts +2 -0
  431. package/lib/services/stock/index.d.ts.map +1 -0
  432. package/lib/services/stock/index.js +17 -0
  433. package/lib/services/stock/realPersonSafety.d.ts +99 -0
  434. package/lib/services/stock/realPersonSafety.d.ts.map +1 -0
  435. package/lib/services/stock/realPersonSafety.js +248 -0
  436. package/lib/utils/index.d.ts +1 -0
  437. package/lib/utils/index.d.ts.map +1 -1
  438. package/lib/utils/index.js +1 -0
  439. package/lib/utils/renderTier.d.ts +26 -0
  440. package/lib/utils/renderTier.d.ts.map +1 -0
  441. package/lib/utils/renderTier.js +34 -0
  442. package/package.json +1 -1
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.outcomeToRenderOutcome = outcomeToRenderOutcome;
4
4
  exports.resolveVoiceoverUrl = resolveVoiceoverUrl;
5
+ exports.resolveSceneCaptions = resolveSceneCaptions;
5
6
  exports.writeAgentProjectShell = writeAgentProjectShell;
6
7
  exports.writeAgentProjectIncremental = writeAgentProjectIncremental;
7
8
  const node_child_process_1 = require("node:child_process");
@@ -12,6 +13,7 @@ const planToProject_1 = require("../editor/planToProject");
12
13
  const uploadAudioBuffer_1 = require("../gcp/uploadAudioBuffer");
13
14
  const firestore_service_1 = require("../firestore.service");
14
15
  const costPreflight_1 = require("./costPreflight");
16
+ const toolRegistry_1 = require("./toolRegistry");
15
17
  const logger_1 = require("../../utils/logger");
16
18
  /**
17
19
  * Probe an audio buffer's actual playback duration via ffprobe. Writes the
@@ -63,6 +65,10 @@ function outcomeToRenderOutcome(outcome) {
63
65
  return undefined;
64
66
  return {
65
67
  visualUrl: outcome.result.visualUrl,
68
+ // AG-2 / L-4: extend-chain sub-clips (source + native extensions), filled
69
+ // by the host's resolveExtendChain. planToProject tiles these across the
70
+ // scene window; absent on single-clip scenes.
71
+ clips: outcome.result.clips,
66
72
  voiceoverUrl: outcome.result.voiceoverUrl,
67
73
  // Prefer probed actual ms (stamped in resolveVoiceoverUrl) over the
68
74
  // wpm estimate — the estimate undershoots emotive/punctuated lines by
@@ -71,6 +77,11 @@ function outcomeToRenderOutcome(outcome) {
71
77
  modelKey: outcome.result.pendingModelKey ?? outcome.scene.preferredModel,
72
78
  attemptedProviders: outcome.result.attemptedProviders,
73
79
  generationId: outcome.result.idempotencyKey,
80
+ // P-UNS-2: stock attribution → clip provenance → producer-surface credit.
81
+ attribution: outcome.result.attribution,
82
+ // AG-3: word-timed captions transcribed from the VO (host-side, post
83
+ // VO-URL resolve). planToProject renders these as a CaptionClip.
84
+ captionWords: outcome.result.captionWords,
74
85
  // Symmetric with plan-side `estimatePlanCost`: T0 scenes that emit
75
86
  // estimatedCredits=0 from the planner fall back to the per-second
76
87
  // tier curve so the editor's cost chip + agent reconciliation match.
@@ -127,6 +138,60 @@ async function resolveVoiceoverUrl(outcome, projectId) {
127
138
  // Drop base64 once URL is stamped so the Firestore write stays small.
128
139
  result.voiceoverAudioBase64 = undefined;
129
140
  }
141
+ /**
142
+ * AG-3 — auto-captions. Runs AFTER resolveVoiceoverUrl (needs the uploaded
143
+ * voiceoverUrl, which the executor never has — it only produces base64). When
144
+ * the scene opted in via plan (scene.autoCaptions) AND a VO actually landed,
145
+ * transcribe the VO with the generate_captions tool (AssemblyAI → Whisper
146
+ * fallback, cached) and stamp word-level timing onto the outcome so
147
+ * planToProject renders a CaptionClip. ASR word times are ms from the audio
148
+ * start, which equals scene start, so they're already scene-relative.
149
+ *
150
+ * Idempotent (skips if captionWords already set). Best-effort: a transcription
151
+ * failure or an over-budget pending result just leaves the scene caption-less
152
+ * rather than failing the run — the host swallows the throw.
153
+ */
154
+ async function resolveSceneCaptions(outcome, ctx) {
155
+ if (!outcome.ok || !outcome.result)
156
+ return;
157
+ const result = outcome.result;
158
+ if (!outcome.scene.autoCaptions)
159
+ return;
160
+ if (!result.voiceoverUrl)
161
+ return; // nothing to caption
162
+ if (result.captionWords && result.captionWords.length > 0)
163
+ return; // idempotent
164
+ const captionOutcome = await (0, toolRegistry_1.runTool)("generate_captions", { audioUrl: result.voiceoverUrl, wordTimestamps: true }, {
165
+ userId: ctx.userId,
166
+ agentRunId: ctx.agentRunId,
167
+ projectId: ctx.projectId,
168
+ idempotencyKey: `${result.idempotencyKey}:captions`,
169
+ });
170
+ if (!captionOutcome.ok) {
171
+ logger_1.logger.warn("agent.captions.toolFailed", {
172
+ projectId: ctx.projectId,
173
+ sceneIndex: outcome.scene.sceneIndex,
174
+ error: captionOutcome.error,
175
+ });
176
+ return;
177
+ }
178
+ const out = captionOutcome.output;
179
+ if (out.pending) {
180
+ // ASR ran past the inline-poll budget — too long to caption inline. Skip
181
+ // rather than block the run; scene ships without captions.
182
+ logger_1.logger.warn("agent.captions.pending", {
183
+ projectId: ctx.projectId,
184
+ sceneIndex: outcome.scene.sceneIndex,
185
+ });
186
+ return;
187
+ }
188
+ const words = (out.words ?? [])
189
+ .filter((w) => Number.isFinite(w.start) && Number.isFinite(w.end))
190
+ .map((w) => ({ word: w.text, start: w.start, end: w.end }));
191
+ if (words.length === 0)
192
+ return;
193
+ result.captionWords = words;
194
+ }
130
195
  /**
131
196
  * Stage 3 — write the initial Project shell after the planner approves a
132
197
  * plan. All scene clips exist with placeholder URLs so editor + drawer
@@ -136,7 +201,7 @@ async function resolveVoiceoverUrl(outcome, projectId) {
136
201
  * C23: critical for keeping the editor / drawer from sitting on an empty
137
202
  * timeline for 20+ minutes while the worker runs.
138
203
  */
139
- async function writeAgentProjectShell(projectId, plan, agentRunId) {
204
+ async function writeAgentProjectShell(projectId, plan, agentRunId, preserveClips, frozenVisualScenes) {
140
205
  try {
141
206
  const shell = (0, planToProject_1.planToProject)({
142
207
  plan,
@@ -144,6 +209,8 @@ async function writeAgentProjectShell(projectId, plan, agentRunId) {
144
209
  projectId,
145
210
  name: `Agent project ${projectId.slice(0, 8)}`,
146
211
  agentRunId,
212
+ preserveClips,
213
+ frozenVisualScenes,
147
214
  });
148
215
  await firestore_service_1.FirestoreService.agentProjectsCol.doc(projectId).update({
149
216
  projectJson: shell,
@@ -169,7 +236,7 @@ async function writeAgentProjectShell(projectId, plan, agentRunId) {
169
236
  *
170
237
  * C24 / C25: per-scene incremental update + soft-fail behavior.
171
238
  */
172
- async function writeAgentProjectIncremental(projectId, plan, outcomesSoFar, agentRunId) {
239
+ async function writeAgentProjectIncremental(projectId, plan, outcomesSoFar, agentRunId, preserveClips, frozenVisualScenes) {
173
240
  try {
174
241
  const renderOutcomes = {};
175
242
  for (const [k, o] of Object.entries(outcomesSoFar)) {
@@ -181,6 +248,8 @@ async function writeAgentProjectIncremental(projectId, plan, outcomesSoFar, agen
181
248
  projectId,
182
249
  name: `Agent project ${projectId.slice(0, 8)}`,
183
250
  agentRunId,
251
+ preserveClips,
252
+ frozenVisualScenes,
184
253
  });
185
254
  await firestore_service_1.FirestoreService.agentProjectsCol.doc(projectId).update({
186
255
  projectJson,
@@ -11,6 +11,7 @@ declare const InputSchema: z.ZodObject<{
11
11
  "1:1": "1:1";
12
12
  "16:9": "16:9";
13
13
  }>>;
14
+ lastFrameImageUrl: z.ZodOptional<z.ZodString>;
14
15
  }, z.core.$strip>;
15
16
  declare const OutputSchema: z.ZodObject<{
16
17
  status: z.ZodLiteral<"triggered">;
@@ -1 +1 @@
1
- {"version":3,"file":"animateImage.tool.d.ts","sourceRoot":"","sources":["../../../../src/services/agent/tools/animateImage.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAI5D,OAAO,EAAgB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAW/D,QAAA,MAAM,WAAW;;;;;;;;;;iBAkBf,CAAC;AAEH,QAAA,MAAM,YAAY;;;;;;iBAMhB,CAAC;AAEH,eAAO,MAAM,gBAAgB,EAAE,cAAc,CAC3C,OAAO,WAAW,EAClB,OAAO,YAAY,CAwFpB,CAAC"}
1
+ {"version":3,"file":"animateImage.tool.d.ts","sourceRoot":"","sources":["../../../../src/services/agent/tools/animateImage.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAI5D,OAAO,EAAgB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAW/D,QAAA,MAAM,WAAW;;;;;;;;;;;iBA6Bf,CAAC;AAEH,QAAA,MAAM,YAAY;;;;;;iBAMhB,CAAC;AAEH,eAAO,MAAM,gBAAgB,EAAE,cAAc,CAC3C,OAAO,WAAW,EAClB,OAAO,YAAY,CA2FpB,CAAC"}
@@ -23,6 +23,15 @@ const InputSchema = zod_1.z.object({
23
23
  // AG-16: 4:5 removed — no video provider supports it (Instagram-feed aspect
24
24
  // is image-only). If the planner asked for 4:5 it'd dead-end the chain.
25
25
  aspectRatio: zod_1.z.enum(["9:16", "16:9", "1:1"]).default("9:16"),
26
+ lastFrameImageUrl: zod_1.z
27
+ .string()
28
+ .url()
29
+ .optional()
30
+ .describe("AG-1: end frame for first-last-frame (FLF) interpolation — animate FROM " +
31
+ "imageUrl (first frame) TO this image (last frame) for directed motion " +
32
+ "between two specific compositions. Only FLF-capable models accept it " +
33
+ "(kling, runway-gen4-turbo, google-veo-3.1, alibaba-wan); the chain skips " +
34
+ "and falls back on models that don't. Omit for plain single-image motion."),
26
35
  });
27
36
  const OutputSchema = zod_1.z.object({
28
37
  status: zod_1.z.literal("triggered"),
@@ -55,6 +64,8 @@ exports.animateImageTool = {
55
64
  aspect: input.aspectRatio,
56
65
  durationSec: input.durationSec,
57
66
  type: "image-to-video",
67
+ lastFrame: Boolean(input.lastFrameImageUrl),
68
+ hasInputImage: true,
58
69
  }),
59
70
  onAttempt: (a) => {
60
71
  if (a.classification) {
@@ -82,6 +93,7 @@ exports.animateImageTool = {
82
93
  duration: input.durationSec,
83
94
  aspectRatio: input.aspectRatio,
84
95
  inputImageUrl: input.imageUrl,
96
+ lastFrameImageUrl: input.lastFrameImageUrl,
85
97
  type: "image-to-video",
86
98
  });
87
99
  const taskId = result.task?.taskId ??
@@ -0,0 +1,42 @@
1
+ import { z } from "zod";
2
+ import { Chapter } from "../../../schemas/videoPlan.schema";
3
+ import { LlmCaller } from "../llmCaller";
4
+ import { ToolDefinition } from "../toolRegistry";
5
+ /**
6
+ * Stream L (L-4) — chapter_outline. Second pass of script-first authoring:
7
+ * segments a full narration script (from generate_script, or user-supplied)
8
+ * into titled chapters. Each chapter's `narration` is a VERBATIM contiguous
9
+ * slice of the source script — concatenating all chapter narrations in order
10
+ * reproduces the original text. match_broll_to_script then explodes each
11
+ * chapter's narration into scenes.
12
+ *
13
+ * The LLM only decides the split points + titles; chapter ids and per-chapter
14
+ * duration estimates are stamped deterministically (CH_<n>, estimateTtsMs).
15
+ */
16
+ declare const InputSchema: z.ZodObject<{
17
+ script: z.ZodString;
18
+ targetChapterCount: z.ZodOptional<z.ZodNumber>;
19
+ wpm: z.ZodOptional<z.ZodNumber>;
20
+ }, z.core.$strip>;
21
+ declare const OutputSchema: z.ZodObject<{
22
+ chapters: z.ZodArray<z.ZodObject<{
23
+ id: z.ZodString;
24
+ title: z.ZodString;
25
+ narration: z.ZodOptional<z.ZodString>;
26
+ estimatedDurationMs: z.ZodOptional<z.ZodNumber>;
27
+ sceneIndices: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
28
+ }, z.core.$strip>>;
29
+ }, z.core.$strip>;
30
+ /**
31
+ * Pure core, shared by the tool handler and the script-first planner (L-3).
32
+ */
33
+ export declare function chapterOutlineCore(llm: LlmCaller, args: {
34
+ script: string;
35
+ targetChapterCount?: number;
36
+ wpm?: number;
37
+ }): Promise<{
38
+ chapters: Chapter[];
39
+ }>;
40
+ export declare const chapterOutlineTool: ToolDefinition<typeof InputSchema, typeof OutputSchema>;
41
+ export {};
42
+ //# sourceMappingURL=chapterOutline.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chapterOutline.tool.d.ts","sourceRoot":"","sources":["../../../../src/services/agent/tools/chapterOutline.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAiB,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIzC,OAAO,EAAgB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE/D;;;;;;;;;;GAUG;AAEH,QAAA,MAAM,WAAW;;;;iBAYf,CAAC;AAoBH,QAAA,MAAM,YAAY;;;;;;;;iBAEhB,CAAC;AAEH;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,SAAS,EACd,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAClE,OAAO,CAAC;IAAE,QAAQ,EAAE,OAAO,EAAE,CAAA;CAAE,CAAC,CAgDlC;AAED,eAAO,MAAM,kBAAkB,EAAE,cAAc,CAC7C,OAAO,WAAW,EAClB,OAAO,YAAY,CAmBpB,CAAC"}
@@ -0,0 +1,115 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.chapterOutlineTool = void 0;
4
+ exports.chapterOutlineCore = chapterOutlineCore;
5
+ const zod_1 = require("zod");
6
+ const videoPlan_schema_1 = require("../../../schemas/videoPlan.schema");
7
+ const llmCallerRegistry_1 = require("../llmCallerRegistry");
8
+ const modelRouter_1 = require("../modelRouter");
9
+ const ttsDuration_1 = require("../ttsDuration");
10
+ const toolRegistry_1 = require("../toolRegistry");
11
+ /**
12
+ * Stream L (L-4) — chapter_outline. Second pass of script-first authoring:
13
+ * segments a full narration script (from generate_script, or user-supplied)
14
+ * into titled chapters. Each chapter's `narration` is a VERBATIM contiguous
15
+ * slice of the source script — concatenating all chapter narrations in order
16
+ * reproduces the original text. match_broll_to_script then explodes each
17
+ * chapter's narration into scenes.
18
+ *
19
+ * The LLM only decides the split points + titles; chapter ids and per-chapter
20
+ * duration estimates are stamped deterministically (CH_<n>, estimateTtsMs).
21
+ */
22
+ const InputSchema = zod_1.z.object({
23
+ script: zod_1.z
24
+ .string()
25
+ .min(1)
26
+ .describe("Full narration text to segment (e.g. ScriptSchema.fullText)."),
27
+ /**
28
+ * Soft target for how many chapters to produce. The model may deviate by ±1
29
+ * to respect natural topic boundaries. Defaults to a heuristic from length.
30
+ */
31
+ targetChapterCount: zod_1.z.number().int().min(1).max(30).optional(),
32
+ /** wpm used for per-chapter duration estimates; defaults to TTS calibration. */
33
+ wpm: zod_1.z.number().int().positive().optional(),
34
+ });
35
+ /** The model returns split points + titles; we stamp ids + durations. */
36
+ const LlmOutlineSchema = zod_1.z.object({
37
+ chapters: zod_1.z
38
+ .array(zod_1.z.object({
39
+ title: zod_1.z
40
+ .string()
41
+ .describe("Short YouTube-style section title, e.g. 'The hidden cost'."),
42
+ narration: zod_1.z
43
+ .string()
44
+ .describe("The VERBATIM contiguous slice of the source script that belongs to this chapter. Must be copied exactly (whitespace aside); chapters concatenated in order MUST reproduce the full script with no text added, dropped, or reordered."),
45
+ }))
46
+ .min(1),
47
+ });
48
+ const OutputSchema = zod_1.z.object({
49
+ chapters: zod_1.z.array(videoPlan_schema_1.ChapterSchema),
50
+ });
51
+ /**
52
+ * Pure core, shared by the tool handler and the script-first planner (L-3).
53
+ */
54
+ async function chapterOutlineCore(llm, args) {
55
+ const router = new modelRouter_1.ModelRouter();
56
+ const wpm = args.wpm ?? ttsDuration_1.TTS_DEFAULT_WPM;
57
+ const wordCount = args.script.split(/\s+/).filter(Boolean).length;
58
+ // Heuristic: ~1 chapter per ~120 words (≈48s of speech), clamped 2-12.
59
+ const defaultTarget = Math.min(12, Math.max(2, Math.round(wordCount / 120)));
60
+ const target = args.targetChapterCount ?? defaultTarget;
61
+ const system = [
62
+ "You are a video editor structuring a narration script into chapters for a",
63
+ "long-form video. Split the script at NATURAL topic boundaries into coherent",
64
+ "sections, each with a short, specific title. CRITICAL: each chapter's",
65
+ "narration must be the EXACT verbatim text from the script — do not rewrite,",
66
+ "summarize, add, or drop words. The chapters concatenated in order must",
67
+ "reproduce the original script exactly. Open with a hook chapter and close",
68
+ "with a payoff/CTA chapter.",
69
+ ].join(" ");
70
+ const user = [
71
+ `Aim for about ${target} chapters (deviate by ±1 only if the topic structure demands it).`,
72
+ "",
73
+ "SCRIPT:",
74
+ args.script,
75
+ ].join("\n");
76
+ const res = await llm.structured({
77
+ model: router.pickFor("planner"),
78
+ fallbackModel: router.fallbackFor("planner"),
79
+ schema: LlmOutlineSchema,
80
+ schemaName: "ChapterOutline",
81
+ messages: [
82
+ { role: "system", content: system },
83
+ { role: "user", content: user },
84
+ ],
85
+ temperature: 0.4,
86
+ maxTokens: 8000,
87
+ });
88
+ const chapters = res.data.chapters.map((ch, i) => ({
89
+ id: `CH_${i + 1}`,
90
+ title: ch.title,
91
+ narration: ch.narration.trim(),
92
+ estimatedDurationMs: (0, ttsDuration_1.estimateTtsMs)(ch.narration, wpm),
93
+ sceneIndices: [], // back-filled when the chapter is exploded into scenes
94
+ }));
95
+ return { chapters };
96
+ }
97
+ exports.chapterOutlineTool = {
98
+ name: "chapter_outline",
99
+ description: [
100
+ "Segment a full narration script into titled chapters (each chapter's text",
101
+ "is a verbatim contiguous slice of the script). Second pass of script-first",
102
+ "authoring after generate_script; output feeds match_broll_to_script per",
103
+ "chapter and populates VideoPlan.chapters. Also usable to chapterize a",
104
+ "user-supplied script.",
105
+ ].join(" "),
106
+ inputSchema: InputSchema,
107
+ outputSchema: OutputSchema,
108
+ idempotent: false,
109
+ handler: async (input) => chapterOutlineCore((0, llmCallerRegistry_1.getLlmCaller)(), {
110
+ script: input.script,
111
+ targetChapterCount: input.targetChapterCount,
112
+ wpm: input.wpm,
113
+ }),
114
+ };
115
+ (0, toolRegistry_1.registerTool)(exports.chapterOutlineTool);
@@ -83,6 +83,10 @@ declare const InputSchema: z.ZodObject<{
83
83
  assetHash: z.ZodOptional<z.ZodString>;
84
84
  creditsSpent: z.ZodOptional<z.ZodNumber>;
85
85
  generationId: z.ZodOptional<z.ZodString>;
86
+ attribution: z.ZodOptional<z.ZodObject<{
87
+ name: z.ZodString;
88
+ url: z.ZodOptional<z.ZodString>;
89
+ }, z.core.$strip>>;
86
90
  }, z.core.$strip>>;
87
91
  effects: z.ZodDefault<z.ZodArray<z.ZodObject<{
88
92
  id: z.ZodString;
@@ -139,6 +143,10 @@ declare const InputSchema: z.ZodObject<{
139
143
  assetHash: z.ZodOptional<z.ZodString>;
140
144
  creditsSpent: z.ZodOptional<z.ZodNumber>;
141
145
  generationId: z.ZodOptional<z.ZodString>;
146
+ attribution: z.ZodOptional<z.ZodObject<{
147
+ name: z.ZodString;
148
+ url: z.ZodOptional<z.ZodString>;
149
+ }, z.core.$strip>>;
142
150
  }, z.core.$strip>>;
143
151
  effects: z.ZodDefault<z.ZodArray<z.ZodObject<{
144
152
  id: z.ZodString;
@@ -187,6 +195,10 @@ declare const InputSchema: z.ZodObject<{
187
195
  assetHash: z.ZodOptional<z.ZodString>;
188
196
  creditsSpent: z.ZodOptional<z.ZodNumber>;
189
197
  generationId: z.ZodOptional<z.ZodString>;
198
+ attribution: z.ZodOptional<z.ZodObject<{
199
+ name: z.ZodString;
200
+ url: z.ZodOptional<z.ZodString>;
201
+ }, z.core.$strip>>;
190
202
  }, z.core.$strip>>;
191
203
  effects: z.ZodDefault<z.ZodArray<z.ZodObject<{
192
204
  id: z.ZodString;
@@ -238,6 +250,10 @@ declare const InputSchema: z.ZodObject<{
238
250
  assetHash: z.ZodOptional<z.ZodString>;
239
251
  creditsSpent: z.ZodOptional<z.ZodNumber>;
240
252
  generationId: z.ZodOptional<z.ZodString>;
253
+ attribution: z.ZodOptional<z.ZodObject<{
254
+ name: z.ZodString;
255
+ url: z.ZodOptional<z.ZodString>;
256
+ }, z.core.$strip>>;
241
257
  }, z.core.$strip>>;
242
258
  effects: z.ZodDefault<z.ZodArray<z.ZodObject<{
243
259
  id: z.ZodString;
@@ -265,6 +281,7 @@ declare const InputSchema: z.ZodObject<{
265
281
  }, z.core.$strip>>>;
266
282
  fontFamily: z.ZodDefault<z.ZodString>;
267
283
  fontSize: z.ZodDefault<z.ZodNumber>;
284
+ fontWeight: z.ZodOptional<z.ZodNumber>;
268
285
  color: z.ZodDefault<z.ZodString>;
269
286
  highlightColor: z.ZodOptional<z.ZodString>;
270
287
  language: z.ZodDefault<z.ZodString>;
@@ -288,6 +305,10 @@ declare const InputSchema: z.ZodObject<{
288
305
  assetHash: z.ZodOptional<z.ZodString>;
289
306
  creditsSpent: z.ZodOptional<z.ZodNumber>;
290
307
  generationId: z.ZodOptional<z.ZodString>;
308
+ attribution: z.ZodOptional<z.ZodObject<{
309
+ name: z.ZodString;
310
+ url: z.ZodOptional<z.ZodString>;
311
+ }, z.core.$strip>>;
291
312
  }, z.core.$strip>>;
292
313
  effects: z.ZodDefault<z.ZodArray<z.ZodObject<{
293
314
  id: z.ZodString;
@@ -381,6 +402,10 @@ declare const InputSchema: z.ZodObject<{
381
402
  assetHash: z.ZodOptional<z.ZodString>;
382
403
  creditsSpent: z.ZodOptional<z.ZodNumber>;
383
404
  generationId: z.ZodOptional<z.ZodString>;
405
+ attribution: z.ZodOptional<z.ZodObject<{
406
+ name: z.ZodString;
407
+ url: z.ZodOptional<z.ZodString>;
408
+ }, z.core.$strip>>;
384
409
  }, z.core.$strip>>;
385
410
  effects: z.ZodDefault<z.ZodArray<z.ZodObject<{
386
411
  id: z.ZodString;
@@ -437,6 +462,10 @@ declare const InputSchema: z.ZodObject<{
437
462
  assetHash: z.ZodOptional<z.ZodString>;
438
463
  creditsSpent: z.ZodOptional<z.ZodNumber>;
439
464
  generationId: z.ZodOptional<z.ZodString>;
465
+ attribution: z.ZodOptional<z.ZodObject<{
466
+ name: z.ZodString;
467
+ url: z.ZodOptional<z.ZodString>;
468
+ }, z.core.$strip>>;
440
469
  }, z.core.$strip>>;
441
470
  effects: z.ZodDefault<z.ZodArray<z.ZodObject<{
442
471
  id: z.ZodString;
@@ -485,6 +514,10 @@ declare const InputSchema: z.ZodObject<{
485
514
  assetHash: z.ZodOptional<z.ZodString>;
486
515
  creditsSpent: z.ZodOptional<z.ZodNumber>;
487
516
  generationId: z.ZodOptional<z.ZodString>;
517
+ attribution: z.ZodOptional<z.ZodObject<{
518
+ name: z.ZodString;
519
+ url: z.ZodOptional<z.ZodString>;
520
+ }, z.core.$strip>>;
488
521
  }, z.core.$strip>>;
489
522
  effects: z.ZodDefault<z.ZodArray<z.ZodObject<{
490
523
  id: z.ZodString;
@@ -536,6 +569,10 @@ declare const InputSchema: z.ZodObject<{
536
569
  assetHash: z.ZodOptional<z.ZodString>;
537
570
  creditsSpent: z.ZodOptional<z.ZodNumber>;
538
571
  generationId: z.ZodOptional<z.ZodString>;
572
+ attribution: z.ZodOptional<z.ZodObject<{
573
+ name: z.ZodString;
574
+ url: z.ZodOptional<z.ZodString>;
575
+ }, z.core.$strip>>;
539
576
  }, z.core.$strip>>;
540
577
  effects: z.ZodDefault<z.ZodArray<z.ZodObject<{
541
578
  id: z.ZodString;
@@ -563,6 +600,7 @@ declare const InputSchema: z.ZodObject<{
563
600
  }, z.core.$strip>>>;
564
601
  fontFamily: z.ZodDefault<z.ZodString>;
565
602
  fontSize: z.ZodDefault<z.ZodNumber>;
603
+ fontWeight: z.ZodOptional<z.ZodNumber>;
566
604
  color: z.ZodDefault<z.ZodString>;
567
605
  highlightColor: z.ZodOptional<z.ZodString>;
568
606
  language: z.ZodDefault<z.ZodString>;
@@ -586,6 +624,10 @@ declare const InputSchema: z.ZodObject<{
586
624
  assetHash: z.ZodOptional<z.ZodString>;
587
625
  creditsSpent: z.ZodOptional<z.ZodNumber>;
588
626
  generationId: z.ZodOptional<z.ZodString>;
627
+ attribution: z.ZodOptional<z.ZodObject<{
628
+ name: z.ZodString;
629
+ url: z.ZodOptional<z.ZodString>;
630
+ }, z.core.$strip>>;
589
631
  }, z.core.$strip>>;
590
632
  effects: z.ZodDefault<z.ZodArray<z.ZodObject<{
591
633
  id: z.ZodString;
@@ -716,6 +758,10 @@ declare const OutputSchema: z.ZodObject<{
716
758
  assetHash: z.ZodOptional<z.ZodString>;
717
759
  creditsSpent: z.ZodOptional<z.ZodNumber>;
718
760
  generationId: z.ZodOptional<z.ZodString>;
761
+ attribution: z.ZodOptional<z.ZodObject<{
762
+ name: z.ZodString;
763
+ url: z.ZodOptional<z.ZodString>;
764
+ }, z.core.$strip>>;
719
765
  }, z.core.$strip>>;
720
766
  effects: z.ZodDefault<z.ZodArray<z.ZodObject<{
721
767
  id: z.ZodString;
@@ -772,6 +818,10 @@ declare const OutputSchema: z.ZodObject<{
772
818
  assetHash: z.ZodOptional<z.ZodString>;
773
819
  creditsSpent: z.ZodOptional<z.ZodNumber>;
774
820
  generationId: z.ZodOptional<z.ZodString>;
821
+ attribution: z.ZodOptional<z.ZodObject<{
822
+ name: z.ZodString;
823
+ url: z.ZodOptional<z.ZodString>;
824
+ }, z.core.$strip>>;
775
825
  }, z.core.$strip>>;
776
826
  effects: z.ZodDefault<z.ZodArray<z.ZodObject<{
777
827
  id: z.ZodString;
@@ -820,6 +870,10 @@ declare const OutputSchema: z.ZodObject<{
820
870
  assetHash: z.ZodOptional<z.ZodString>;
821
871
  creditsSpent: z.ZodOptional<z.ZodNumber>;
822
872
  generationId: z.ZodOptional<z.ZodString>;
873
+ attribution: z.ZodOptional<z.ZodObject<{
874
+ name: z.ZodString;
875
+ url: z.ZodOptional<z.ZodString>;
876
+ }, z.core.$strip>>;
823
877
  }, z.core.$strip>>;
824
878
  effects: z.ZodDefault<z.ZodArray<z.ZodObject<{
825
879
  id: z.ZodString;
@@ -871,6 +925,10 @@ declare const OutputSchema: z.ZodObject<{
871
925
  assetHash: z.ZodOptional<z.ZodString>;
872
926
  creditsSpent: z.ZodOptional<z.ZodNumber>;
873
927
  generationId: z.ZodOptional<z.ZodString>;
928
+ attribution: z.ZodOptional<z.ZodObject<{
929
+ name: z.ZodString;
930
+ url: z.ZodOptional<z.ZodString>;
931
+ }, z.core.$strip>>;
874
932
  }, z.core.$strip>>;
875
933
  effects: z.ZodDefault<z.ZodArray<z.ZodObject<{
876
934
  id: z.ZodString;
@@ -898,6 +956,7 @@ declare const OutputSchema: z.ZodObject<{
898
956
  }, z.core.$strip>>>;
899
957
  fontFamily: z.ZodDefault<z.ZodString>;
900
958
  fontSize: z.ZodDefault<z.ZodNumber>;
959
+ fontWeight: z.ZodOptional<z.ZodNumber>;
901
960
  color: z.ZodDefault<z.ZodString>;
902
961
  highlightColor: z.ZodOptional<z.ZodString>;
903
962
  language: z.ZodDefault<z.ZodString>;
@@ -921,6 +980,10 @@ declare const OutputSchema: z.ZodObject<{
921
980
  assetHash: z.ZodOptional<z.ZodString>;
922
981
  creditsSpent: z.ZodOptional<z.ZodNumber>;
923
982
  generationId: z.ZodOptional<z.ZodString>;
983
+ attribution: z.ZodOptional<z.ZodObject<{
984
+ name: z.ZodString;
985
+ url: z.ZodOptional<z.ZodString>;
986
+ }, z.core.$strip>>;
924
987
  }, z.core.$strip>>;
925
988
  effects: z.ZodDefault<z.ZodArray<z.ZodObject<{
926
989
  id: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"composeScene.tool.d.ts","sourceRoot":"","sources":["../../../../src/services/agent/tools/composeScene.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,OAAO,EAAgB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAiC/D,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAGf,CAAC;AAEH,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAIhB,CAAC;AAEH,eAAO,MAAM,gBAAgB,EAAE,cAAc,CAC3C,OAAO,WAAW,EAClB,OAAO,YAAY,CA4DpB,CAAC"}
1
+ {"version":3,"file":"composeScene.tool.d.ts","sourceRoot":"","sources":["../../../../src/services/agent/tools/composeScene.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,OAAO,EAAgB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAiC/D,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAGf,CAAC;AAEH,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAIhB,CAAC;AAEH,eAAO,MAAM,gBAAgB,EAAE,cAAc,CAC3C,OAAO,WAAW,EAClB,OAAO,YAAY,CA4DpB,CAAC"}
@@ -83,6 +83,10 @@ declare const InputSchema: z.ZodObject<{
83
83
  assetHash: z.ZodOptional<z.ZodString>;
84
84
  creditsSpent: z.ZodOptional<z.ZodNumber>;
85
85
  generationId: z.ZodOptional<z.ZodString>;
86
+ attribution: z.ZodOptional<z.ZodObject<{
87
+ name: z.ZodString;
88
+ url: z.ZodOptional<z.ZodString>;
89
+ }, z.core.$strip>>;
86
90
  }, z.core.$strip>>;
87
91
  effects: z.ZodDefault<z.ZodArray<z.ZodObject<{
88
92
  id: z.ZodString;
@@ -139,6 +143,10 @@ declare const InputSchema: z.ZodObject<{
139
143
  assetHash: z.ZodOptional<z.ZodString>;
140
144
  creditsSpent: z.ZodOptional<z.ZodNumber>;
141
145
  generationId: z.ZodOptional<z.ZodString>;
146
+ attribution: z.ZodOptional<z.ZodObject<{
147
+ name: z.ZodString;
148
+ url: z.ZodOptional<z.ZodString>;
149
+ }, z.core.$strip>>;
142
150
  }, z.core.$strip>>;
143
151
  effects: z.ZodDefault<z.ZodArray<z.ZodObject<{
144
152
  id: z.ZodString;
@@ -187,6 +195,10 @@ declare const InputSchema: z.ZodObject<{
187
195
  assetHash: z.ZodOptional<z.ZodString>;
188
196
  creditsSpent: z.ZodOptional<z.ZodNumber>;
189
197
  generationId: z.ZodOptional<z.ZodString>;
198
+ attribution: z.ZodOptional<z.ZodObject<{
199
+ name: z.ZodString;
200
+ url: z.ZodOptional<z.ZodString>;
201
+ }, z.core.$strip>>;
190
202
  }, z.core.$strip>>;
191
203
  effects: z.ZodDefault<z.ZodArray<z.ZodObject<{
192
204
  id: z.ZodString;
@@ -238,6 +250,10 @@ declare const InputSchema: z.ZodObject<{
238
250
  assetHash: z.ZodOptional<z.ZodString>;
239
251
  creditsSpent: z.ZodOptional<z.ZodNumber>;
240
252
  generationId: z.ZodOptional<z.ZodString>;
253
+ attribution: z.ZodOptional<z.ZodObject<{
254
+ name: z.ZodString;
255
+ url: z.ZodOptional<z.ZodString>;
256
+ }, z.core.$strip>>;
241
257
  }, z.core.$strip>>;
242
258
  effects: z.ZodDefault<z.ZodArray<z.ZodObject<{
243
259
  id: z.ZodString;
@@ -265,6 +281,7 @@ declare const InputSchema: z.ZodObject<{
265
281
  }, z.core.$strip>>>;
266
282
  fontFamily: z.ZodDefault<z.ZodString>;
267
283
  fontSize: z.ZodDefault<z.ZodNumber>;
284
+ fontWeight: z.ZodOptional<z.ZodNumber>;
268
285
  color: z.ZodDefault<z.ZodString>;
269
286
  highlightColor: z.ZodOptional<z.ZodString>;
270
287
  language: z.ZodDefault<z.ZodString>;
@@ -288,6 +305,10 @@ declare const InputSchema: z.ZodObject<{
288
305
  assetHash: z.ZodOptional<z.ZodString>;
289
306
  creditsSpent: z.ZodOptional<z.ZodNumber>;
290
307
  generationId: z.ZodOptional<z.ZodString>;
308
+ attribution: z.ZodOptional<z.ZodObject<{
309
+ name: z.ZodString;
310
+ url: z.ZodOptional<z.ZodString>;
311
+ }, z.core.$strip>>;
291
312
  }, z.core.$strip>>;
292
313
  effects: z.ZodDefault<z.ZodArray<z.ZodObject<{
293
314
  id: z.ZodString;
@@ -344,7 +365,13 @@ declare const OutputSchema: z.ZodObject<{
344
365
  clipId: z.ZodString;
345
366
  tier: z.ZodString;
346
367
  source: z.ZodString;
368
+ modelKey: z.ZodOptional<z.ZodString>;
347
369
  credits: z.ZodNumber;
370
+ basis: z.ZodEnum<{
371
+ tier: "tier";
372
+ model: "model";
373
+ actual: "actual";
374
+ }>;
348
375
  }, z.core.$strip>>;
349
376
  }, z.core.$strip>;
350
377
  export declare const estimateCostTool: ToolDefinition<typeof InputSchema, typeof OutputSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"estimateCost.tool.d.ts","sourceRoot":"","sources":["../../../../src/services/agent/tools/estimateCost.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAgB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE/D,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAEf,CAAC;AAEH,QAAA,MAAM,YAAY;;;;;;;;iBAUhB,CAAC;AAEH,eAAO,MAAM,gBAAgB,EAAE,cAAc,CAC3C,OAAO,WAAW,EAClB,OAAO,YAAY,CA0BpB,CAAC"}
1
+ {"version":3,"file":"estimateCost.tool.d.ts","sourceRoot":"","sources":["../../../../src/services/agent/tools/estimateCost.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAgB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE/D,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAEf,CAAC;AAEH,QAAA,MAAM,YAAY;;;;;;;;;;;;;;iBAmBhB,CAAC;AAEH,eAAO,MAAM,gBAAgB,EAAE,cAAc,CAC3C,OAAO,WAAW,EAClB,OAAO,YAAY,CAgEpB,CAAC"}