vidspotai-shared 1.0.82-dev.0 → 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 (468) 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 +115 -10
  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 +70 -3
  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 +117 -3
  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 +4 -4
  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/recorder.d.ts +13 -1
  81. package/lib/services/agent/eval/recorder.d.ts.map +1 -1
  82. package/lib/services/agent/eval/recorder.js +59 -0
  83. package/lib/services/agent/eval/seedBriefs.d.ts +4 -3
  84. package/lib/services/agent/eval/seedBriefs.d.ts.map +1 -1
  85. package/lib/services/agent/eval/seedBriefs.js +283 -3
  86. package/lib/services/agent/eval/types.d.ts +10 -0
  87. package/lib/services/agent/eval/types.d.ts.map +1 -1
  88. package/lib/services/agent/executor/core.d.ts +70 -0
  89. package/lib/services/agent/executor/core.d.ts.map +1 -0
  90. package/lib/services/agent/executor/core.js +250 -0
  91. package/lib/services/agent/executor/duration.d.ts +20 -0
  92. package/lib/services/agent/executor/duration.d.ts.map +1 -0
  93. package/lib/services/agent/executor/duration.js +46 -0
  94. package/lib/services/agent/executor/index.d.ts +15 -0
  95. package/lib/services/agent/executor/index.d.ts.map +1 -0
  96. package/lib/services/agent/executor/index.js +32 -0
  97. package/lib/services/agent/executor/types.d.ts +183 -0
  98. package/lib/services/agent/executor/types.d.ts.map +1 -0
  99. package/lib/services/agent/executor/types.js +29 -0
  100. package/lib/services/agent/executor/visual.d.ts +32 -0
  101. package/lib/services/agent/executor/visual.d.ts.map +1 -0
  102. package/lib/services/agent/executor/visual.js +400 -0
  103. package/lib/services/agent/executor/voice.d.ts +17 -0
  104. package/lib/services/agent/executor/voice.d.ts.map +1 -0
  105. package/lib/services/agent/executor/voice.js +119 -0
  106. package/lib/services/agent/extendChain.d.ts +101 -0
  107. package/lib/services/agent/extendChain.d.ts.map +1 -0
  108. package/lib/services/agent/extendChain.js +177 -0
  109. package/lib/services/agent/index.d.ts +11 -1
  110. package/lib/services/agent/index.d.ts.map +1 -1
  111. package/lib/services/agent/index.js +11 -1
  112. package/lib/services/agent/llmCaller.d.ts +7 -8
  113. package/lib/services/agent/llmCaller.d.ts.map +1 -1
  114. package/lib/services/agent/llmCallerAnthropic.d.ts +44 -31
  115. package/lib/services/agent/llmCallerAnthropic.d.ts.map +1 -1
  116. package/lib/services/agent/llmCallerAnthropic.js +135 -60
  117. package/lib/services/agent/llmCallerFactory.d.ts +34 -0
  118. package/lib/services/agent/llmCallerFactory.d.ts.map +1 -0
  119. package/lib/services/agent/llmCallerFactory.js +31 -0
  120. package/lib/services/agent/llmCallerGemini.d.ts +62 -0
  121. package/lib/services/agent/llmCallerGemini.d.ts.map +1 -0
  122. package/lib/services/agent/llmCallerGemini.js +235 -0
  123. package/lib/services/agent/llmCallerOpenai.d.ts +56 -0
  124. package/lib/services/agent/llmCallerOpenai.d.ts.map +1 -0
  125. package/lib/services/agent/llmCallerOpenai.js +230 -0
  126. package/lib/services/agent/llmCallerRegistry.d.ts.map +1 -1
  127. package/lib/services/agent/llmCallerRegistry.js +7 -7
  128. package/lib/services/agent/llmCallerRouting.d.ts +63 -0
  129. package/lib/services/agent/llmCallerRouting.d.ts.map +1 -0
  130. package/lib/services/agent/llmCallerRouting.js +124 -0
  131. package/lib/services/agent/llmModelRegistry.d.ts +59 -0
  132. package/lib/services/agent/llmModelRegistry.d.ts.map +1 -0
  133. package/lib/services/agent/llmModelRegistry.js +168 -0
  134. package/lib/services/agent/llmRetry.d.ts +57 -0
  135. package/lib/services/agent/llmRetry.d.ts.map +1 -0
  136. package/lib/services/agent/llmRetry.js +102 -0
  137. package/lib/services/agent/modelRouter.d.ts +3 -3
  138. package/lib/services/agent/modelRouter.d.ts.map +1 -1
  139. package/lib/services/agent/modelRouter.js +27 -13
  140. package/lib/services/agent/planMutations.d.ts +54 -1
  141. package/lib/services/agent/planMutations.d.ts.map +1 -1
  142. package/lib/services/agent/planMutations.js +78 -0
  143. package/lib/services/agent/planner/Planner.d.ts +0 -17
  144. package/lib/services/agent/planner/Planner.d.ts.map +1 -1
  145. package/lib/services/agent/planner/Planner.js +67 -303
  146. package/lib/services/agent/planner/overlayRegen.d.ts +38 -0
  147. package/lib/services/agent/planner/overlayRegen.d.ts.map +1 -0
  148. package/lib/services/agent/planner/overlayRegen.js +145 -0
  149. package/lib/services/agent/planner/plannerMessages.d.ts +34 -0
  150. package/lib/services/agent/planner/plannerMessages.d.ts.map +1 -0
  151. package/lib/services/agent/planner/plannerMessages.js +185 -0
  152. package/lib/services/agent/planner/promptSections.d.ts +12 -0
  153. package/lib/services/agent/planner/promptSections.d.ts.map +1 -1
  154. package/lib/services/agent/planner/promptSections.js +57 -0
  155. package/lib/services/agent/planner/scriptFirstPlanner.d.ts +35 -0
  156. package/lib/services/agent/planner/scriptFirstPlanner.d.ts.map +1 -0
  157. package/lib/services/agent/planner/scriptFirstPlanner.js +140 -0
  158. package/lib/services/agent/planner/structuralRules.d.ts +10 -0
  159. package/lib/services/agent/planner/structuralRules.d.ts.map +1 -1
  160. package/lib/services/agent/planner/structuralRules.js +92 -9
  161. package/lib/services/agent/planner/validators.d.ts +18 -0
  162. package/lib/services/agent/planner/validators.d.ts.map +1 -1
  163. package/lib/services/agent/planner/validators.js +97 -0
  164. package/lib/services/agent/planner.d.ts +2 -1
  165. package/lib/services/agent/planner.d.ts.map +1 -1
  166. package/lib/services/agent/planner.js +5 -1
  167. package/lib/services/agent/priorProject.d.ts +26 -0
  168. package/lib/services/agent/priorProject.d.ts.map +1 -0
  169. package/lib/services/agent/priorProject.js +51 -0
  170. package/lib/services/agent/providerFallback/chains.d.ts.map +1 -1
  171. package/lib/services/agent/providerFallback/chains.js +27 -15
  172. package/lib/services/agent/repurpose/index.d.ts +3 -0
  173. package/lib/services/agent/repurpose/index.d.ts.map +1 -0
  174. package/lib/services/agent/repurpose/index.js +18 -0
  175. package/lib/services/agent/repurpose/repurpose.schema.d.ts +132 -0
  176. package/lib/services/agent/repurpose/repurpose.schema.d.ts.map +1 -0
  177. package/lib/services/agent/repurpose/repurpose.schema.js +144 -0
  178. package/lib/services/agent/repurpose/shortsPicker.d.ts +25 -0
  179. package/lib/services/agent/repurpose/shortsPicker.d.ts.map +1 -0
  180. package/lib/services/agent/repurpose/shortsPicker.js +218 -0
  181. package/lib/services/agent/runHelpers.d.ts +21 -2
  182. package/lib/services/agent/runHelpers.d.ts.map +1 -1
  183. package/lib/services/agent/runHelpers.js +71 -2
  184. package/lib/services/agent/tools/animateImage.tool.d.ts +1 -0
  185. package/lib/services/agent/tools/animateImage.tool.d.ts.map +1 -1
  186. package/lib/services/agent/tools/animateImage.tool.js +12 -0
  187. package/lib/services/agent/tools/chapterOutline.tool.d.ts +42 -0
  188. package/lib/services/agent/tools/chapterOutline.tool.d.ts.map +1 -0
  189. package/lib/services/agent/tools/chapterOutline.tool.js +115 -0
  190. package/lib/services/agent/tools/composeScene.tool.d.ts +65 -2
  191. package/lib/services/agent/tools/composeScene.tool.d.ts.map +1 -1
  192. package/lib/services/agent/tools/estimateCost.tool.d.ts +28 -1
  193. package/lib/services/agent/tools/estimateCost.tool.d.ts.map +1 -1
  194. package/lib/services/agent/tools/estimateCost.tool.js +55 -7
  195. package/lib/services/agent/tools/extendVideo.tool.d.ts +26 -0
  196. package/lib/services/agent/tools/extendVideo.tool.d.ts.map +1 -0
  197. package/lib/services/agent/tools/extendVideo.tool.js +149 -0
  198. package/lib/services/agent/tools/generateScript.tool.d.ts +184 -0
  199. package/lib/services/agent/tools/generateScript.tool.d.ts.map +1 -0
  200. package/lib/services/agent/tools/generateScript.tool.js +123 -0
  201. package/lib/services/agent/tools/generateVideo.tool.d.ts +1 -0
  202. package/lib/services/agent/tools/generateVideo.tool.d.ts.map +1 -1
  203. package/lib/services/agent/tools/generateVideo.tool.js +20 -1
  204. package/lib/services/agent/tools/index.d.ts +4 -0
  205. package/lib/services/agent/tools/index.d.ts.map +1 -1
  206. package/lib/services/agent/tools/index.js +4 -0
  207. package/lib/services/agent/tools/matchBrollToScript.tool.d.ts +50 -0
  208. package/lib/services/agent/tools/matchBrollToScript.tool.d.ts.map +1 -0
  209. package/lib/services/agent/tools/matchBrollToScript.tool.js +139 -0
  210. package/lib/services/agent/tools/planVideo.tool.d.ts +57 -1
  211. package/lib/services/agent/tools/planVideo.tool.d.ts.map +1 -1
  212. package/lib/services/agent/tools/planVideo.tool.js +3 -3
  213. package/lib/services/agent/tools/render.tool.d.ts +22 -1
  214. package/lib/services/agent/tools/render.tool.d.ts.map +1 -1
  215. package/lib/services/aiGen/aiGenFactory.service.d.ts.map +1 -1
  216. package/lib/services/aiGen/aiGenFactory.service.js +18 -3
  217. package/lib/services/aiGen/helpers.d.ts +8 -0
  218. package/lib/services/aiGen/helpers.d.ts.map +1 -1
  219. package/lib/services/aiGen/helpers.js +12 -0
  220. package/lib/services/aiGen/providers/anthropic/anthropic.service.d.ts +26 -0
  221. package/lib/services/aiGen/providers/anthropic/anthropic.service.d.ts.map +1 -0
  222. package/lib/services/aiGen/providers/anthropic/anthropic.service.js +95 -0
  223. package/lib/services/aiGen/providers/google/google.service.d.ts +25 -1
  224. package/lib/services/aiGen/providers/google/google.service.d.ts.map +1 -1
  225. package/lib/services/aiGen/providers/google/google.service.js +136 -237
  226. package/lib/services/aiGen/providers/google/googleApiKeys.d.ts +71 -0
  227. package/lib/services/aiGen/providers/google/googleApiKeys.d.ts.map +1 -0
  228. package/lib/services/aiGen/providers/google/googleApiKeys.js +137 -0
  229. package/lib/services/aiGen/providers/google/googleErrors.d.ts +13 -0
  230. package/lib/services/aiGen/providers/google/googleErrors.d.ts.map +1 -0
  231. package/lib/services/aiGen/providers/google/googleErrors.js +102 -0
  232. package/lib/services/aiGen/providers/google/googleFetch.d.ts +8 -0
  233. package/lib/services/aiGen/providers/google/googleFetch.d.ts.map +1 -0
  234. package/lib/services/aiGen/providers/google/googleFetch.js +96 -0
  235. package/lib/services/aiGen/providers/google/googleKeyPool.d.ts +52 -0
  236. package/lib/services/aiGen/providers/google/googleKeyPool.d.ts.map +1 -0
  237. package/lib/services/aiGen/providers/google/googleKeyPool.js +129 -0
  238. package/lib/services/aiGen/providers/google/googleMusic.d.ts +15 -0
  239. package/lib/services/aiGen/providers/google/googleMusic.d.ts.map +1 -0
  240. package/lib/services/aiGen/providers/google/googleMusic.js +77 -0
  241. package/lib/services/aiGen/providers/kling/kling.service.d.ts +7 -3
  242. package/lib/services/aiGen/providers/kling/kling.service.d.ts.map +1 -1
  243. package/lib/services/aiGen/providers/kling/kling.service.js +23 -367
  244. package/lib/services/aiGen/providers/kling/klingCredits.d.ts +9 -0
  245. package/lib/services/aiGen/providers/kling/klingCredits.d.ts.map +1 -0
  246. package/lib/services/aiGen/providers/kling/klingCredits.js +63 -0
  247. package/lib/services/aiGen/providers/kling/klingRequests.d.ts +32 -0
  248. package/lib/services/aiGen/providers/kling/klingRequests.d.ts.map +1 -0
  249. package/lib/services/aiGen/providers/kling/klingRequests.js +194 -0
  250. package/lib/services/aiGen/providers/kling/klingStatus.d.ts +16 -0
  251. package/lib/services/aiGen/providers/kling/klingStatus.d.ts.map +1 -0
  252. package/lib/services/aiGen/providers/kling/klingStatus.js +173 -0
  253. package/lib/services/aiGen/providers/pixverse/pixverse.service.d.ts.map +1 -1
  254. package/lib/services/aiGen/providers/pixverse/pixverse.service.js +7 -1
  255. package/lib/services/bullmq.service.d.ts +61 -0
  256. package/lib/services/bullmq.service.d.ts.map +1 -1
  257. package/lib/services/bullmq.service.js +124 -2
  258. package/lib/services/crypto/index.d.ts +2 -0
  259. package/lib/services/crypto/index.d.ts.map +1 -0
  260. package/lib/services/crypto/index.js +17 -0
  261. package/lib/services/crypto/tokenVault.d.ts +47 -0
  262. package/lib/services/crypto/tokenVault.d.ts.map +1 -0
  263. package/lib/services/crypto/tokenVault.js +179 -0
  264. package/lib/services/editor/captionStyleHint.d.ts +3 -0
  265. package/lib/services/editor/captionStyleHint.d.ts.map +1 -0
  266. package/lib/services/editor/captionStyleHint.js +112 -0
  267. package/lib/services/editor/planToProject.d.ts +7 -66
  268. package/lib/services/editor/planToProject.d.ts.map +1 -1
  269. package/lib/services/editor/planToProject.helpers.d.ts +40 -0
  270. package/lib/services/editor/planToProject.helpers.d.ts.map +1 -0
  271. package/lib/services/editor/planToProject.helpers.js +177 -0
  272. package/lib/services/editor/planToProject.js +197 -180
  273. package/lib/services/editor/planToProject.types.d.ts +94 -0
  274. package/lib/services/editor/planToProject.types.d.ts.map +1 -0
  275. package/lib/services/editor/planToProject.types.js +2 -0
  276. package/lib/services/firestore.service.d.ts +5 -0
  277. package/lib/services/firestore.service.d.ts.map +1 -1
  278. package/lib/services/firestore.service.js +13 -0
  279. package/lib/services/index.d.ts +13 -0
  280. package/lib/services/index.d.ts.map +1 -1
  281. package/lib/services/index.js +13 -0
  282. package/lib/services/promptEnhancer/index.d.ts +18 -0
  283. package/lib/services/promptEnhancer/index.d.ts.map +1 -0
  284. package/lib/services/promptEnhancer/index.js +33 -0
  285. package/lib/services/promptEnhancer/models.d.ts +54 -0
  286. package/lib/services/promptEnhancer/models.d.ts.map +1 -0
  287. package/lib/services/promptEnhancer/models.js +37 -0
  288. package/lib/services/promptEnhancer/profiles/agent.profile.d.ts +14 -0
  289. package/lib/services/promptEnhancer/profiles/agent.profile.d.ts.map +1 -0
  290. package/lib/services/promptEnhancer/profiles/agent.profile.js +40 -0
  291. package/lib/services/promptEnhancer/profiles/avatar.profile.d.ts +13 -0
  292. package/lib/services/promptEnhancer/profiles/avatar.profile.d.ts.map +1 -0
  293. package/lib/services/promptEnhancer/profiles/avatar.profile.js +40 -0
  294. package/lib/services/promptEnhancer/profiles/base.d.ts +28 -0
  295. package/lib/services/promptEnhancer/profiles/base.d.ts.map +1 -0
  296. package/lib/services/promptEnhancer/profiles/base.js +35 -0
  297. package/lib/services/promptEnhancer/profiles/image.profile.d.ts +11 -0
  298. package/lib/services/promptEnhancer/profiles/image.profile.d.ts.map +1 -0
  299. package/lib/services/promptEnhancer/profiles/image.profile.js +42 -0
  300. package/lib/services/promptEnhancer/profiles/index.d.ts +12 -0
  301. package/lib/services/promptEnhancer/profiles/index.d.ts.map +1 -0
  302. package/lib/services/promptEnhancer/profiles/index.js +33 -0
  303. package/lib/services/promptEnhancer/profiles/video.profile.d.ts +15 -0
  304. package/lib/services/promptEnhancer/profiles/video.profile.d.ts.map +1 -0
  305. package/lib/services/promptEnhancer/profiles/video.profile.js +81 -0
  306. package/lib/services/promptEnhancer/promptEnhancer.service.d.ts +45 -0
  307. package/lib/services/promptEnhancer/promptEnhancer.service.d.ts.map +1 -0
  308. package/lib/services/promptEnhancer/promptEnhancer.service.js +157 -0
  309. package/lib/services/promptEnhancer/schema.d.ts +19 -0
  310. package/lib/services/promptEnhancer/schema.d.ts.map +1 -0
  311. package/lib/services/promptEnhancer/schema.js +43 -0
  312. package/lib/services/promptEnhancer/types.d.ts +112 -0
  313. package/lib/services/promptEnhancer/types.d.ts.map +1 -0
  314. package/lib/services/promptEnhancer/types.js +2 -0
  315. package/lib/services/rateLimiter/distributedRateLimiter.service.d.ts +60 -5
  316. package/lib/services/rateLimiter/distributedRateLimiter.service.d.ts.map +1 -1
  317. package/lib/services/rateLimiter/distributedRateLimiter.service.js +184 -16
  318. package/lib/services/socialAI/captionGen.d.ts +81 -0
  319. package/lib/services/socialAI/captionGen.d.ts.map +1 -0
  320. package/lib/services/socialAI/captionGen.js +206 -0
  321. package/lib/services/socialAI/hookScore.d.ts +85 -0
  322. package/lib/services/socialAI/hookScore.d.ts.map +1 -0
  323. package/lib/services/socialAI/hookScore.js +170 -0
  324. package/lib/services/socialAI/index.d.ts +3 -0
  325. package/lib/services/socialAI/index.d.ts.map +1 -0
  326. package/lib/services/socialAI/index.js +18 -0
  327. package/lib/services/socialAccounts/index.d.ts +2 -0
  328. package/lib/services/socialAccounts/index.d.ts.map +1 -0
  329. package/lib/services/socialAccounts/index.js +17 -0
  330. package/lib/services/socialAccounts/socialAccountService.d.ts +25 -0
  331. package/lib/services/socialAccounts/socialAccountService.d.ts.map +1 -0
  332. package/lib/services/socialAccounts/socialAccountService.js +105 -0
  333. package/lib/services/socialEngage/factory.d.ts +7 -0
  334. package/lib/services/socialEngage/factory.d.ts.map +1 -0
  335. package/lib/services/socialEngage/factory.js +25 -0
  336. package/lib/services/socialEngage/index.d.ts +6 -0
  337. package/lib/services/socialEngage/index.d.ts.map +1 -0
  338. package/lib/services/socialEngage/index.js +21 -0
  339. package/lib/services/socialEngage/meta.engage.d.ts +17 -0
  340. package/lib/services/socialEngage/meta.engage.d.ts.map +1 -0
  341. package/lib/services/socialEngage/meta.engage.js +128 -0
  342. package/lib/services/socialEngage/metaWebhook.d.ts +50 -0
  343. package/lib/services/socialEngage/metaWebhook.d.ts.map +1 -0
  344. package/lib/services/socialEngage/metaWebhook.js +93 -0
  345. package/lib/services/socialEngage/types.d.ts +72 -0
  346. package/lib/services/socialEngage/types.d.ts.map +1 -0
  347. package/lib/services/socialEngage/types.js +10 -0
  348. package/lib/services/socialEngage/youtube.engage.d.ts +9 -0
  349. package/lib/services/socialEngage/youtube.engage.d.ts.map +1 -0
  350. package/lib/services/socialEngage/youtube.engage.js +87 -0
  351. package/lib/services/socialFormat/aspectGeometry.d.ts +74 -0
  352. package/lib/services/socialFormat/aspectGeometry.d.ts.map +1 -0
  353. package/lib/services/socialFormat/aspectGeometry.js +135 -0
  354. package/lib/services/socialFormat/index.d.ts +2 -0
  355. package/lib/services/socialFormat/index.d.ts.map +1 -0
  356. package/lib/services/socialFormat/index.js +19 -0
  357. package/lib/services/socialInsights/index.d.ts +3 -0
  358. package/lib/services/socialInsights/index.d.ts.map +1 -0
  359. package/lib/services/socialInsights/index.js +18 -0
  360. package/lib/services/socialInsights/recommendations.d.ts +131 -0
  361. package/lib/services/socialInsights/recommendations.d.ts.map +1 -0
  362. package/lib/services/socialInsights/recommendations.js +277 -0
  363. package/lib/services/socialInsights/timeBuckets.d.ts +35 -0
  364. package/lib/services/socialInsights/timeBuckets.d.ts.map +1 -0
  365. package/lib/services/socialInsights/timeBuckets.js +78 -0
  366. package/lib/services/socialMetrics/factory.d.ts +5 -0
  367. package/lib/services/socialMetrics/factory.d.ts.map +1 -0
  368. package/lib/services/socialMetrics/factory.js +24 -0
  369. package/lib/services/socialMetrics/index.d.ts +6 -0
  370. package/lib/services/socialMetrics/index.d.ts.map +1 -0
  371. package/lib/services/socialMetrics/index.js +21 -0
  372. package/lib/services/socialMetrics/meta.metrics.d.ts +22 -0
  373. package/lib/services/socialMetrics/meta.metrics.d.ts.map +1 -0
  374. package/lib/services/socialMetrics/meta.metrics.js +137 -0
  375. package/lib/services/socialMetrics/tiktok.metrics.d.ts +8 -0
  376. package/lib/services/socialMetrics/tiktok.metrics.d.ts.map +1 -0
  377. package/lib/services/socialMetrics/tiktok.metrics.js +43 -0
  378. package/lib/services/socialMetrics/types.d.ts +54 -0
  379. package/lib/services/socialMetrics/types.d.ts.map +1 -0
  380. package/lib/services/socialMetrics/types.js +2 -0
  381. package/lib/services/socialMetrics/youtube.metrics.d.ts +8 -0
  382. package/lib/services/socialMetrics/youtube.metrics.d.ts.map +1 -0
  383. package/lib/services/socialMetrics/youtube.metrics.js +43 -0
  384. package/lib/services/socialOAuth/factory.d.ts +7 -0
  385. package/lib/services/socialOAuth/factory.d.ts.map +1 -0
  386. package/lib/services/socialOAuth/factory.js +42 -0
  387. package/lib/services/socialOAuth/index.d.ts +11 -0
  388. package/lib/services/socialOAuth/index.d.ts.map +1 -0
  389. package/lib/services/socialOAuth/index.js +26 -0
  390. package/lib/services/socialOAuth/linkedin.oauth.d.ts +14 -0
  391. package/lib/services/socialOAuth/linkedin.oauth.d.ts.map +1 -0
  392. package/lib/services/socialOAuth/linkedin.oauth.js +127 -0
  393. package/lib/services/socialOAuth/meta.oauth.d.ts +31 -0
  394. package/lib/services/socialOAuth/meta.oauth.d.ts.map +1 -0
  395. package/lib/services/socialOAuth/meta.oauth.js +214 -0
  396. package/lib/services/socialOAuth/oauthState.d.ts +14 -0
  397. package/lib/services/socialOAuth/oauthState.d.ts.map +1 -0
  398. package/lib/services/socialOAuth/oauthState.js +66 -0
  399. package/lib/services/socialOAuth/pinterest.oauth.d.ts +15 -0
  400. package/lib/services/socialOAuth/pinterest.oauth.d.ts.map +1 -0
  401. package/lib/services/socialOAuth/pinterest.oauth.js +126 -0
  402. package/lib/services/socialOAuth/threads.oauth.d.ts +14 -0
  403. package/lib/services/socialOAuth/threads.oauth.d.ts.map +1 -0
  404. package/lib/services/socialOAuth/threads.oauth.js +129 -0
  405. package/lib/services/socialOAuth/tiktok.oauth.d.ts +15 -0
  406. package/lib/services/socialOAuth/tiktok.oauth.d.ts.map +1 -0
  407. package/lib/services/socialOAuth/tiktok.oauth.js +151 -0
  408. package/lib/services/socialOAuth/types.d.ts +67 -0
  409. package/lib/services/socialOAuth/types.d.ts.map +1 -0
  410. package/lib/services/socialOAuth/types.js +2 -0
  411. package/lib/services/socialOAuth/x.oauth.d.ts +17 -0
  412. package/lib/services/socialOAuth/x.oauth.d.ts.map +1 -0
  413. package/lib/services/socialOAuth/x.oauth.js +134 -0
  414. package/lib/services/socialOAuth/youtube.oauth.d.ts +15 -0
  415. package/lib/services/socialOAuth/youtube.oauth.d.ts.map +1 -0
  416. package/lib/services/socialOAuth/youtube.oauth.js +156 -0
  417. package/lib/services/socialPublish/factory.d.ts +5 -0
  418. package/lib/services/socialPublish/factory.d.ts.map +1 -0
  419. package/lib/services/socialPublish/factory.js +32 -0
  420. package/lib/services/socialPublish/index.d.ts +10 -0
  421. package/lib/services/socialPublish/index.d.ts.map +1 -0
  422. package/lib/services/socialPublish/index.js +25 -0
  423. package/lib/services/socialPublish/linkedin.publish.d.ts +9 -0
  424. package/lib/services/socialPublish/linkedin.publish.d.ts.map +1 -0
  425. package/lib/services/socialPublish/linkedin.publish.js +143 -0
  426. package/lib/services/socialPublish/meta.publish.d.ts +28 -0
  427. package/lib/services/socialPublish/meta.publish.d.ts.map +1 -0
  428. package/lib/services/socialPublish/meta.publish.js +149 -0
  429. package/lib/services/socialPublish/pinterest.publish.d.ts +13 -0
  430. package/lib/services/socialPublish/pinterest.publish.d.ts.map +1 -0
  431. package/lib/services/socialPublish/pinterest.publish.js +130 -0
  432. package/lib/services/socialPublish/threads.publish.d.ts +12 -0
  433. package/lib/services/socialPublish/threads.publish.d.ts.map +1 -0
  434. package/lib/services/socialPublish/threads.publish.js +96 -0
  435. package/lib/services/socialPublish/tiktok.publish.d.ts +13 -0
  436. package/lib/services/socialPublish/tiktok.publish.d.ts.map +1 -0
  437. package/lib/services/socialPublish/tiktok.publish.js +118 -0
  438. package/lib/services/socialPublish/types.d.ts +47 -0
  439. package/lib/services/socialPublish/types.d.ts.map +1 -0
  440. package/lib/services/socialPublish/types.js +2 -0
  441. package/lib/services/socialPublish/x.publish.d.ts +12 -0
  442. package/lib/services/socialPublish/x.publish.d.ts.map +1 -0
  443. package/lib/services/socialPublish/x.publish.js +147 -0
  444. package/lib/services/socialPublish/youtube.publish.d.ts +9 -0
  445. package/lib/services/socialPublish/youtube.publish.d.ts.map +1 -0
  446. package/lib/services/socialPublish/youtube.publish.js +107 -0
  447. package/lib/services/stock/index.d.ts +2 -0
  448. package/lib/services/stock/index.d.ts.map +1 -0
  449. package/lib/services/stock/index.js +17 -0
  450. package/lib/services/stock/realPersonSafety.d.ts +99 -0
  451. package/lib/services/stock/realPersonSafety.d.ts.map +1 -0
  452. package/lib/services/stock/realPersonSafety.js +248 -0
  453. package/lib/services/translation/index.d.ts +2 -0
  454. package/lib/services/translation/index.d.ts.map +1 -0
  455. package/lib/services/translation/index.js +9 -0
  456. package/lib/services/translation/translation.service.d.ts +50 -0
  457. package/lib/services/translation/translation.service.d.ts.map +1 -0
  458. package/lib/services/translation/translation.service.js +211 -0
  459. package/lib/utils/helpers.d.ts +2 -4
  460. package/lib/utils/helpers.d.ts.map +1 -1
  461. package/lib/utils/helpers.js +9 -63
  462. package/lib/utils/index.d.ts +1 -0
  463. package/lib/utils/index.d.ts.map +1 -1
  464. package/lib/utils/index.js +1 -0
  465. package/lib/utils/renderTier.d.ts +26 -0
  466. package/lib/utils/renderTier.d.ts.map +1 -0
  467. package/lib/utils/renderTier.js +34 -0
  468. package/package.json +1 -1
