@juspay/neurolink 9.63.1 → 9.65.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (358) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +18 -17
  3. package/dist/adapters/providerImageAdapter.js +29 -1
  4. package/dist/adapters/replicate/auth.d.ts +19 -0
  5. package/dist/adapters/replicate/auth.js +32 -0
  6. package/dist/adapters/replicate/predictionLifecycle.d.ts +46 -0
  7. package/dist/adapters/replicate/predictionLifecycle.js +283 -0
  8. package/dist/adapters/video/klingVideoHandler.d.ts +37 -0
  9. package/dist/adapters/video/klingVideoHandler.js +305 -0
  10. package/dist/adapters/video/replicateVideoHandler.d.ts +29 -0
  11. package/dist/adapters/video/replicateVideoHandler.js +157 -0
  12. package/dist/adapters/video/runwayVideoHandler.d.ts +32 -0
  13. package/dist/adapters/video/runwayVideoHandler.js +316 -0
  14. package/dist/adapters/video/vertexVideoHandler.d.ts +19 -1
  15. package/dist/adapters/video/vertexVideoHandler.js +42 -11
  16. package/dist/autoresearch/runner.js +8 -2
  17. package/dist/avatar/index.d.ts +13 -0
  18. package/dist/avatar/index.js +13 -0
  19. package/dist/avatar/providers/DIDAvatar.d.ts +49 -0
  20. package/dist/avatar/providers/DIDAvatar.js +501 -0
  21. package/dist/avatar/providers/HeyGenAvatar.d.ts +30 -0
  22. package/dist/avatar/providers/HeyGenAvatar.js +337 -0
  23. package/dist/avatar/providers/ReplicateAvatar.d.ts +36 -0
  24. package/dist/avatar/providers/ReplicateAvatar.js +267 -0
  25. package/dist/browser/neurolink.min.js +573 -554
  26. package/dist/cli/commands/mcp.js +29 -0
  27. package/dist/cli/commands/proxy.js +24 -5
  28. package/dist/cli/factories/commandFactory.d.ts +25 -1
  29. package/dist/cli/factories/commandFactory.js +341 -63
  30. package/dist/cli/loop/optionsSchema.d.ts +1 -1
  31. package/dist/cli/loop/optionsSchema.js +12 -0
  32. package/dist/constants/contextWindows.js +101 -0
  33. package/dist/constants/enums.d.ts +273 -2
  34. package/dist/constants/enums.js +290 -1
  35. package/dist/constants/videoErrors.d.ts +4 -0
  36. package/dist/constants/videoErrors.js +4 -0
  37. package/dist/core/baseProvider.d.ts +23 -3
  38. package/dist/core/baseProvider.js +217 -11
  39. package/dist/core/constants.d.ts +11 -0
  40. package/dist/core/constants.js +69 -1
  41. package/dist/core/modules/MessageBuilder.js +20 -0
  42. package/dist/core/redisConversationMemoryManager.js +6 -0
  43. package/dist/evaluation/index.d.ts +2 -0
  44. package/dist/evaluation/index.js +4 -0
  45. package/dist/factories/providerFactory.js +7 -1
  46. package/dist/factories/providerRegistry.js +203 -2
  47. package/dist/features/ppt/contentPlanner.js +42 -14
  48. package/dist/index.d.ts +9 -1
  49. package/dist/index.js +16 -1
  50. package/dist/lib/adapters/providerImageAdapter.js +29 -1
  51. package/dist/lib/adapters/replicate/auth.d.ts +19 -0
  52. package/dist/lib/adapters/replicate/auth.js +33 -0
  53. package/dist/lib/adapters/replicate/predictionLifecycle.d.ts +46 -0
  54. package/dist/lib/adapters/replicate/predictionLifecycle.js +284 -0
  55. package/dist/lib/adapters/video/klingVideoHandler.d.ts +37 -0
  56. package/dist/lib/adapters/video/klingVideoHandler.js +306 -0
  57. package/dist/lib/adapters/video/replicateVideoHandler.d.ts +29 -0
  58. package/dist/lib/adapters/video/replicateVideoHandler.js +158 -0
  59. package/dist/lib/adapters/video/runwayVideoHandler.d.ts +32 -0
  60. package/dist/lib/adapters/video/runwayVideoHandler.js +317 -0
  61. package/dist/lib/adapters/video/vertexVideoHandler.d.ts +19 -1
  62. package/dist/lib/adapters/video/vertexVideoHandler.js +42 -11
  63. package/dist/lib/autoresearch/runner.js +8 -2
  64. package/dist/lib/avatar/index.d.ts +13 -0
  65. package/dist/lib/avatar/index.js +14 -0
  66. package/dist/lib/avatar/providers/DIDAvatar.d.ts +49 -0
  67. package/dist/lib/avatar/providers/DIDAvatar.js +502 -0
  68. package/dist/lib/avatar/providers/HeyGenAvatar.d.ts +30 -0
  69. package/dist/lib/avatar/providers/HeyGenAvatar.js +338 -0
  70. package/dist/lib/avatar/providers/ReplicateAvatar.d.ts +36 -0
  71. package/dist/lib/avatar/providers/ReplicateAvatar.js +268 -0
  72. package/dist/lib/constants/contextWindows.js +101 -0
  73. package/dist/lib/constants/enums.d.ts +273 -2
  74. package/dist/lib/constants/enums.js +290 -1
  75. package/dist/lib/constants/videoErrors.d.ts +4 -0
  76. package/dist/lib/constants/videoErrors.js +4 -0
  77. package/dist/lib/core/baseProvider.d.ts +23 -3
  78. package/dist/lib/core/baseProvider.js +217 -11
  79. package/dist/lib/core/constants.d.ts +11 -0
  80. package/dist/lib/core/constants.js +69 -1
  81. package/dist/lib/core/modules/MessageBuilder.js +20 -0
  82. package/dist/lib/core/redisConversationMemoryManager.js +6 -0
  83. package/dist/lib/evaluation/index.d.ts +2 -0
  84. package/dist/lib/evaluation/index.js +4 -0
  85. package/dist/lib/factories/providerFactory.js +7 -1
  86. package/dist/lib/factories/providerRegistry.js +203 -2
  87. package/dist/lib/features/ppt/contentPlanner.js +42 -14
  88. package/dist/lib/index.d.ts +9 -1
  89. package/dist/lib/index.js +16 -1
  90. package/dist/lib/memory/hippocampusInitializer.d.ts +2 -2
  91. package/dist/lib/memory/hippocampusInitializer.js +32 -2
  92. package/dist/lib/middleware/builtin/lifecycle.js +52 -51
  93. package/dist/lib/music/index.d.ts +13 -0
  94. package/dist/lib/music/index.js +14 -0
  95. package/dist/lib/music/providers/BeatovenMusic.d.ts +31 -0
  96. package/dist/lib/music/providers/BeatovenMusic.js +334 -0
  97. package/dist/lib/music/providers/ElevenLabsMusic.d.ts +30 -0
  98. package/dist/lib/music/providers/ElevenLabsMusic.js +169 -0
  99. package/dist/lib/music/providers/LyriaMusic.d.ts +29 -0
  100. package/dist/lib/music/providers/LyriaMusic.js +173 -0
  101. package/dist/lib/music/providers/ReplicateMusic.d.ts +31 -0
  102. package/dist/lib/music/providers/ReplicateMusic.js +262 -0
  103. package/dist/lib/neurolink.d.ts +30 -0
  104. package/dist/lib/neurolink.js +342 -49
  105. package/dist/lib/providers/amazonBedrock.d.ts +10 -0
  106. package/dist/lib/providers/amazonBedrock.js +94 -39
  107. package/dist/lib/providers/anthropic.js +55 -7
  108. package/dist/lib/providers/anthropicBaseProvider.js +1 -1
  109. package/dist/lib/providers/azureOpenai.js +66 -17
  110. package/dist/lib/providers/cloudflare.d.ts +35 -0
  111. package/dist/lib/providers/cloudflare.js +174 -0
  112. package/dist/lib/providers/cohere.d.ts +52 -0
  113. package/dist/lib/providers/cohere.js +253 -0
  114. package/dist/lib/providers/deepseek.js +72 -17
  115. package/dist/lib/providers/fireworks.d.ts +33 -0
  116. package/dist/lib/providers/fireworks.js +164 -0
  117. package/dist/lib/providers/googleAiStudio.d.ts +11 -3
  118. package/dist/lib/providers/googleAiStudio.js +336 -344
  119. package/dist/lib/providers/googleNativeGemini3.d.ts +107 -2
  120. package/dist/lib/providers/googleNativeGemini3.js +381 -25
  121. package/dist/lib/providers/googleVertex.d.ts +116 -129
  122. package/dist/lib/providers/googleVertex.js +3002 -1988
  123. package/dist/lib/providers/groq.d.ts +33 -0
  124. package/dist/lib/providers/groq.js +181 -0
  125. package/dist/lib/providers/huggingFace.js +9 -8
  126. package/dist/lib/providers/ideogram.d.ts +34 -0
  127. package/dist/lib/providers/ideogram.js +184 -0
  128. package/dist/lib/providers/index.d.ts +13 -0
  129. package/dist/lib/providers/index.js +13 -0
  130. package/dist/lib/providers/jina.d.ts +59 -0
  131. package/dist/lib/providers/jina.js +218 -0
  132. package/dist/lib/providers/llamaCpp.js +14 -46
  133. package/dist/lib/providers/lmStudio.js +14 -47
  134. package/dist/lib/providers/mistral.js +7 -7
  135. package/dist/lib/providers/nvidiaNim.js +160 -19
  136. package/dist/lib/providers/ollama.js +7 -7
  137. package/dist/lib/providers/openAI.d.ts +22 -1
  138. package/dist/lib/providers/openAI.js +181 -0
  139. package/dist/lib/providers/openRouter.js +38 -22
  140. package/dist/lib/providers/openaiCompatible.js +9 -8
  141. package/dist/lib/providers/perplexity.d.ts +33 -0
  142. package/dist/lib/providers/perplexity.js +179 -0
  143. package/dist/lib/providers/recraft.d.ts +34 -0
  144. package/dist/lib/providers/recraft.js +197 -0
  145. package/dist/lib/providers/replicate.d.ts +75 -0
  146. package/dist/lib/providers/replicate.js +403 -0
  147. package/dist/lib/providers/stability.d.ts +37 -0
  148. package/dist/lib/providers/stability.js +191 -0
  149. package/dist/lib/providers/togetherAi.d.ts +33 -0
  150. package/dist/lib/providers/togetherAi.js +176 -0
  151. package/dist/lib/providers/voyage.d.ts +47 -0
  152. package/dist/lib/providers/voyage.js +177 -0
  153. package/dist/lib/providers/xai.d.ts +33 -0
  154. package/dist/lib/providers/xai.js +172 -0
  155. package/dist/lib/telemetry/index.d.ts +1 -1
  156. package/dist/lib/telemetry/index.js +1 -1
  157. package/dist/lib/telemetry/tracers.d.ts +19 -0
  158. package/dist/lib/telemetry/tracers.js +19 -0
  159. package/dist/lib/telemetry/withSpan.d.ts +35 -0
  160. package/dist/lib/telemetry/withSpan.js +103 -0
  161. package/dist/lib/types/aliases.d.ts +14 -0
  162. package/dist/lib/types/avatar.d.ts +143 -0
  163. package/dist/lib/types/avatar.js +20 -0
  164. package/dist/lib/types/cli.d.ts +6 -0
  165. package/dist/lib/types/common.d.ts +0 -3
  166. package/dist/lib/types/conversation.d.ts +10 -3
  167. package/dist/lib/types/generate.d.ts +76 -5
  168. package/dist/lib/types/index.d.ts +6 -0
  169. package/dist/lib/types/index.js +8 -0
  170. package/dist/lib/types/memory.d.ts +96 -0
  171. package/dist/lib/types/memory.js +23 -0
  172. package/dist/lib/types/middleware.d.ts +27 -0
  173. package/dist/lib/types/multimodal.d.ts +35 -2
  174. package/dist/lib/types/music.d.ts +165 -0
  175. package/dist/lib/types/music.js +21 -0
  176. package/dist/lib/types/providers.d.ts +284 -3
  177. package/dist/lib/types/replicate.d.ts +67 -0
  178. package/dist/lib/types/replicate.js +10 -0
  179. package/dist/lib/types/safeFetch.d.ts +15 -0
  180. package/dist/lib/types/safeFetch.js +7 -0
  181. package/dist/lib/types/stream.d.ts +8 -1
  182. package/dist/lib/types/tools.d.ts +13 -0
  183. package/dist/lib/types/video.d.ts +89 -0
  184. package/dist/lib/types/video.js +15 -0
  185. package/dist/lib/utils/avatarProcessor.d.ts +68 -0
  186. package/dist/lib/utils/avatarProcessor.js +172 -0
  187. package/dist/lib/utils/cloneOptions.d.ts +36 -0
  188. package/dist/lib/utils/cloneOptions.js +62 -0
  189. package/dist/lib/utils/lifecycleCallbacks.d.ts +56 -0
  190. package/dist/lib/utils/lifecycleCallbacks.js +100 -0
  191. package/dist/lib/utils/lifecycleTimeout.d.ts +25 -0
  192. package/dist/lib/utils/lifecycleTimeout.js +39 -0
  193. package/dist/lib/utils/logSanitize.d.ts +49 -0
  194. package/dist/lib/utils/logSanitize.js +170 -0
  195. package/dist/lib/utils/loggingFetch.d.ts +29 -0
  196. package/dist/lib/utils/loggingFetch.js +60 -0
  197. package/dist/lib/utils/messageBuilder.d.ts +10 -0
  198. package/dist/lib/utils/messageBuilder.js +83 -30
  199. package/dist/lib/utils/modelChoices.js +236 -3
  200. package/dist/lib/utils/modelDetection.d.ts +11 -0
  201. package/dist/lib/utils/modelDetection.js +27 -0
  202. package/dist/lib/utils/musicProcessor.d.ts +67 -0
  203. package/dist/lib/utils/musicProcessor.js +189 -0
  204. package/dist/lib/utils/optionsConversion.js +3 -2
  205. package/dist/lib/utils/parameterValidation.js +14 -4
  206. package/dist/lib/utils/pricing.js +193 -0
  207. package/dist/lib/utils/providerConfig.d.ts +55 -0
  208. package/dist/lib/utils/providerConfig.js +224 -0
  209. package/dist/lib/utils/providerHealth.js +7 -7
  210. package/dist/lib/utils/safeFetch.d.ts +26 -0
  211. package/dist/lib/utils/safeFetch.js +83 -0
  212. package/dist/lib/utils/schemaConversion.d.ts +1 -1
  213. package/dist/lib/utils/schemaConversion.js +59 -4
  214. package/dist/lib/utils/sizeGuard.d.ts +34 -0
  215. package/dist/lib/utils/sizeGuard.js +45 -0
  216. package/dist/lib/utils/ssrfGuard.d.ts +52 -0
  217. package/dist/lib/utils/ssrfGuard.js +411 -0
  218. package/dist/lib/utils/tokenLimits.js +23 -32
  219. package/dist/lib/utils/videoProcessor.d.ts +60 -0
  220. package/dist/lib/utils/videoProcessor.js +201 -0
  221. package/dist/lib/voice/providers/FishAudioTTS.d.ts +27 -0
  222. package/dist/lib/voice/providers/FishAudioTTS.js +183 -0
  223. package/dist/lib/workflow/core/ensembleExecutor.js +26 -9
  224. package/dist/memory/hippocampusInitializer.d.ts +2 -2
  225. package/dist/memory/hippocampusInitializer.js +32 -2
  226. package/dist/middleware/builtin/lifecycle.js +52 -51
  227. package/dist/music/index.d.ts +13 -0
  228. package/dist/music/index.js +13 -0
  229. package/dist/music/providers/BeatovenMusic.d.ts +31 -0
  230. package/dist/music/providers/BeatovenMusic.js +333 -0
  231. package/dist/music/providers/ElevenLabsMusic.d.ts +30 -0
  232. package/dist/music/providers/ElevenLabsMusic.js +168 -0
  233. package/dist/music/providers/LyriaMusic.d.ts +29 -0
  234. package/dist/music/providers/LyriaMusic.js +172 -0
  235. package/dist/music/providers/ReplicateMusic.d.ts +31 -0
  236. package/dist/music/providers/ReplicateMusic.js +261 -0
  237. package/dist/neurolink.d.ts +30 -0
  238. package/dist/neurolink.js +342 -49
  239. package/dist/providers/amazonBedrock.d.ts +10 -0
  240. package/dist/providers/amazonBedrock.js +94 -39
  241. package/dist/providers/anthropic.js +55 -7
  242. package/dist/providers/anthropicBaseProvider.js +1 -1
  243. package/dist/providers/azureOpenai.js +66 -17
  244. package/dist/providers/cloudflare.d.ts +35 -0
  245. package/dist/providers/cloudflare.js +173 -0
  246. package/dist/providers/cohere.d.ts +52 -0
  247. package/dist/providers/cohere.js +252 -0
  248. package/dist/providers/deepseek.js +72 -17
  249. package/dist/providers/fireworks.d.ts +33 -0
  250. package/dist/providers/fireworks.js +163 -0
  251. package/dist/providers/googleAiStudio.d.ts +11 -3
  252. package/dist/providers/googleAiStudio.js +335 -344
  253. package/dist/providers/googleNativeGemini3.d.ts +107 -2
  254. package/dist/providers/googleNativeGemini3.js +381 -25
  255. package/dist/providers/googleVertex.d.ts +116 -129
  256. package/dist/providers/googleVertex.js +3000 -1987
  257. package/dist/providers/groq.d.ts +33 -0
  258. package/dist/providers/groq.js +180 -0
  259. package/dist/providers/huggingFace.js +9 -8
  260. package/dist/providers/ideogram.d.ts +34 -0
  261. package/dist/providers/ideogram.js +183 -0
  262. package/dist/providers/index.d.ts +13 -0
  263. package/dist/providers/index.js +13 -0
  264. package/dist/providers/jina.d.ts +59 -0
  265. package/dist/providers/jina.js +217 -0
  266. package/dist/providers/llamaCpp.js +14 -46
  267. package/dist/providers/lmStudio.js +14 -47
  268. package/dist/providers/mistral.js +7 -7
  269. package/dist/providers/nvidiaNim.js +160 -19
  270. package/dist/providers/ollama.js +7 -7
  271. package/dist/providers/openAI.d.ts +22 -1
  272. package/dist/providers/openAI.js +181 -0
  273. package/dist/providers/openRouter.js +38 -22
  274. package/dist/providers/openaiCompatible.js +9 -8
  275. package/dist/providers/perplexity.d.ts +33 -0
  276. package/dist/providers/perplexity.js +178 -0
  277. package/dist/providers/recraft.d.ts +34 -0
  278. package/dist/providers/recraft.js +196 -0
  279. package/dist/providers/replicate.d.ts +75 -0
  280. package/dist/providers/replicate.js +402 -0
  281. package/dist/providers/stability.d.ts +37 -0
  282. package/dist/providers/stability.js +190 -0
  283. package/dist/providers/togetherAi.d.ts +33 -0
  284. package/dist/providers/togetherAi.js +175 -0
  285. package/dist/providers/voyage.d.ts +47 -0
  286. package/dist/providers/voyage.js +176 -0
  287. package/dist/providers/xai.d.ts +33 -0
  288. package/dist/providers/xai.js +171 -0
  289. package/dist/telemetry/index.d.ts +1 -1
  290. package/dist/telemetry/index.js +1 -1
  291. package/dist/telemetry/tracers.d.ts +19 -0
  292. package/dist/telemetry/tracers.js +19 -0
  293. package/dist/telemetry/withSpan.d.ts +35 -0
  294. package/dist/telemetry/withSpan.js +103 -0
  295. package/dist/types/aliases.d.ts +14 -0
  296. package/dist/types/avatar.d.ts +143 -0
  297. package/dist/types/avatar.js +19 -0
  298. package/dist/types/cli.d.ts +6 -0
  299. package/dist/types/common.d.ts +0 -3
  300. package/dist/types/conversation.d.ts +10 -3
  301. package/dist/types/generate.d.ts +76 -5
  302. package/dist/types/index.d.ts +6 -0
  303. package/dist/types/index.js +8 -0
  304. package/dist/types/memory.d.ts +96 -0
  305. package/dist/types/memory.js +22 -0
  306. package/dist/types/middleware.d.ts +27 -0
  307. package/dist/types/multimodal.d.ts +35 -2
  308. package/dist/types/music.d.ts +165 -0
  309. package/dist/types/music.js +20 -0
  310. package/dist/types/providers.d.ts +284 -3
  311. package/dist/types/replicate.d.ts +67 -0
  312. package/dist/types/replicate.js +9 -0
  313. package/dist/types/safeFetch.d.ts +15 -0
  314. package/dist/types/safeFetch.js +6 -0
  315. package/dist/types/stream.d.ts +8 -1
  316. package/dist/types/tools.d.ts +13 -0
  317. package/dist/types/video.d.ts +89 -0
  318. package/dist/types/video.js +14 -0
  319. package/dist/utils/avatarProcessor.d.ts +68 -0
  320. package/dist/utils/avatarProcessor.js +171 -0
  321. package/dist/utils/cloneOptions.d.ts +36 -0
  322. package/dist/utils/cloneOptions.js +61 -0
  323. package/dist/utils/lifecycleCallbacks.d.ts +56 -0
  324. package/dist/utils/lifecycleCallbacks.js +99 -0
  325. package/dist/utils/lifecycleTimeout.d.ts +25 -0
  326. package/dist/utils/lifecycleTimeout.js +38 -0
  327. package/dist/utils/logSanitize.d.ts +49 -0
  328. package/dist/utils/logSanitize.js +169 -0
  329. package/dist/utils/loggingFetch.d.ts +29 -0
  330. package/dist/utils/loggingFetch.js +59 -0
  331. package/dist/utils/messageBuilder.d.ts +10 -0
  332. package/dist/utils/messageBuilder.js +83 -30
  333. package/dist/utils/modelChoices.js +236 -3
  334. package/dist/utils/modelDetection.d.ts +11 -0
  335. package/dist/utils/modelDetection.js +27 -0
  336. package/dist/utils/musicProcessor.d.ts +67 -0
  337. package/dist/utils/musicProcessor.js +188 -0
  338. package/dist/utils/optionsConversion.js +3 -2
  339. package/dist/utils/parameterValidation.js +14 -4
  340. package/dist/utils/pricing.js +193 -0
  341. package/dist/utils/providerConfig.d.ts +55 -0
  342. package/dist/utils/providerConfig.js +224 -0
  343. package/dist/utils/providerHealth.js +7 -7
  344. package/dist/utils/safeFetch.d.ts +26 -0
  345. package/dist/utils/safeFetch.js +82 -0
  346. package/dist/utils/schemaConversion.d.ts +1 -1
  347. package/dist/utils/schemaConversion.js +59 -4
  348. package/dist/utils/sizeGuard.d.ts +34 -0
  349. package/dist/utils/sizeGuard.js +44 -0
  350. package/dist/utils/ssrfGuard.d.ts +52 -0
  351. package/dist/utils/ssrfGuard.js +410 -0
  352. package/dist/utils/tokenLimits.js +23 -32
  353. package/dist/utils/videoProcessor.d.ts +60 -0
  354. package/dist/utils/videoProcessor.js +200 -0
  355. package/dist/voice/providers/FishAudioTTS.d.ts +27 -0
  356. package/dist/voice/providers/FishAudioTTS.js +182 -0
  357. package/dist/workflow/core/ensembleExecutor.js +26 -9
  358. package/package.json +42 -8
@@ -11,6 +11,8 @@ import type { DirectorModeOptions, DirectorSegment, VideoGenerationResult, Video
11
11
  import type { PPTGenerationResult, PPTOutputOptions } from "./ppt.js";
12
12
  import type { TTSOptions, TTSResult } from "./tts.js";
13
13
  import type { STTOptions, STTResult } from "./stt.js";
14
+ import type { AvatarOptions, AvatarResult } from "./avatar.js";
15
+ import type { MusicOptions, MusicResult } from "./music.js";
14
16
  import type { StandardRecord, ValidationSchema, ZodUnknownSchema } from "./aliases.js";
15
17
  import type { NeurolinkCredentials } from "./providers.js";
16
18
  import type { FileWithMetadata } from "./file.js";
@@ -20,8 +22,14 @@ import type { WorkflowConfig } from "./workflow.js";
20
22
  * Supports multimodal content while maintaining backward compatibility
21
23
  */
22
24
  export type GenerateOptions = {
23
- input: {
24
- text: string;
25
+ /**
26
+ * Input content for generation. Optional for media-only modes (avatar, music,
27
+ * video) where all configuration lives in `output`; the SDK synthesises an
28
+ * empty `input` automatically when this field is omitted.
29
+ */
30
+ input?: {
31
+ /** Prompt text. Optional for media-only modes (avatar, music) that are driven by uploaded files rather than a prompt. */
32
+ text?: string;
25
33
  /**
26
34
  * Images to include in the request.
27
35
  * Supports simple image data (Buffer, string) or objects with alt text for accessibility.
@@ -81,8 +89,10 @@ export type GenerateOptions = {
81
89
  * - "text": Standard text generation (default)
82
90
  * - "video": Video generation using models like Veo 3.1
83
91
  * - "ppt": PowerPoint presentation generation
92
+ * - "avatar": Talking-head / lip-sync video (D-ID, HeyGen, Replicate-MuseTalk)
93
+ * - "music": Music / sound generation (Beatoven, ElevenLabs Music, Lyria, Replicate)
84
94
  */
85
- mode?: "text" | "video" | "ppt";
95
+ mode?: "text" | "video" | "ppt" | "avatar" | "music";
86
96
  /**
87
97
  * Video generation configuration (used when mode is "video")
88
98
  * Requires an input image and text prompt
@@ -98,6 +108,17 @@ export type GenerateOptions = {
98
108
  * Controls transition prompts, durations, and concurrency.
99
109
  */
100
110
  director?: DirectorModeOptions;
111
+ /**
112
+ * Avatar generation configuration (used when mode is "avatar")
113
+ * Combines a portrait image with audio (or text via TTS) to produce
114
+ * a lip-synced talking-head video.
115
+ */
116
+ avatar?: AvatarOptions;
117
+ /**
118
+ * Music generation configuration (used when mode is "music")
119
+ * Generates music / sound from a text prompt.
120
+ */
121
+ music?: MusicOptions;
101
122
  };
102
123
  csvOptions?: {
103
124
  maxRows?: number;
@@ -217,6 +238,12 @@ export type GenerateOptions = {
217
238
  region?: string;
218
239
  temperature?: number;
219
240
  maxTokens?: number;
241
+ /** Top-p (nucleus) sampling parameter. Controls diversity of generated tokens. */
242
+ topP?: number;
243
+ /** Top-k sampling parameter. Limits the number of tokens considered. (Google/Gemini models only) */
244
+ topK?: number;
245
+ /** Stop sequences that will halt generation when encountered. */
246
+ stopSequences?: string[];
220
247
  systemPrompt?: string;
221
248
  /**
222
249
  * Zod schema for structured output validation
@@ -589,6 +616,14 @@ export type GenerateResult = {
589
616
  * ```
590
617
  */
591
618
  video?: VideoGenerationResult;
619
+ /**
620
+ * Avatar (talking-head) generation result (present when output.mode is "avatar")
621
+ */
622
+ avatar?: AvatarResult;
623
+ /**
624
+ * Music generation result (present when output.mode is "music")
625
+ */
626
+ music?: MusicResult;
592
627
  /**
593
628
  * PowerPoint generation result (present when output.mode is "ppt")
594
629
  *
@@ -737,7 +772,8 @@ export type TextGenerationOptions = {
737
772
  * Supports text, images, and other multimodal inputs.
738
773
  */
739
774
  input?: {
740
- text: string;
775
+ /** Prompt text. Optional for media-only modes (avatar, music) that are driven by uploaded files rather than a prompt. */
776
+ text?: string;
741
777
  /**
742
778
  * Images to include in the request.
743
779
  * For video generation, the first image is used as the source frame.
@@ -753,6 +789,12 @@ export type TextGenerationOptions = {
753
789
  region?: string;
754
790
  temperature?: number;
755
791
  maxTokens?: number;
792
+ /** Top-p (nucleus) sampling parameter. Controls diversity of generated tokens. */
793
+ topP?: number;
794
+ /** Top-k sampling parameter. Limits the number of tokens considered. (Google/Gemini models only) */
795
+ topK?: number;
796
+ /** Stop sequences that will halt generation when encountered. */
797
+ stopSequences?: string[];
756
798
  systemPrompt?: string;
757
799
  schema?: ZodUnknownSchema | Schema<unknown>;
758
800
  /**
@@ -773,8 +815,10 @@ export type TextGenerationOptions = {
773
815
  * - "text": Standard text generation (default)
774
816
  * - "video": Video generation using models like Veo 3.1
775
817
  * - "ppt": PowerPoint presentation generation
818
+ * - "avatar": Talking-head / lip-sync video (D-ID, HeyGen, Replicate-MuseTalk)
819
+ * - "music": Music / sound generation (Beatoven, ElevenLabs Music, Lyria, Replicate)
776
820
  */
777
- mode?: "text" | "video" | "ppt";
821
+ mode?: "text" | "video" | "ppt" | "avatar" | "music";
778
822
  /**
779
823
  * Video generation configuration (used when mode is "video")
780
824
  */
@@ -787,6 +831,14 @@ export type TextGenerationOptions = {
787
831
  * Director Mode configuration (only used when input.segments is provided)
788
832
  */
789
833
  director?: DirectorModeOptions;
834
+ /**
835
+ * Avatar generation configuration (used when mode is "avatar")
836
+ */
837
+ avatar?: AvatarOptions;
838
+ /**
839
+ * Music generation configuration (used when mode is "music")
840
+ */
841
+ music?: MusicOptions;
790
842
  };
791
843
  tools?: Record<string, Tool>;
792
844
  /**
@@ -926,6 +978,8 @@ export type TextGenerationOptions = {
926
978
  conversationMemoryConfig?: Partial<ConversationMemoryConfig>;
927
979
  originalPrompt?: string;
928
980
  middleware?: MiddlewareFactoryOptions;
981
+ onFinish?: OnFinishCallback;
982
+ onError?: OnErrorCallback;
929
983
  expectedOutcome?: string;
930
984
  evaluationCriteria?: string[];
931
985
  csvOptions?: {
@@ -1082,6 +1136,10 @@ export type TextGenerationResult = {
1082
1136
  transcription?: STTResult;
1083
1137
  /** Video generation result */
1084
1138
  video?: VideoGenerationResult;
1139
+ /** Avatar (talking-head) generation result */
1140
+ avatar?: AvatarResult;
1141
+ /** Music generation result */
1142
+ music?: MusicResult;
1085
1143
  /** PowerPoint generation result */
1086
1144
  ppt?: PPTGenerationResult;
1087
1145
  /** Image generation output */
@@ -1090,6 +1148,10 @@ export type TextGenerationResult = {
1090
1148
  } | null;
1091
1149
  /** Gemini 3 thought signature for reasoning continuity across turns */
1092
1150
  thoughtSignature?: string;
1151
+ /** Thinking/reasoning text from provider (Anthropic thinking blocks, Gemini thought parts, DeepSeek/NIM reasoning_content) */
1152
+ reasoning?: string;
1153
+ /** Token count for reasoning content */
1154
+ reasoningTokens?: number;
1093
1155
  retries?: {
1094
1156
  count: number;
1095
1157
  errors: Array<{
@@ -1116,3 +1178,12 @@ export type ModelAliasConfig = {
1116
1178
  reason?: string;
1117
1179
  }>;
1118
1180
  };
1181
+ /**
1182
+ * Internal alias used by messageBuilder helpers after the entry-point
1183
+ * (`buildMultimodalMessagesArray`) has guaranteed that `input` is non-null.
1184
+ * All private helper functions that receive post-normalised options should
1185
+ * accept this type to avoid repetitive null checks on every `input.*` access.
1186
+ */
1187
+ export type GenerateOptionsNormalized = GenerateOptions & {
1188
+ input: NonNullable<GenerateOptions["input"]>;
1189
+ };
@@ -30,6 +30,7 @@ export * from "./guardrails.js";
30
30
  export * from "./hitl.js";
31
31
  export * from "./mcp.js";
32
32
  export * from "./mcpOutput.js";
33
+ export * from "./memory.js";
33
34
  export * from "./middleware.js";
34
35
  export * from "./model.js";
35
36
  export * from "./multimodal.js";
@@ -59,3 +60,8 @@ export * from "./elicitation.js";
59
60
  export * from "./dynamic.js";
60
61
  export * from "./streamDedup.js";
61
62
  export * from "./noOutputSentinel.js";
63
+ export * from "./video.js";
64
+ export * from "./avatar.js";
65
+ export * from "./music.js";
66
+ export * from "./replicate.js";
67
+ export * from "./safeFetch.js";
@@ -31,6 +31,7 @@ export * from "./guardrails.js";
31
31
  export * from "./hitl.js";
32
32
  export * from "./mcp.js";
33
33
  export * from "./mcpOutput.js";
34
+ export * from "./memory.js";
34
35
  export * from "./middleware.js";
35
36
  export * from "./model.js";
36
37
  export * from "./multimodal.js";
@@ -64,4 +65,11 @@ export * from "./dynamic.js";
64
65
  export * from "./streamDedup.js";
65
66
  // Curator P3-6: NoOutputGeneratedError sentinel chunk shape
66
67
  export * from "./noOutputSentinel.js";
68
+ // New modality categories (M9.1+)
69
+ export * from "./video.js";
70
+ export * from "./avatar.js";
71
+ export * from "./music.js";
72
+ export * from "./replicate.js";
73
+ // Safe-fetch helper types (SSRF-hardened download)
74
+ export * from "./safeFetch.js";
67
75
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,96 @@
1
+ /**
2
+ * Local structural types for the optional @juspay/hippocampus integration.
3
+ *
4
+ * These mirror the public shapes that ship with @juspay/hippocampus's
5
+ * `dist/types.d.ts` so NeuroLink's public type surface stays compatible
6
+ * for consumers that already configure memory, while the runtime package
7
+ * itself becomes an optional peer dependency. The previous setup (a hard
8
+ * value import of @juspay/hippocampus) made pnpm pull a registry copy of
9
+ * @juspay/neurolink to satisfy Hippocampus's peer, which transitively
10
+ * dragged @ai-sdk/google + @ai-sdk/google-vertex into the production
11
+ * dependency graph.
12
+ *
13
+ * Naming:
14
+ * - Hippocampus's own `StorageType` and `RedisStorageConfig` collide with
15
+ * NeuroLink's in-house Redis manager types in `common.ts` /
16
+ * `conversation.ts`. To satisfy the `unique-type-names` ESLint rule,
17
+ * the storage variants get a `Memory*` prefix here.
18
+ * - `HippocampusMemory` (consumer-facing) and `StorageConfig` (legacy
19
+ * re-export) keep their original public names — only their definitions
20
+ * move from `import("@juspay/hippocampus").Foo` to local structural form.
21
+ */
22
+ export type MemorySqliteStorageConfig = {
23
+ type: "sqlite";
24
+ /** Path to SQLite file. Default: ./data/hippocampus.sqlite */
25
+ path?: string;
26
+ };
27
+ export type MemoryRedisStorageConfig = {
28
+ type: "redis";
29
+ host?: string;
30
+ port?: number;
31
+ password?: string;
32
+ db?: number;
33
+ keyPrefix?: string;
34
+ ttl?: number;
35
+ };
36
+ export type MemoryS3StorageConfig = {
37
+ type: "s3";
38
+ bucket: string;
39
+ prefix?: string;
40
+ };
41
+ export type MemoryCustomStorageConfig = {
42
+ type: "custom";
43
+ onGet: (ownerId: string) => Promise<string | null>;
44
+ onSet: (ownerId: string, memory: string) => Promise<void>;
45
+ onDelete: (ownerId: string) => Promise<void>;
46
+ onClose?: () => Promise<void>;
47
+ };
48
+ /**
49
+ * Storage configuration accepted by the optional Hippocampus client.
50
+ * Re-exported with the legacy `StorageConfig` name from `conversation.ts`
51
+ * to preserve the existing public type surface.
52
+ */
53
+ export type HippocampusStorageConfig = MemorySqliteStorageConfig | MemoryRedisStorageConfig | MemoryS3StorageConfig | MemoryCustomStorageConfig;
54
+ /** Per-call options accepted by `Hippocampus.add`. */
55
+ export type HippocampusAddOptions = {
56
+ prompt?: string;
57
+ maxWords?: number;
58
+ };
59
+ /** Constructor config accepted by the Hippocampus class. */
60
+ export type HippocampusConfig = {
61
+ storage?: HippocampusStorageConfig;
62
+ prompt?: string;
63
+ neurolink?: {
64
+ provider?: string;
65
+ model?: string;
66
+ temperature?: number;
67
+ };
68
+ maxWords?: number;
69
+ };
70
+ /**
71
+ * Subset of the @juspay/hippocampus client surface that NeuroLink core
72
+ * actually calls. Defining this locally lets the initializer / SDK code
73
+ * avoid a value or even a type import from the optional package.
74
+ */
75
+ export type HippocampusLike = {
76
+ add: (ownerId: string, content: string, options?: HippocampusAddOptions) => Promise<string>;
77
+ get: (ownerId: string) => Promise<string | null>;
78
+ delete: (ownerId: string) => Promise<void>;
79
+ close: () => Promise<void>;
80
+ };
81
+ /**
82
+ * Consumer-facing memory config. Same shape as before — the `enabled`
83
+ * flag toggles activation while the rest is passed straight through to
84
+ * the Hippocampus constructor when the optional package is installed.
85
+ */
86
+ export type HippocampusMemory = HippocampusConfig & {
87
+ enabled?: boolean;
88
+ };
89
+ /**
90
+ * Shape of the dynamically-required `@juspay/hippocampus` module surface
91
+ * that NeuroLink's lazy initializer reaches for. Only the constructor is
92
+ * surfaced here; the rest of the module is irrelevant to core.
93
+ */
94
+ export type HippocampusModule = {
95
+ Hippocampus: new (config?: HippocampusConfig) => HippocampusLike;
96
+ };
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Local structural types for the optional @juspay/hippocampus integration.
3
+ *
4
+ * These mirror the public shapes that ship with @juspay/hippocampus's
5
+ * `dist/types.d.ts` so NeuroLink's public type surface stays compatible
6
+ * for consumers that already configure memory, while the runtime package
7
+ * itself becomes an optional peer dependency. The previous setup (a hard
8
+ * value import of @juspay/hippocampus) made pnpm pull a registry copy of
9
+ * @juspay/neurolink to satisfy Hippocampus's peer, which transitively
10
+ * dragged @ai-sdk/google + @ai-sdk/google-vertex into the production
11
+ * dependency graph.
12
+ *
13
+ * Naming:
14
+ * - Hippocampus's own `StorageType` and `RedisStorageConfig` collide with
15
+ * NeuroLink's in-house Redis manager types in `common.ts` /
16
+ * `conversation.ts`. To satisfy the `unique-type-names` ESLint rule,
17
+ * the storage variants get a `Memory*` prefix here.
18
+ * - `HippocampusMemory` (consumer-facing) and `StorageConfig` (legacy
19
+ * re-export) keep their original public names — only their definitions
20
+ * move from `import("@juspay/hippocampus").Foo` to local structural form.
21
+ */
22
+ export {};
23
+ //# sourceMappingURL=memory.js.map
@@ -285,6 +285,33 @@ export type LifecycleMiddlewareConfig = {
285
285
  onFinish?: OnFinishCallback;
286
286
  onError?: OnErrorCallback;
287
287
  onChunk?: OnChunkCallback;
288
+ /**
289
+ * Per-callback deadline in milliseconds applied to every
290
+ * `onChunk` / `onFinish` / `onError` invocation. When a callback
291
+ * exceeds this it is logged and abandoned — generate()/stream()
292
+ * still resolves or rejects on schedule.
293
+ *
294
+ * Defaults to the `NEUROLINK_LIFECYCLE_TIMEOUT_MS` env var (also
295
+ * read by the CLI) and ultimately falls back to 5_000. Set `0`
296
+ * to make consumer callbacks effectively fire-and-forget.
297
+ */
298
+ timeoutMs?: number;
299
+ };
300
+ /**
301
+ * Structural view of the nested lifecycle config buried inside a request's
302
+ * middleware blob. Extracted so call sites that need to read it (e.g.
303
+ * `BaseProvider.wrapStreamWithLifecycleCallbacks`,
304
+ * `BaseProvider.fireLifecycleErrorCallback`) don't each inline the same
305
+ * three-level cast.
306
+ */
307
+ export type OptionsWithLifecycleMiddleware = {
308
+ middleware?: {
309
+ middlewareConfig?: {
310
+ lifecycle?: {
311
+ config?: LifecycleMiddlewareConfig;
312
+ };
313
+ };
314
+ };
288
315
  };
289
316
  /** Options for the abort-signal middleware. */
290
317
  export type AbortSignalMiddlewareOptions = {
@@ -141,14 +141,47 @@ export type AudioContent = {
141
141
  * ```
142
142
  */
143
143
  export type VideoOutputOptions = {
144
+ /**
145
+ * Per-call cancellation signal forwarded to provider requests and polling
146
+ * loops. When aborted, long-running video generation is interrupted and
147
+ * the handler throws a non-retriable abort error.
148
+ */
149
+ abortSignal?: AbortSignal;
150
+ /**
151
+ * Override the video-gen provider. Defaults to "vertex" or to the LLM
152
+ * provider name if it is also a registered video handler.
153
+ *
154
+ * Registered providers are managed via `VideoProcessor.registerHandler`
155
+ * (see src/lib/utils/videoProcessor.ts). Examples: "vertex", "kling",
156
+ * "runway", "replicate".
157
+ */
158
+ provider?: string;
159
+ /**
160
+ * Specific model to use within the provider. Provider-specific shape
161
+ * (e.g. "veo-3.1-generate-001" for vertex; "atonamy/wan-alpha:..." for
162
+ * replicate).
163
+ */
164
+ model?: string;
144
165
  /** Output resolution - "720p" (1280x720) or "1080p" (1920x1080) */
145
166
  resolution?: "720p" | "1080p";
146
167
  /** Video duration in seconds (4, 6, or 8 seconds supported) */
147
168
  length?: 4 | 6 | 8;
148
- /** Aspect ratio - "9:16" for portrait or "16:9" for landscape */
149
- aspectRatio?: "9:16" | "16:9";
169
+ /** Aspect ratio - "9:16" for portrait, "16:9" for landscape, "1:1" for square */
170
+ aspectRatio?: "9:16" | "16:9" | "1:1";
150
171
  /** Enable audio generation (default: true) */
151
172
  audio?: boolean;
173
+ /**
174
+ * Publicly accessible URL of the input image.
175
+ * Required by providers that do not accept inline base64 data (e.g. PiAPI Kling).
176
+ * When provided and the provider requires a URL, this takes precedence over the
177
+ * `image` Buffer argument passed to `generate()`.
178
+ */
179
+ imageUrl?: string;
180
+ /**
181
+ * Per-call provider credentials. Takes precedence over instance-level
182
+ * credentials set at construction time, which in turn override env vars.
183
+ */
184
+ credentials?: import("./providers.js").NeurolinkCredentials;
152
185
  };
153
186
  /**
154
187
  * A single segment in Director Mode, representing one video clip.
@@ -0,0 +1,165 @@
1
+ /**
2
+ * Music Generation Type Definitions
3
+ *
4
+ * Types for music / sound-effect generation across providers (Beatoven,
5
+ * ElevenLabs Music, Lyria, Replicate-hosted MusicGen / Riffusion / AudioGen).
6
+ *
7
+ * Music is a separate modality from TTS — TTS produces voiced speech with
8
+ * prosody; Music produces melodic / harmonic / textural audio.
9
+ *
10
+ * @module types/music
11
+ */
12
+ /**
13
+ * Output audio formats supported across music providers.
14
+ */
15
+ export type MusicAudioFormat = "mp3" | "wav" | "flac" | "ogg";
16
+ /**
17
+ * Music genre — provider-specific, free-text accepted.
18
+ *
19
+ * Common genres: "ambient", "cinematic", "rock", "pop", "jazz", "classical",
20
+ * "electronic", "lo-fi", "hip-hop", "orchestral", "synthwave", "folk".
21
+ */
22
+ export type MusicGenre = string;
23
+ /**
24
+ * Music mood — provider-specific, free-text accepted.
25
+ *
26
+ * Common moods: "uplifting", "melancholic", "tense", "calm", "energetic",
27
+ * "mysterious", "romantic", "epic".
28
+ */
29
+ export type MusicMood = string;
30
+ /**
31
+ * Options for music generation requests.
32
+ */
33
+ export type MusicOptions = {
34
+ /** Text prompt describing the music to generate (required). */
35
+ prompt: string;
36
+ /** Target duration in seconds. Provider-clamped to its supported range. */
37
+ duration?: number;
38
+ /** Output format (default: "mp3"). */
39
+ format?: MusicAudioFormat;
40
+ /** Genre hint (e.g. "ambient", "cinematic"). */
41
+ genre?: MusicGenre;
42
+ /** Mood / emotion hint (e.g. "uplifting", "tense"). */
43
+ mood?: MusicMood;
44
+ /** Tempo in BPM (provider-specific support). */
45
+ tempo?: number;
46
+ /** Override the music provider (e.g. "beatoven", "elevenlabs-music", "lyria", "replicate"). */
47
+ provider?: string;
48
+ /** Reference audio for melody / style guidance (Buffer or path). */
49
+ referenceAudio?: Buffer | string;
50
+ /** Output file path (optional — buffer is always returned in result). */
51
+ output?: string;
52
+ /** Per-call timeout in ms (default: 5 minutes). */
53
+ timeout?: number;
54
+ /** Provider-specific additional options. */
55
+ [key: string]: unknown;
56
+ };
57
+ /**
58
+ * Result of a music generation request.
59
+ */
60
+ export type MusicResult = {
61
+ /** Generated audio buffer. */
62
+ buffer: Buffer;
63
+ /** Output format. */
64
+ format: MusicAudioFormat;
65
+ /** File size in bytes. */
66
+ size: number;
67
+ /** Duration in seconds (when reported by the provider). */
68
+ duration?: number;
69
+ /** Provider used for generation. */
70
+ provider?: string;
71
+ /** Performance / request metadata. */
72
+ metadata?: {
73
+ /** Request latency in milliseconds. */
74
+ latency: number;
75
+ /** Provider name. */
76
+ provider?: string;
77
+ /** Model variant used (when applicable). */
78
+ model?: string;
79
+ /** Sample rate (when known). */
80
+ sampleRate?: number;
81
+ /** Bit rate (when known). */
82
+ bitRate?: number;
83
+ /** Track / job identifier from the upstream. */
84
+ jobId?: string;
85
+ /** Any additional provider-specific metadata. */
86
+ [key: string]: unknown;
87
+ };
88
+ };
89
+ /**
90
+ * Handler contract for music-generation providers.
91
+ *
92
+ * Implementations enforce their own timeouts. Recommended:
93
+ * - Per-request fetch timeout: 30 seconds
94
+ * - Total job-completion timeout: 5 minutes
95
+ */
96
+ export type MusicHandler = {
97
+ /**
98
+ * Generate a music track from prompt + options.
99
+ *
100
+ * @param options - prompt, duration, format, genre, mood, etc.
101
+ */
102
+ generate(options: MusicOptions): Promise<MusicResult>;
103
+ /**
104
+ * Validate the provider is configured (auth, base URL, etc.).
105
+ */
106
+ isConfigured(): boolean;
107
+ /** Maximum supported track duration in seconds (provider-specific). */
108
+ readonly maxDurationSeconds?: number;
109
+ /** Output formats supported by this handler. */
110
+ readonly supportedFormats?: readonly MusicAudioFormat[];
111
+ /** Genres / styles the upstream advertises (informational). */
112
+ readonly supportedGenres?: readonly string[];
113
+ };
114
+ /**
115
+ * Valid music audio formats — runtime validation array.
116
+ */
117
+ export declare const VALID_MUSIC_FORMATS: readonly MusicAudioFormat[];
118
+ /**
119
+ * Beatoven.ai task status response.
120
+ *
121
+ * Used by `BeatovenMusic` handler to type-check polling responses.
122
+ */
123
+ export type BeatovenTaskStatus = {
124
+ status: "composing" | "running" | "composed" | "failed";
125
+ meta?: {
126
+ track_url?: string;
127
+ project_id?: string;
128
+ track_id?: string;
129
+ duration?: number;
130
+ };
131
+ message?: string;
132
+ };
133
+ /**
134
+ * Beatoven.ai compose-track submit response.
135
+ */
136
+ export type BeatovenComposeResponse = {
137
+ task_id: string;
138
+ status?: string;
139
+ };
140
+ /**
141
+ * Google Lyria 3 Pro :generateContent response shape.
142
+ *
143
+ * The audio comes back as a part with `inlineData: { mimeType, data }`
144
+ * where `data` is base64-encoded WAV.
145
+ */
146
+ export type LyriaResponse = {
147
+ candidates?: {
148
+ content?: {
149
+ parts?: {
150
+ inlineData?: {
151
+ mimeType?: string;
152
+ data?: string;
153
+ };
154
+ text?: string;
155
+ }[];
156
+ };
157
+ finishReason?: string;
158
+ index?: number;
159
+ }[];
160
+ usageMetadata?: {
161
+ promptTokenCount?: number;
162
+ candidatesTokenCount?: number;
163
+ totalTokenCount?: number;
164
+ };
165
+ };
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Music Generation Type Definitions
3
+ *
4
+ * Types for music / sound-effect generation across providers (Beatoven,
5
+ * ElevenLabs Music, Lyria, Replicate-hosted MusicGen / Riffusion / AudioGen).
6
+ *
7
+ * Music is a separate modality from TTS — TTS produces voiced speech with
8
+ * prosody; Music produces melodic / harmonic / textural audio.
9
+ *
10
+ * @module types/music
11
+ */
12
+ /**
13
+ * Valid music audio formats — runtime validation array.
14
+ */
15
+ export const VALID_MUSIC_FORMATS = [
16
+ "mp3",
17
+ "wav",
18
+ "flac",
19
+ "ogg",
20
+ ];
21
+ //# sourceMappingURL=music.js.map