@@ -0,0 +1,94 @@
1
+ import type { Clip } from "../../schemas/project.schema";
2
+ import type { VideoPlan } from "../../schemas/videoPlan.schema";
3
+ /**
4
+ * Input/outcome types for planToProject. Kept separate from the translator so
5
+ * callers (executor host, regen handlers) can import the shapes without pulling
6
+ * the full builder.
7
+ */
8
+ export interface SceneRenderOutcome {
9
+ /** Resolved URL for the scene's visual asset (image or video). */
10
+ visualUrl?: string;
11
+ /**
12
+ * AG-2 / L-4 extend chain. When a scene's visual was built as a source clip +
13
+ * N native extensions (too-long scene on an extend-capable model), the host's
14
+ * resolveExtendChain fills this with the sub-clips in render order. When
15
+ * present (length ≥ 2) planToProject lays them out as adjacent video clips
16
+ * spanning the scene's time window, which the renderer concatenates. A single
17
+ * resolved clip falls back to the `visualUrl` path.
18
+ */
19
+ clips?: Array<{
20
+ visualUrl: string;
21
+ durationSec: number;
22
+ taskId?: string;
23
+ }>;
24
+ /** Resolved URL for the scene's voiceover. */
25
+ voiceoverUrl?: string;
26
+ /**
27
+ * VO duration in ms used by planToProject to size the clip's display
28
+ * window. When set from a probed actual mp3 (preferred), reflects real
29
+ * playback length; when set from the wpm estimator it can undershoot
30
+ * emotive/punctuated lines by 400–900ms and the editor's Remotion Audio
31
+ * truncates at endAt. Caller should set the actual when available.
32
+ */
33
+ voiceoverDurationMs?: number;
34
+ /** Resolved URL for an external captions file (.vtt/.srt) if any. */
35
+ captionsUrl?: string;
36
+ /** Word-level caption timing (start/end ms within scene). */
37
+ captionWords?: Array<{
38
+ word: string;
39
+ start: number;
40
+ end: number;
41
+ }>;
42
+ /** Final model key the executor landed on (may differ from preferredModel). */
43
+ modelKey?: string;
44
+ /** Provider chain walked, primary first; recorded in provenance. */
45
+ attemptedProviders?: string[];
46
+ /** P-UNS-2: stock attribution to record in clip provenance (Unsplash credit). */
47
+ attribution?: {
48
+ name: string;
49
+ url?: string;
50
+ };
51
+ /** Provider idempotency key (used for reuse on regen). */
52
+ generationId?: string;
53
+ /** Credits actually spent on this scene. */
54
+ creditsSpent?: number;
55
+ /** Content hash of the visual asset, when computed. */
56
+ assetHash?: string;
57
+ }
58
+ export interface PlanToProjectInput {
59
+ plan: VideoPlan;
60
+ outcomes?: Record<number, SceneRenderOutcome | undefined>;
61
+ projectId: string;
62
+ name?: string;
63
+ agentRunId?: string;
64
+ /** When set, overrides plan.music.url (caller can swap to CDN-hosted version). */
65
+ musicUrl?: string;
66
+ /** Music duration in ms; falls back to plan.music.durationSec*1000 if unset. */
67
+ musicDurationMs?: number;
68
+ /** Project createdAt; defaults to now. */
69
+ createdAt?: string;
70
+ /** Project updatedAt; defaults to now. */
71
+ updatedAt?: string;
72
+ /**
73
+ * Stage 7 (lock enforcement) — clips from the prior project that must be
74
+ * reproduced verbatim, displacing any freshly-built clip with the same id.
75
+ * Supply the output of `computePreservedClips(priorProject, allowedMutations)`.
76
+ * A locked/user-placed clip carries edits (trim, volume, text, position)
77
+ * that exist nowhere in the plan, so it cannot be rebuilt — only kept as-is.
78
+ * Empty / unset on a first run or when nothing is protected (a no-op).
79
+ */
80
+ preserveClips?: Clip[];
81
+ /**
82
+ * Gap #1 follow-up (skip-generation). Scene indices whose visual is frozen
83
+ * (preserved verbatim — see `preserveClips`). For these we DON'T build a
84
+ * placeholder visual clip from plan+outcome: the executor skipped generation
85
+ * so there's no real URL, and a placeholder twin would either be redundantly
86
+ * overridden (single-clip ids match) or — worse — leak a stray PLACEHOLDER
87
+ * clip when the preserved visual is an extend-chain (ids `-0`/`-1` don't
88
+ * match the rebuilt single `scene-N-visual`). Instead we skip the build and
89
+ * let the preserve-override inject the real clip(s), anchoring transitions on
90
+ * the preserved ids. Derive via `computeFrozenScenes(preserveClips).visual`.
91
+ */
92
+ frozenVisualScenes?: ReadonlySet<number>;
93
+ }
94
+ //# sourceMappingURL=planToProject.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"planToProject.types.d.ts","sourceRoot":"","sources":["../../../src/services/editor/planToProject.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAEhE;;;;GAIG;AAEH,MAAM,WAAW,kBAAkB;IACjC,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC3E,8CAA8C;IAC9C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,qEAAqE;IACrE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6DAA6D;IAC7D,YAAY,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACnE,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oEAAoE;IACpE,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,iFAAiF;IACjF,WAAW,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7C,0DAA0D;IAC1D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4CAA4C;IAC5C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,GAAG,SAAS,CAAC,CAAC;IAC1D,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kFAAkF;IAClF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gFAAgF;IAChF,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,IAAI,EAAE,CAAC;IACvB;;;;;;;;;;OAUG;IACH,kBAAkB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC1C"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -8,6 +8,7 @@ import { IImageJobModel } from "../models/image.model";
8
8
  import { INotificationModel } from "../models/notification.model";
9
9
  import { IRefModel } from "../models/ref.model";
10
10
  import { IMediaUploadModel } from "../models/mediaUpload.model";
11
+ import { ISocialAccountModel, ISocialAnalyticsModel, ISocialInboxItemModel, ISocialPostModel } from "../models/social.model";
11
12
  import { IShareModel } from "../models/share.model";
12
13
  import { IUserModel } from "../models/user.model";
13
14
  import { IVideoJobModel } from "../models/video.model";
@@ -50,6 +51,10 @@ export declare class FirestoreService {
50
51
  static agentRunsCol: CollectionReference<IAgentRunModel, DocumentData>;
51
52
  static sharesCol: CollectionReference<IShareModel, DocumentData>;
52
53
  static mediaUploadsCol: CollectionReference<IMediaUploadModel, DocumentData>;
54
+ static socialAccountsCol: CollectionReference<ISocialAccountModel, DocumentData>;
55
+ static socialPostsCol: CollectionReference<ISocialPostModel, DocumentData>;
56
+ static socialAnalyticsCol: CollectionReference<ISocialAnalyticsModel, DocumentData>;
57
+ static socialInboxCol: CollectionReference<ISocialInboxItemModel, DocumentData>;
53
58
  /** Add new document with generated ID */
54
59
  static appendNewRecord<T>(collectionRef: CollectionReference<T>, data: T): Promise<DocumentReference<T>>;
55
60
  /** Add or overwrite a document with a specific ID */
@@ -1 +1 @@
1
- {"version":3,"file":"firestore.service.d.ts","sourceRoot":"","sources":["../../src/services/firestore.service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAEZ,gBAAgB,EAEhB,aAAa,EACd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EAGlB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAevD;;;;GAIG;AACH,qBAAa,gBAAgB;IAE3B,MA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AC,CAAC,CAAC,GACzD,OAAO,CAAC,CAAC,CAAC;CAGd"}
1
+ {"version":3,"file":"firestore.service.d.ts","sourceRoot":"","sources":["../../src/services/firestore.service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAEZ,gBAAgB,EAEhB,aAAa,EACd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EAGlB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAevD;;;;GAIG;AACH,qBAAa,gBAAgB;IAE3B,MAAM,CAAC,YAAY,oDAEqC;IAExD,MAAM,CAAC,YAAY,oDAEqC;IAExD,MAAM,CAAC,gBAAgB,wDAEqC;IAE5D,MAAM,CAAC,OAAO,+CAEqC;IAEnD,MAAM,CAAC,QAAQ,gDAEqC;IAEpD,MAAM,CAAC,UAAU;;;;;;;;;;;;;;;;;;;q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 @@ FirestoreService.sharesCol = firebase_1.firestore
156
156
  FirestoreService.mediaUploadsCol = firebase_1.firestore
157
157
  .collection("mediaUploads")
158
158
  .withConverter(collectionConverter());
159
+ // 🔹 X8 Social Suite — see notes/SOCIAL_SUITE_PLAN.md
160
+ FirestoreService.socialAccountsCol = firebase_1.firestore
161
+ .collection("socialAccounts")
162
+ .withConverter(collectionConverter());
163
+ FirestoreService.socialPostsCol = firebase_1.firestore
164
+ .collection("socialPosts")
165
+ .withConverter(collectionConverter());
166
+ FirestoreService.socialAnalyticsCol = firebase_1.firestore
167
+ .collection("socialAnalytics")
168
+ .withConverter(collectionConverter());
169
+ FirestoreService.socialInboxCol = firebase_1.firestore
170
+ .collection("socialInbox")
171
+ .withConverter(collectionConverter());
@@ -10,13 +10,26 @@ export * from "./notification.service";
10
10
  export * from "./credits/pricing";
11
11
  export * from "./analytics.service";
12
12
  export * from "./tts";
13
+ export * from "./translation";
13
14
  export * from "./musicGen";
14
15
  export * from "./audioAnalysis";
15
16
  export * from "./asr";
16
17
  export * from "./agent";
18
+ export * from "./promptEnhancer";
17
19
  export * from "./assetCache.service";
18
20
  export * from "./apiUsageCounter.service";
19
21
  export * from "./editor/designToProject";
20
22
  export * from "./editor/projectToDesign";
21
23
  export * from "./editor/planToProject";
24
+ export * from "./editor/captionStyleHint";
25
+ export * from "./stock";
26
+ export * from "./crypto";
27
+ export * from "./socialOAuth";
28
+ export * from "./socialPublish";
29
+ export * from "./socialMetrics";
30
+ export * from "./socialEngage";
31
+ export * from "./socialFormat";
32
+ export * from "./socialAI";
33
+ export * from "./socialInsights";
34
+ export * from "./socialAccounts";
22
35
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC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,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC"}
@@ -26,12 +26,25 @@ __exportStar(require("./notification.service"), exports);
26
26
  __exportStar(require("./credits/pricing"), exports);
27
27
  __exportStar(require("./analytics.service"), exports);
28
28
  __exportStar(require("./tts"), exports);
29
+ __exportStar(require("./translation"), exports);
29
30
  __exportStar(require("./musicGen"), exports);
30
31
  __exportStar(require("./audioAnalysis"), exports);
31
32
  __exportStar(require("./asr"), exports);
32
33
  __exportStar(require("./agent"), exports);
34
+ __exportStar(require("./promptEnhancer"), exports);
33
35
  __exportStar(require("./assetCache.service"), exports);
34
36
  __exportStar(require("./apiUsageCounter.service"), exports);
35
37
  __exportStar(require("./editor/designToProject"), exports);
36
38
  __exportStar(require("./editor/projectToDesign"), exports);
37
39
  __exportStar(require("./editor/planToProject"), exports);
40
+ __exportStar(require("./editor/captionStyleHint"), exports);
41
+ __exportStar(require("./stock"), exports);
42
+ __exportStar(require("./crypto"), exports);
43
+ __exportStar(require("./socialOAuth"), exports);
44
+ __exportStar(require("./socialPublish"), exports);
45
+ __exportStar(require("./socialMetrics"), exports);
46
+ __exportStar(require("./socialEngage"), exports);
47
+ __exportStar(require("./socialFormat"), exports);
48
+ __exportStar(require("./socialAI"), exports);
49
+ __exportStar(require("./socialInsights"), exports);
50
+ __exportStar(require("./socialAccounts"), exports);
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Modular Prompt Enhancer.
3
+ *
4
+ * Rewrites a user's raw prompt into a richer, production-grade prompt for a
5
+ * downstream generative model — preserving everything the user asked for and
6
+ * only adding craft where they were silent. Target-aware (video / image /
7
+ * avatar / agent) via per-target profiles, sharing one engine and the agent's
8
+ * LLM infrastructure.
9
+ *
10
+ * Step 1 ships the enhancer itself; wiring it into the individual pipelines is
11
+ * a separate, later step.
12
+ */
13
+ export * from "./types";
14
+ export * from "./schema";
15
+ export * from "./models";
16
+ export * from "./profiles";
17
+ export * from "./promptEnhancer.service";
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/promptEnhancer/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,0BAA0B,CAAC"}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ /**
18
+ * Modular Prompt Enhancer.
19
+ *
20
+ * Rewrites a user's raw prompt into a richer, production-grade prompt for a
21
+ * downstream generative model — preserving everything the user asked for and
22
+ * only adding craft where they were silent. Target-aware (video / image /
23
+ * avatar / agent) via per-target profiles, sharing one engine and the agent's
24
+ * LLM infrastructure.
25
+ *
26
+ * Step 1 ships the enhancer itself; wiring it into the individual pipelines is
27
+ * a separate, later step.
28
+ */
29
+ __exportStar(require("./types"), exports);
30
+ __exportStar(require("./schema"), exports);
31
+ __exportStar(require("./models"), exports);
32
+ __exportStar(require("./profiles"), exports);
33
+ __exportStar(require("./promptEnhancer.service"), exports);
@@ -0,0 +1,54 @@
1
+ import { ModelChoice } from "../agent/modelRouter";
2
+ /**
3
+ * Model selection for the Prompt Enhancer — deliberately INDEPENDENT of the
4
+ * agent's role-based ModelRouter.
5
+ *
6
+ * The enhancer is a cross-pipeline, single-call task with its own quality/speed
7
+ * balance, so it should not inherit the "planner" role's model (that model is
8
+ * tuned for heavyweight VideoPlan generation). Keeping a dedicated policy here
9
+ * means we can retune the enhancer without perturbing planner/critic routing,
10
+ * and vice versa.
11
+ *
12
+ * Every model below is registered in MODEL_CAPABILITIES and dispatchable by the
13
+ * native ProviderRoutingLlmCaller (anthropic / openai / google) — see
14
+ * llmModelRegistry.ts. The gateway has been deprecated (LLM_NATIVE_MIGRATION_PLAN
15
+ * Phase 5), so a model whose provider has no native caller would throw at
16
+ * dispatch time. Models picked from the latest frontier tiers (2026-06).
17
+ */
18
+ export interface EnhancerModelPolicy {
19
+ /** Default model — optimised for the speed/cost/quality balance. */
20
+ primary: ModelChoice;
21
+ /** Cross-provider fallback when the primary exhausts transient retries. */
22
+ fallback?: ModelChoice;
23
+ /** Used when `EnhanceOptions.premium` is set — top quality. */
24
+ premium: ModelChoice;
25
+ /** Cross-provider fallback for the premium model. */
26
+ premiumFallback?: ModelChoice;
27
+ }
28
+ /**
29
+ * Default policy (latest frontier tiers, chosen for this task after comparing
30
+ * the registry's quality/speed/cost guidance):
31
+ *
32
+ * primary = gemini-3.5-flash (Q4/S4, $1.5/$9): current frontier Flash, beats
33
+ * 3.1 Pro on agentic benches, strong vision (good for reference-image
34
+ * prompts), 1M ctx. The right balance for a critical-path call — fast and
35
+ * cheap without the Q3 quality of the older 2.5-flash. Its only weakness vs
36
+ * the Q5 tier — strict adherence to many simultaneous constraints — is
37
+ * covered by the schema's enumerate-then-honour preservation guard.
38
+ *
39
+ * premium = claude-sonnet-4-6 (Q4/S4, $3/$15): a strong, well-balanced quality
40
+ * lift over the Flash primary — excellent cinematic prose + reliable
41
+ * preservation — without the cost/latency of the Q5 Opus tier (overkill for
42
+ * prompt rewriting). Opt in (premium:true) for high-value jobs; the video
43
+ * pipeline can pass it since video prompts are the most demanding downstream.
44
+ *
45
+ * fallbacks are cross-provider so a single provider's rate-limit/outage degrades
46
+ * gracefully: flash(google)→gpt-5.4-mini(openai); sonnet(anthropic)→3.1-pro(google).
47
+ */
48
+ export declare const DEFAULT_ENHANCER_MODELS: EnhancerModelPolicy;
49
+ /** Resolve the (primary, fallback) pair for a call, honouring the premium flag. */
50
+ export declare function pickEnhancerModel(policy: EnhancerModelPolicy, premium?: boolean): {
51
+ model: ModelChoice;
52
+ fallbackModel?: ModelChoice;
53
+ };
54
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/services/promptEnhancer/models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,mBAAmB;IAClC,oEAAoE;IACpE,OAAO,EAAE,WAAW,CAAC;IACrB,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,WAAW,CAAC;IACvB,+DAA+D;IAC/D,OAAO,EAAE,WAAW,CAAC;IACrB,qDAAqD;IACrD,eAAe,CAAC,EAAE,WAAW,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,uBAAuB,EAAE,mBAKrC,CAAC;AAEF,mFAAmF;AACnF,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,mBAAmB,EAC3B,OAAO,CAAC,EAAE,OAAO,GAChB;IAAE,KAAK,EAAE,WAAW,CAAC;IAAC,aAAa,CAAC,EAAE,WAAW,CAAA;CAAE,CAKrD"}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DEFAULT_ENHANCER_MODELS = void 0;
4
+ exports.pickEnhancerModel = pickEnhancerModel;
5
+ /**
6
+ * Default policy (latest frontier tiers, chosen for this task after comparing
7
+ * the registry's quality/speed/cost guidance):
8
+ *
9
+ * primary = gemini-3.5-flash (Q4/S4, $1.5/$9): current frontier Flash, beats
10
+ * 3.1 Pro on agentic benches, strong vision (good for reference-image
11
+ * prompts), 1M ctx. The right balance for a critical-path call — fast and
12
+ * cheap without the Q3 quality of the older 2.5-flash. Its only weakness vs
13
+ * the Q5 tier — strict adherence to many simultaneous constraints — is
14
+ * covered by the schema's enumerate-then-honour preservation guard.
15
+ *
16
+ * premium = claude-sonnet-4-6 (Q4/S4, $3/$15): a strong, well-balanced quality
17
+ * lift over the Flash primary — excellent cinematic prose + reliable
18
+ * preservation — without the cost/latency of the Q5 Opus tier (overkill for
19
+ * prompt rewriting). Opt in (premium:true) for high-value jobs; the video
20
+ * pipeline can pass it since video prompts are the most demanding downstream.
21
+ *
22
+ * fallbacks are cross-provider so a single provider's rate-limit/outage degrades
23
+ * gracefully: flash(google)→gpt-5.4-mini(openai); sonnet(anthropic)→3.1-pro(google).
24
+ */
25
+ exports.DEFAULT_ENHANCER_MODELS = {
26
+ primary: { modelId: "gemini-3.5-flash", provider: "google", vision: true },
27
+ fallback: { modelId: "gpt-5.4-mini", provider: "openai", vision: true },
28
+ premium: { modelId: "claude-sonnet-4-6", provider: "anthropic", vision: true },
29
+ premiumFallback: { modelId: "gemini-3.1-pro", provider: "google", vision: true },
30
+ };
31
+ /** Resolve the (primary, fallback) pair for a call, honouring the premium flag. */
32
+ function pickEnhancerModel(policy, premium) {
33
+ if (premium) {
34
+ return { model: policy.premium, fallbackModel: policy.premiumFallback };
35
+ }
36
+ return { model: policy.primary, fallbackModel: policy.fallback };
37
+ }
@@ -0,0 +1,14 @@
1
+ import { EnhancerProfile } from "./base";
2
+ /**
3
+ * AGENT profile — creative-brief clarifier.
4
+ *
5
+ * The agent pipeline already has a Planner that decomposes a brief into scenes
6
+ * (with per-scene prompts, tiers, models, overlays, etc.). So the enhancer's
7
+ * job here is NOT to write shots — that would fight the Planner. It is to take
8
+ * a thin one-liner and turn it into a sharp, complete CREATIVE BRIEF the
9
+ * Planner can plan well from: clear concept, intended outcome, audience, tone,
10
+ * a high-level arc, and must-include elements. Think "better brief", not
11
+ * "storyboard".
12
+ */
13
+ export declare const AGENT_PROFILE: EnhancerProfile;
14
+ //# sourceMappingURL=agent.profile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent.profile.d.ts","sourceRoot":"","sources":["../../../../src/services/promptEnhancer/profiles/agent.profile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEzC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,EAAE,eAyB3B,CAAC"}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AGENT_PROFILE = void 0;
4
+ /**
5
+ * AGENT profile — creative-brief clarifier.
6
+ *
7
+ * The agent pipeline already has a Planner that decomposes a brief into scenes
8
+ * (with per-scene prompts, tiers, models, overlays, etc.). So the enhancer's
9
+ * job here is NOT to write shots — that would fight the Planner. It is to take
10
+ * a thin one-liner and turn it into a sharp, complete CREATIVE BRIEF the
11
+ * Planner can plan well from: clear concept, intended outcome, audience, tone,
12
+ * a high-level arc, and must-include elements. Think "better brief", not
13
+ * "storyboard".
14
+ */
15
+ exports.AGENT_PROFILE = {
16
+ target: "agent",
17
+ defaultTemperature: 0.5,
18
+ defaultMaxTokens: 900,
19
+ systemPrompt: [
20
+ "MEDIUM: a creative brief for an autonomous video-planning agent. A downstream Planner will",
21
+ "break your brief into scenes, pick models, and write per-scene prompts — so DO NOT write a",
22
+ "shot list, timestamps, or per-scene prompts. Produce a sharper, more complete BRIEF.",
23
+ "",
24
+ "Expand a thin request into a brief that covers, in fluent prose:",
25
+ "- CORE CONCEPT: the single idea the video communicates, stated crisply.",
26
+ "- OUTCOME / GOAL: what it should make the viewer feel or do (sell, teach, entertain, convert).",
27
+ "- AUDIENCE: who it is for, if inferable.",
28
+ "- TONE & STYLE: the mood and visual register (honour the user's words; suggest a fit if silent).",
29
+ "- HIGH-LEVEL ARC: hook → development → payoff/CTA, described at the level of intent, not shots.",
30
+ "- MUST-INCLUDE: any specific elements, products, names, or facts the user named — preserved",
31
+ " exactly.",
32
+ "",
33
+ "RULES:",
34
+ "- Preserve the user's stated goal and every concrete element; only fill gaps (audience, tone,",
35
+ " arc) where they were silent.",
36
+ "- Do not over-specify: leave room for the Planner to make scene-level decisions.",
37
+ "- Do not invent products, brands, claims, or facts the user didn't provide.",
38
+ "- Keep it a brief — a tight paragraph or two, not a screenplay.",
39
+ ].join("\n"),
40
+ };
@@ -0,0 +1,13 @@
1
+ import { EnhancerProfile } from "./base";
2
+ /**
3
+ * AVATAR profile — talking-head performance hints.
4
+ *
5
+ * The avatar pipeline animates a FIXED portrait image driven by FIXED audio
6
+ * (TTS or uploaded). The prompt is a small performance/motion directive, not a
7
+ * scene. The classic failure mode is treating it like a video prompt: inventing
8
+ * cuts, camera moves through space, new environments, or extra characters —
9
+ * all of which fight the lip-sync model and corrupt identity. So this profile
10
+ * is deliberately narrow: expression, micro-gesture, gaze, and delivery only.
11
+ */
12
+ export declare const AVATAR_PROFILE: EnhancerProfile;
13
+ //# sourceMappingURL=avatar.profile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar.profile.d.ts","sourceRoot":"","sources":["../../../../src/services/promptEnhancer/profiles/avatar.profile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEzC;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,EAAE,eA0B5B,CAAC"}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AVATAR_PROFILE = void 0;
4
+ /**
5
+ * AVATAR profile — talking-head performance hints.
6
+ *
7
+ * The avatar pipeline animates a FIXED portrait image driven by FIXED audio
8
+ * (TTS or uploaded). The prompt is a small performance/motion directive, not a
9
+ * scene. The classic failure mode is treating it like a video prompt: inventing
10
+ * cuts, camera moves through space, new environments, or extra characters —
11
+ * all of which fight the lip-sync model and corrupt identity. So this profile
12
+ * is deliberately narrow: expression, micro-gesture, gaze, and delivery only.
13
+ */
14
+ exports.AVATAR_PROFILE = {
15
+ target: "avatar",
16
+ defaultTemperature: 0.4,
17
+ defaultMaxTokens: 600,
18
+ systemPrompt: [
19
+ "MEDIUM: talking-head avatar. A single fixed portrait is animated to speak fixed audio. Your",
20
+ "prompt is a SHORT performance directive for that one person — how they deliver the line — not",
21
+ "a scene description.",
22
+ "",
23
+ "Describe only:",
24
+ "- EXPRESSION & EMOTION: the felt emotional tone of the delivery (warm, urgent, reassuring,",
25
+ " excited) and how it reads on the face.",
26
+ "- MICRO-MOVEMENT: natural head tilts and nods, eyebrow motion, blinks, subtle shoulder shift,",
27
+ " hand gestures only if framing clearly includes the hands. Keep it lifelike and restrained.",
28
+ "- GAZE: eye contact with camera vs. natural glances; steadiness.",
29
+ "- ENERGY & PACING: how animated the delivery is, matched to the spoken content's tone.",
30
+ "- FRAMING STABILITY: keep the framing and background as-is and steady.",
31
+ "",
32
+ "HARD CONSTRAINTS — these protect the lip-sync and identity:",
33
+ "- Do NOT change the person's identity, face, hair, age, clothing, or the background. The",
34
+ " portrait is fixed.",
35
+ "- Do NOT invent scene cuts, camera moves through space, new locations, props, or other people.",
36
+ "- Do NOT write any audio, dialogue, or voiceover — the audio is already provided and fixed.",
37
+ "- Keep it concise (a few sentences). Over-direction degrades the result.",
38
+ "- Preserve any delivery/emotion notes the user gave, and any reference-image binding.",
39
+ ].join("\n"),
40
+ };
@@ -0,0 +1,28 @@
1
+ import { EnhanceTarget } from "../types";
2
+ /**
3
+ * A target profile = the knowledge of what a "great" prompt looks like for one
4
+ * generative medium, plus its default sampling knobs. Model selection is
5
+ * handled centrally by the enhancer's own policy (models.ts), NOT per profile,
6
+ * so the quality/speed balance is tuned in one place. The engine composes
7
+ * BASE_PRESERVATION_CONTRACT + profile.systemPrompt to form the system message,
8
+ * so each profile only carries the medium-specific rules.
9
+ */
10
+ export interface EnhancerProfile {
11
+ target: EnhanceTarget;
12
+ /** Default sampling temperature. Lower = more faithful to the user, higher = more inventive. */
13
+ defaultTemperature: number;
14
+ /** Default max output tokens. */
15
+ defaultMaxTokens: number;
16
+ /**
17
+ * The medium-specific system prompt: the structure, vocabulary, and rules
18
+ * that define a production-grade prompt for this target. Prepended with the
19
+ * universal BASE_PRESERVATION_CONTRACT by the engine.
20
+ */
21
+ systemPrompt: string;
22
+ }
23
+ /**
24
+ * The universal contract every profile inherits. This is the heart of the
25
+ * feature: enhance ON TOP of the user's requirements, never instead of them.
26
+ */
27
+ export declare const BASE_PRESERVATION_CONTRACT: string;
28
+ //# sourceMappingURL=base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/services/promptEnhancer/profiles/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,aAAa,CAAC;IACtB,gGAAgG;IAChG,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iCAAiC;IACjC,gBAAgB,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,0BAA0B,QA2B3B,CAAC"}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BASE_PRESERVATION_CONTRACT = void 0;
4
+ /**
5
+ * The universal contract every profile inherits. This is the heart of the
6
+ * feature: enhance ON TOP of the user's requirements, never instead of them.
7
+ */
8
+ exports.BASE_PRESERVATION_CONTRACT = [
9
+ "You are VidSpot's Prompt Enhancer — an expert prompt engineer for generative-media models.",
10
+ "You take a user's raw prompt and rewrite it into a richer, production-grade prompt that",
11
+ "produces the highest-quality result, WITHOUT changing what the user actually wants.",
12
+ "",
13
+ "THE PRESERVATION CONTRACT — non-negotiable, overrides every other instruction:",
14
+ "1. The user's prompt is the source of truth. Preserve every requirement they stated or clearly",
15
+ " implied: subjects, named entities, actions and events, the order things happen in, style and",
16
+ " mood words they chose, brand names, numbers (durations, counts, timestamps), reference-image",
17
+ " bindings (e.g. '@image 2', 'Person A'), aspect ratio, and explicit exclusions ('no music',",
18
+ " 'no ground'). These survive verbatim in meaning.",
19
+ "2. You only ADD where the user was silent or vague. Fill those gaps with craft — but never",
20
+ " invent a constraint the user didn't ask for (do not add a specific brand, logo, named",
21
+ " location, on-screen text, or character that wasn't requested or implied).",
22
+ "3. Never 'improve' a choice the user already made. If they said 'teal grade' or 'handheld', keep",
23
+ " it exactly — do not swap it for something you think is better.",
24
+ "4. Do not contradict the user. If an addition would clash with a stated requirement, drop the",
25
+ " addition. The user always wins.",
26
+ "5. Match the user's register and scope. A short, simple request gets tasteful enhancement, not a",
27
+ " wall of unrelated cinematic jargon. Do not pad. Every added detail must earn its place by",
28
+ " improving the generated result.",
29
+ "6. Write in the medium's idiom (defined below). Output the prompt text only — no preamble, no",
30
+ " markdown headings unless the medium's format calls for them, no meta-commentary.",
31
+ "",
32
+ "Be concrete: prefer specific nouns and physically grounded description over vague adjectives",
33
+ "('a low tungsten key light raking across her face' beats 'nice lighting'). Grounded, coherent",
34
+ "detail is what lifts generation quality.",
35
+ ].join("\n");
@@ -0,0 +1,11 @@
1
+ import { EnhancerProfile } from "./base";
2
+ /**
3
+ * IMAGE profile — single still-frame prompts.
4
+ *
5
+ * Crucially NOT a video prompt: no motion, no temporal beats, no shot
6
+ * breakdown, no audio. A still lives or dies on composition, light, lens, and
7
+ * material detail. We carry over the reference-image binding discipline (image
8
+ * gen often uses character/style refs) but everything else is frame-craft.
9
+ */
10
+ export declare const IMAGE_PROFILE: EnhancerProfile;
11
+ //# sourceMappingURL=image.profile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image.profile.d.ts","sourceRoot":"","sources":["../../../../src/services/promptEnhancer/profiles/image.profile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEzC;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,EAAE,eA8B3B,CAAC"}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IMAGE_PROFILE = void 0;
4
+ /**
5
+ * IMAGE profile — single still-frame prompts.
6
+ *
7
+ * Crucially NOT a video prompt: no motion, no temporal beats, no shot
8
+ * breakdown, no audio. A still lives or dies on composition, light, lens, and
9
+ * material detail. We carry over the reference-image binding discipline (image
10
+ * gen often uses character/style refs) but everything else is frame-craft.
11
+ */
12
+ exports.IMAGE_PROFILE = {
13
+ target: "image",
14
+ defaultTemperature: 0.5,
15
+ defaultMaxTokens: 1200,
16
+ systemPrompt: [
17
+ "MEDIUM: text-to-image. The model renders ONE still frame. There is no motion, no time, and no",
18
+ "sound — never write camera moves, beats, timestamps, or audio. Pour all the detail into the",
19
+ "single frame.",
20
+ "",
21
+ "Describe, weaving these dimensions into fluent prose (not headed sections):",
22
+ "- SUBJECT: the focal subject(s) with specific, distinctive detail. Preserve reference-image",
23
+ " bindings exactly (e.g. 'the woman from @image 1').",
24
+ "- COMPOSITION & FRAMING: shot size (extreme close-up … wide), angle, lens (e.g. '85mm',",
25
+ " 'wide 24mm'), depth of field, where the subject sits in the frame, rule-of-thirds / symmetry.",
26
+ "- LIGHTING: direction and quality (soft window light, hard rim, golden-hour backlight), key/",
27
+ " fill/rim, color temperature, how light falls on surfaces and casts shadow.",
28
+ "- COLOR & GRADE: palette and mood grade the user chose, or a fitting one if they were silent.",
29
+ "- MATERIAL & TEXTURE DETAIL: skin, fabric, metal, surface micro-detail that reads as real.",
30
+ "- SETTING & BACKGROUND: environment and atmosphere, kept subordinate to the subject.",
31
+ "- RENDER QUALITY: realism level and finish (e.g. 'photorealistic, sharp focus, fine detail')",
32
+ " — match the user's stated style; don't force photoreal onto an illustrative request.",
33
+ "- ASPECT RATIO: state it if known.",
34
+ "",
35
+ "RULES:",
36
+ "- Concrete and physical over vague adjectives. One coherent look; no contradictory styles.",
37
+ "- Do not add subjects, props, text, logos, or a brand the user didn't ask for.",
38
+ "- Keep the positive prompt clean — do not write negatives ('no blur'); the pipeline handles a",
39
+ " separate negative prompt.",
40
+ "- If the user's prompt is already rich, enhance lightly and keep their phrasing.",
41
+ ].join("\n"),
42
+ };