@gaia-framework/backend-core 6.0.1 → 7.1.0-rc.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 (730) hide show
  1. package/CHANGELOG.md +79 -0
  2. package/README.md +1 -1
  3. package/build/openapi/openapi.json +1596 -132
  4. package/build/openapi/openapi.yaml +1092 -102
  5. package/build/openapi/voice-media-worker.json +1 -1
  6. package/build/openapi/voice-media-worker.yaml +1 -1
  7. package/build/openapi/worker-health.json +1 -1
  8. package/build/openapi/worker-health.yaml +1 -1
  9. package/build/src/config/VoiceMediaConfig.d.ts +1 -0
  10. package/build/src/config/VoiceMediaConfig.d.ts.map +1 -1
  11. package/build/src/config/VoiceMediaConfig.js +5 -0
  12. package/build/src/config/VoiceMediaConfig.js.map +1 -1
  13. package/build/src/config/schema.d.ts +106 -7
  14. package/build/src/config/schema.d.ts.map +1 -1
  15. package/build/src/config/schema.js +79 -7
  16. package/build/src/config/schema.js.map +1 -1
  17. package/build/src/core/application/dtos/llms/responses/LLMInfoDto.d.ts +2 -1
  18. package/build/src/core/application/dtos/llms/responses/LLMInfoDto.d.ts.map +1 -1
  19. package/build/src/core/application/dtos/messages/responses/MessageDto.d.ts +2 -1
  20. package/build/src/core/application/dtos/messages/responses/MessageDto.d.ts.map +1 -1
  21. package/build/src/core/application/dtos/runs/CreateRunRequestDto.d.ts +2 -0
  22. package/build/src/core/application/dtos/runs/CreateRunRequestDto.d.ts.map +1 -1
  23. package/build/src/core/application/mappers/llms/LLMInfoMapper.d.ts.map +1 -1
  24. package/build/src/core/application/mappers/llms/LLMInfoMapper.js +2 -0
  25. package/build/src/core/application/mappers/llms/LLMInfoMapper.js.map +1 -1
  26. package/build/src/core/application/mappers/messages/MessageMapper.d.ts.map +1 -1
  27. package/build/src/core/application/mappers/messages/MessageMapper.js +2 -0
  28. package/build/src/core/application/mappers/messages/MessageMapper.js.map +1 -1
  29. package/build/src/core/application/services/media/DefaultContentMediaService.d.ts +1 -1
  30. package/build/src/core/application/services/media/DefaultContentMediaService.d.ts.map +1 -1
  31. package/build/src/core/application/services/media/DefaultContentMediaService.js +48 -15
  32. package/build/src/core/application/services/media/DefaultContentMediaService.js.map +1 -1
  33. package/build/src/core/application/services/media/ImageAppServiceImpl.js +1 -1
  34. package/build/src/core/application/services/media/ImageAppServiceImpl.js.map +1 -1
  35. package/build/src/core/application/services/media/ImageEditingAppService.d.ts +7 -1
  36. package/build/src/core/application/services/media/ImageEditingAppService.d.ts.map +1 -1
  37. package/build/src/core/application/services/media/ImageEditingAppServiceImpl.d.ts +6 -1
  38. package/build/src/core/application/services/media/ImageEditingAppServiceImpl.d.ts.map +1 -1
  39. package/build/src/core/application/services/media/ImageEditingAppServiceImpl.js +59 -5
  40. package/build/src/core/application/services/media/ImageEditingAppServiceImpl.js.map +1 -1
  41. package/build/src/core/application/services/media/SpeechAppService.d.ts +2 -1
  42. package/build/src/core/application/services/media/SpeechAppService.d.ts.map +1 -1
  43. package/build/src/core/application/services/media/SpeechAppServiceImpl.d.ts +1 -0
  44. package/build/src/core/application/services/media/SpeechAppServiceImpl.d.ts.map +1 -1
  45. package/build/src/core/application/services/media/SpeechAppServiceImpl.js +3 -0
  46. package/build/src/core/application/services/media/SpeechAppServiceImpl.js.map +1 -1
  47. package/build/src/core/application/services/media/VideoGenerationRequestService.js +2 -2
  48. package/build/src/core/application/services/media/VideoGenerationRequestService.js.map +1 -1
  49. package/build/src/core/application/services/realtime/RealtimeTranscriptSession.d.ts +3 -0
  50. package/build/src/core/application/services/realtime/RealtimeTranscriptSession.d.ts.map +1 -1
  51. package/build/src/core/application/services/realtime/RealtimeTranscriptSession.js +62 -0
  52. package/build/src/core/application/services/realtime/RealtimeTranscriptSession.js.map +1 -1
  53. package/build/src/core/application/services/runs/RunAppServiceImpl.d.ts +7 -3
  54. package/build/src/core/application/services/runs/RunAppServiceImpl.d.ts.map +1 -1
  55. package/build/src/core/application/services/runs/RunAppServiceImpl.js +79 -17
  56. package/build/src/core/application/services/runs/RunAppServiceImpl.js.map +1 -1
  57. package/build/src/core/application/services/runs/RunExecutionSessionFactoryImpl.js +1 -1
  58. package/build/src/core/application/services/runs/RunExecutionSessionFactoryImpl.js.map +1 -1
  59. package/build/src/core/application/services/tasks/ScheduledRunDispatchService.d.ts.map +1 -1
  60. package/build/src/core/application/services/tasks/ScheduledRunDispatchService.js +9 -2
  61. package/build/src/core/application/services/tasks/ScheduledRunDispatchService.js.map +1 -1
  62. package/build/src/core/application/services/voice/intake/VoiceTranscriptService.d.ts +1 -1
  63. package/build/src/core/application/services/voice/intake/VoiceTranscriptService.d.ts.map +1 -1
  64. package/build/src/core/application/services/voice/intake/VoiceTranscriptService.js +17 -14
  65. package/build/src/core/application/services/voice/intake/VoiceTranscriptService.js.map +1 -1
  66. package/build/src/core/application/services/voice/review/VoiceReviewInput.d.ts +1 -0
  67. package/build/src/core/application/services/voice/review/VoiceReviewInput.d.ts.map +1 -1
  68. package/build/src/core/application/services/voice/session/ActiveVoiceSession.d.ts +2 -0
  69. package/build/src/core/application/services/voice/session/ActiveVoiceSession.d.ts.map +1 -1
  70. package/build/src/core/application/services/voice/session/ActiveVoiceSession.js +37 -12
  71. package/build/src/core/application/services/voice/session/ActiveVoiceSession.js.map +1 -1
  72. package/build/src/core/application/services/voice/session/VoiceContextService.js +1 -1
  73. package/build/src/core/application/services/voice/session/VoiceContextService.js.map +1 -1
  74. package/build/src/core/application/services/voice/session/VoiceSessionAppService.js +1 -1
  75. package/build/src/core/application/services/voice/session/VoiceSessionAppService.js.map +1 -1
  76. package/build/src/core/domain/factories/speech/SpeechProviderFactory.d.ts +1 -0
  77. package/build/src/core/domain/factories/speech/SpeechProviderFactory.d.ts.map +1 -1
  78. package/build/src/core/domain/factories/speech/SpeechProviderFactory.js +3 -0
  79. package/build/src/core/domain/factories/speech/SpeechProviderFactory.js.map +1 -1
  80. package/build/src/core/domain/models/images/ImageEditing.d.ts +9 -0
  81. package/build/src/core/domain/models/images/ImageEditing.d.ts.map +1 -1
  82. package/build/src/core/domain/models/images/ImageEditing.js +2 -1
  83. package/build/src/core/domain/models/images/ImageEditing.js.map +1 -1
  84. package/build/src/core/domain/models/images/ImageOutputOptions.js +1 -1
  85. package/build/src/core/domain/models/llms/LLMInfo.d.ts +2 -1
  86. package/build/src/core/domain/models/llms/LLMInfo.d.ts.map +1 -1
  87. package/build/src/core/domain/models/messages/Message.d.ts +8 -0
  88. package/build/src/core/domain/models/messages/Message.d.ts.map +1 -1
  89. package/build/src/core/domain/models/runs/RunApproval.d.ts +1 -1
  90. package/build/src/core/domain/models/runs/RunApproval.d.ts.map +1 -1
  91. package/build/src/core/domain/models/runs/RunApproval.js.map +1 -1
  92. package/build/src/core/domain/models/speech/RealtimeTranslationLanguage.d.ts +10 -0
  93. package/build/src/core/domain/models/speech/RealtimeTranslationLanguage.d.ts.map +1 -1
  94. package/build/src/core/domain/models/speech/Transcription.d.ts +1 -0
  95. package/build/src/core/domain/models/speech/Transcription.d.ts.map +1 -1
  96. package/build/src/core/domain/models/tools/ToolExecutionContext.d.ts +2 -0
  97. package/build/src/core/domain/models/tools/ToolExecutionContext.d.ts.map +1 -1
  98. package/build/src/core/domain/models/videos/VideoGenerationRequest.d.ts +2 -0
  99. package/build/src/core/domain/models/videos/VideoGenerationRequest.d.ts.map +1 -1
  100. package/build/src/core/domain/models/videos/VideoGenerationRequest.js +5 -1
  101. package/build/src/core/domain/models/videos/VideoGenerationRequest.js.map +1 -1
  102. package/build/src/core/domain/models/voice/VoiceSession.d.ts +2 -0
  103. package/build/src/core/domain/models/voice/VoiceSession.d.ts.map +1 -1
  104. package/build/src/core/domain/params/chat/LLMExecutionRequest.d.ts +2 -0
  105. package/build/src/core/domain/params/chat/LLMExecutionRequest.d.ts.map +1 -1
  106. package/build/src/core/domain/ports/ai/images/ImageEditingProvider.d.ts +2 -0
  107. package/build/src/core/domain/ports/ai/images/ImageEditingProvider.d.ts.map +1 -1
  108. package/build/src/core/domain/ports/ai/llm/LLMProvider.d.ts +2 -0
  109. package/build/src/core/domain/ports/ai/llm/LLMProvider.d.ts.map +1 -1
  110. package/build/src/core/domain/ports/repositories/voice/VoiceSessionRepository.d.ts +3 -1
  111. package/build/src/core/domain/ports/repositories/voice/VoiceSessionRepository.d.ts.map +1 -1
  112. package/build/src/core/domain/ports/services/assurance/AssuranceEvaluationService.d.ts +1 -1
  113. package/build/src/core/domain/ports/services/assurance/AssuranceEvaluationService.d.ts.map +1 -1
  114. package/build/src/core/domain/ports/services/media/RemoteMediaFetcher.d.ts +1 -0
  115. package/build/src/core/domain/ports/services/media/RemoteMediaFetcher.d.ts.map +1 -1
  116. package/build/src/core/domain/ports/speech/RealtimeTranslationProvider.d.ts +2 -1
  117. package/build/src/core/domain/ports/speech/RealtimeTranslationProvider.d.ts.map +1 -1
  118. package/build/src/core/domain/services/chat/ConversationContextService.d.ts +1 -1
  119. package/build/src/core/domain/services/chat/ConversationContextService.d.ts.map +1 -1
  120. package/build/src/core/domain/services/chat/ConversationContextServiceImpl.d.ts +1 -1
  121. package/build/src/core/domain/services/chat/ConversationContextServiceImpl.d.ts.map +1 -1
  122. package/build/src/core/domain/services/chat/ConversationContextServiceImpl.js +12 -3
  123. package/build/src/core/domain/services/chat/ConversationContextServiceImpl.js.map +1 -1
  124. package/build/src/core/domain/services/chat/LLMExecutionServiceImpl.d.ts.map +1 -1
  125. package/build/src/core/domain/services/chat/LLMExecutionServiceImpl.js +20 -5
  126. package/build/src/core/domain/services/chat/LLMExecutionServiceImpl.js.map +1 -1
  127. package/build/src/core/domain/services/chat/VideoInputPolicy.d.ts +5 -0
  128. package/build/src/core/domain/services/chat/VideoInputPolicy.d.ts.map +1 -0
  129. package/build/src/core/domain/services/chat/VideoInputPolicy.js +14 -0
  130. package/build/src/core/domain/services/chat/VideoInputPolicy.js.map +1 -0
  131. package/build/src/core/domain/services/media/ImageEditPolicy.d.ts +14 -1
  132. package/build/src/core/domain/services/media/ImageEditPolicy.d.ts.map +1 -1
  133. package/build/src/core/domain/services/media/ImageEditPolicy.js +54 -4
  134. package/build/src/core/domain/services/media/ImageEditPolicy.js.map +1 -1
  135. package/build/src/core/domain/services/media/SpeechService.d.ts +2 -1
  136. package/build/src/core/domain/services/media/SpeechService.d.ts.map +1 -1
  137. package/build/src/core/domain/services/media/SpeechServiceImpl.d.ts +1 -0
  138. package/build/src/core/domain/services/media/SpeechServiceImpl.d.ts.map +1 -1
  139. package/build/src/core/domain/services/media/SpeechServiceImpl.js +3 -0
  140. package/build/src/core/domain/services/media/SpeechServiceImpl.js.map +1 -1
  141. package/build/src/core/domain/services/media/TranscriptionPolicy.js +1 -1
  142. package/build/src/core/domain/services/media/TranscriptionPolicy.js.map +1 -1
  143. package/build/src/core/domain/services/models/ModelServiceImpl.d.ts +1 -0
  144. package/build/src/core/domain/services/models/ModelServiceImpl.d.ts.map +1 -1
  145. package/build/src/core/domain/services/models/ModelServiceImpl.js +33 -32
  146. package/build/src/core/domain/services/models/ModelServiceImpl.js.map +1 -1
  147. package/build/src/core/domain/services/runs/NativeRunEngine.d.ts.map +1 -1
  148. package/build/src/core/domain/services/runs/NativeRunEngine.js +6 -1
  149. package/build/src/core/domain/services/runs/NativeRunEngine.js.map +1 -1
  150. package/build/src/core/domain/services/runs/RunEngine.d.ts +2 -0
  151. package/build/src/core/domain/services/runs/RunEngine.d.ts.map +1 -1
  152. package/build/src/core/domain/services/runs/RunToolApprovalProviderCapability.d.ts +2 -0
  153. package/build/src/core/domain/services/runs/RunToolApprovalProviderCapability.d.ts.map +1 -1
  154. package/build/src/core/domain/services/runs/RunToolApprovalProviderCapability.js +10 -4
  155. package/build/src/core/domain/services/runs/RunToolApprovalProviderCapability.js.map +1 -1
  156. package/build/src/core/domain/services/tools/ToolExecutionContextPolicy.d.ts +1 -0
  157. package/build/src/core/domain/services/tools/ToolExecutionContextPolicy.d.ts.map +1 -1
  158. package/build/src/core/domain/services/tools/ToolExecutionContextPolicy.js +1 -0
  159. package/build/src/core/domain/services/tools/ToolExecutionContextPolicy.js.map +1 -1
  160. package/build/src/core/infrastructure/ai/alibaba/AlibabaWorkspace.d.ts +8 -0
  161. package/build/src/core/infrastructure/ai/alibaba/AlibabaWorkspace.d.ts.map +1 -0
  162. package/build/src/core/infrastructure/ai/alibaba/AlibabaWorkspace.js +16 -0
  163. package/build/src/core/infrastructure/ai/alibaba/AlibabaWorkspace.js.map +1 -0
  164. package/build/src/core/infrastructure/ai/embedding/providers/google/GoogleAIEmbeddingService.d.ts +2 -3
  165. package/build/src/core/infrastructure/ai/embedding/providers/google/GoogleAIEmbeddingService.d.ts.map +1 -1
  166. package/build/src/core/infrastructure/ai/embedding/providers/google/GoogleAIEmbeddingService.js +42 -17
  167. package/build/src/core/infrastructure/ai/embedding/providers/google/GoogleAIEmbeddingService.js.map +1 -1
  168. package/build/src/core/infrastructure/ai/google/GoogleGenAiConnection.d.ts +15 -0
  169. package/build/src/core/infrastructure/ai/google/GoogleGenAiConnection.d.ts.map +1 -0
  170. package/build/src/core/infrastructure/ai/google/GoogleGenAiConnection.js +21 -0
  171. package/build/src/core/infrastructure/ai/google/GoogleGenAiConnection.js.map +1 -0
  172. package/build/src/core/infrastructure/ai/images/AnimatedPngFixture.test-support.d.ts +2 -0
  173. package/build/src/core/infrastructure/ai/images/AnimatedPngFixture.test-support.d.ts.map +1 -0
  174. package/build/src/core/infrastructure/ai/images/AnimatedPngFixture.test-support.js +5 -0
  175. package/build/src/core/infrastructure/ai/images/AnimatedPngFixture.test-support.js.map +1 -0
  176. package/build/src/core/infrastructure/ai/images/ImageOutputBytes.d.ts +1 -0
  177. package/build/src/core/infrastructure/ai/images/ImageOutputBytes.d.ts.map +1 -1
  178. package/build/src/core/infrastructure/ai/images/ImageOutputBytes.js +9 -3
  179. package/build/src/core/infrastructure/ai/images/ImageOutputBytes.js.map +1 -1
  180. package/build/src/core/infrastructure/ai/images/alibaba/QwenImageProviders.d.ts +36 -0
  181. package/build/src/core/infrastructure/ai/images/alibaba/QwenImageProviders.d.ts.map +1 -0
  182. package/build/src/core/infrastructure/ai/images/alibaba/QwenImageProviders.js +108 -0
  183. package/build/src/core/infrastructure/ai/images/alibaba/QwenImageProviders.js.map +1 -0
  184. package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageClient.d.ts +20 -0
  185. package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageClient.d.ts.map +1 -0
  186. package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageClient.js +52 -0
  187. package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageClient.js.map +1 -0
  188. package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageEditingProvider.d.ts +13 -0
  189. package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageEditingProvider.d.ts.map +1 -0
  190. package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageEditingProvider.js +137 -0
  191. package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageEditingProvider.js.map +1 -0
  192. package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageGenerationProvider.d.ts +3 -37
  193. package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageGenerationProvider.d.ts.map +1 -1
  194. package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageGenerationProvider.js +52 -208
  195. package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageGenerationProvider.js.map +1 -1
  196. package/build/src/core/infrastructure/ai/images/editing/OpenAICompatibleImageEditingProvider.d.ts.map +1 -1
  197. package/build/src/core/infrastructure/ai/images/editing/OpenAICompatibleImageEditingProvider.js +11 -3
  198. package/build/src/core/infrastructure/ai/images/editing/OpenAICompatibleImageEditingProvider.js.map +1 -1
  199. package/build/src/core/infrastructure/ai/images/editing/OpenAIImageEditMask.d.ts +12 -0
  200. package/build/src/core/infrastructure/ai/images/editing/OpenAIImageEditMask.d.ts.map +1 -0
  201. package/build/src/core/infrastructure/ai/images/editing/OpenAIImageEditMask.js +39 -0
  202. package/build/src/core/infrastructure/ai/images/editing/OpenAIImageEditMask.js.map +1 -0
  203. package/build/src/core/infrastructure/ai/images/google/GoogleAIImageGenerationProvider.d.ts +3 -3
  204. package/build/src/core/infrastructure/ai/images/google/GoogleAIImageGenerationProvider.d.ts.map +1 -1
  205. package/build/src/core/infrastructure/ai/images/google/GoogleAIImageGenerationProvider.js +36 -25
  206. package/build/src/core/infrastructure/ai/images/google/GoogleAIImageGenerationProvider.js.map +1 -1
  207. package/build/src/core/infrastructure/ai/images/openai/OpenAIImageModels.d.ts +1 -1
  208. package/build/src/core/infrastructure/ai/images/togetherai/TogetherImageGenerationProvider.d.ts +12 -0
  209. package/build/src/core/infrastructure/ai/images/togetherai/TogetherImageGenerationProvider.d.ts.map +1 -0
  210. package/build/src/core/infrastructure/ai/images/togetherai/TogetherImageGenerationProvider.js +97 -0
  211. package/build/src/core/infrastructure/ai/images/togetherai/TogetherImageGenerationProvider.js.map +1 -0
  212. package/build/src/core/infrastructure/ai/llm/base/realtime/NativeRealtimeApprovalStore.d.ts +32 -0
  213. package/build/src/core/infrastructure/ai/llm/base/realtime/NativeRealtimeApprovalStore.d.ts.map +1 -0
  214. package/build/src/core/infrastructure/ai/llm/base/realtime/NativeRealtimeApprovalStore.js +80 -0
  215. package/build/src/core/infrastructure/ai/llm/base/realtime/NativeRealtimeApprovalStore.js.map +1 -0
  216. package/build/src/core/infrastructure/ai/llm/base/realtime/RealtimeToolInvocationBuilder.d.ts +23 -0
  217. package/build/src/core/infrastructure/ai/llm/base/realtime/RealtimeToolInvocationBuilder.d.ts.map +1 -0
  218. package/build/src/core/infrastructure/ai/llm/base/realtime/RealtimeToolInvocationBuilder.js +66 -0
  219. package/build/src/core/infrastructure/ai/llm/base/realtime/RealtimeToolInvocationBuilder.js.map +1 -0
  220. package/build/src/core/infrastructure/ai/llm/context/codecs/RunMediaContextCodecs.js +3 -1
  221. package/build/src/core/infrastructure/ai/llm/context/codecs/RunMediaContextCodecs.js.map +1 -1
  222. package/build/src/core/infrastructure/ai/llm/providers/alibaba/AlibabaCatalog.d.ts +12 -0
  223. package/build/src/core/infrastructure/ai/llm/providers/alibaba/AlibabaCatalog.d.ts.map +1 -0
  224. package/build/src/core/infrastructure/ai/llm/providers/alibaba/AlibabaCatalog.js +46 -0
  225. package/build/src/core/infrastructure/ai/llm/providers/alibaba/AlibabaCatalog.js.map +1 -0
  226. package/build/src/core/infrastructure/ai/llm/providers/alibaba/AlibabaLLMProvider.d.ts +24 -0
  227. package/build/src/core/infrastructure/ai/llm/providers/alibaba/AlibabaLLMProvider.d.ts.map +1 -0
  228. package/build/src/core/infrastructure/ai/llm/providers/alibaba/AlibabaLLMProvider.js +100 -0
  229. package/build/src/core/infrastructure/ai/llm/providers/alibaba/AlibabaLLMProvider.js.map +1 -0
  230. package/build/src/core/infrastructure/ai/llm/providers/azure/services/AzureFoundryService.d.ts +1 -1
  231. package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockCatalog.d.ts +53 -0
  232. package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockCatalog.d.ts.map +1 -0
  233. package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockCatalog.js +178 -0
  234. package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockCatalog.js.map +1 -0
  235. package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockLLMProvider.d.ts +19 -0
  236. package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockLLMProvider.d.ts.map +1 -0
  237. package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockLLMProvider.js +59 -0
  238. package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockLLMProvider.js.map +1 -0
  239. package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockMessages.d.ts +8 -0
  240. package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockMessages.d.ts.map +1 -0
  241. package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockMessages.js +72 -0
  242. package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockMessages.js.map +1 -0
  243. package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockOutput.d.ts +28 -0
  244. package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockOutput.d.ts.map +1 -0
  245. package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockOutput.js +117 -0
  246. package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockOutput.js.map +1 -0
  247. package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockService.d.ts +44 -0
  248. package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockService.d.ts.map +1 -0
  249. package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockService.js +148 -0
  250. package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockService.js.map +1 -0
  251. package/build/src/core/infrastructure/ai/llm/providers/cerebras/CerebrasConfig.d.ts.map +1 -1
  252. package/build/src/core/infrastructure/ai/llm/providers/cerebras/CerebrasConfig.js +11 -15
  253. package/build/src/core/infrastructure/ai/llm/providers/cerebras/CerebrasConfig.js.map +1 -1
  254. package/build/src/core/infrastructure/ai/llm/providers/cerebras/CerebrasService.d.ts.map +1 -1
  255. package/build/src/core/infrastructure/ai/llm/providers/cerebras/CerebrasService.js +3 -5
  256. package/build/src/core/infrastructure/ai/llm/providers/cerebras/CerebrasService.js.map +1 -1
  257. package/build/src/core/infrastructure/ai/llm/providers/foundry-local/FoundryLocalService.d.ts +2 -1
  258. package/build/src/core/infrastructure/ai/llm/providers/foundry-local/FoundryLocalService.d.ts.map +1 -1
  259. package/build/src/core/infrastructure/ai/llm/providers/foundry-local/FoundryLocalService.js +33 -38
  260. package/build/src/core/infrastructure/ai/llm/providers/foundry-local/FoundryLocalService.js.map +1 -1
  261. package/build/src/core/infrastructure/ai/llm/providers/google/GoogleAIService.d.ts +6 -2
  262. package/build/src/core/infrastructure/ai/llm/providers/google/GoogleAIService.d.ts.map +1 -1
  263. package/build/src/core/infrastructure/ai/llm/providers/google/GoogleAIService.js +47 -37
  264. package/build/src/core/infrastructure/ai/llm/providers/google/GoogleAIService.js.map +1 -1
  265. package/build/src/core/infrastructure/ai/llm/providers/google/GoogleApprovalCoordinator.d.ts +3 -1
  266. package/build/src/core/infrastructure/ai/llm/providers/google/GoogleApprovalCoordinator.d.ts.map +1 -1
  267. package/build/src/core/infrastructure/ai/llm/providers/google/GoogleApprovalCoordinator.js +16 -8
  268. package/build/src/core/infrastructure/ai/llm/providers/google/GoogleApprovalCoordinator.js.map +1 -1
  269. package/build/src/core/infrastructure/ai/llm/providers/google/GoogleChatRoute.d.ts +12 -0
  270. package/build/src/core/infrastructure/ai/llm/providers/google/GoogleChatRoute.d.ts.map +1 -0
  271. package/build/src/core/infrastructure/ai/llm/providers/google/GoogleChatRoute.js +12 -0
  272. package/build/src/core/infrastructure/ai/llm/providers/google/GoogleChatRoute.js.map +1 -0
  273. package/build/src/core/infrastructure/ai/llm/providers/google/GoogleConfig.d.ts.map +1 -1
  274. package/build/src/core/infrastructure/ai/llm/providers/google/GoogleConfig.js +6 -2
  275. package/build/src/core/infrastructure/ai/llm/providers/google/GoogleConfig.js.map +1 -1
  276. package/build/src/core/infrastructure/ai/llm/providers/google/GoogleLLMProvider.d.ts +1 -1
  277. package/build/src/core/infrastructure/ai/llm/providers/google/GoogleLLMProvider.d.ts.map +1 -1
  278. package/build/src/core/infrastructure/ai/llm/providers/google/GoogleLLMProvider.js +12 -6
  279. package/build/src/core/infrastructure/ai/llm/providers/google/GoogleLLMProvider.js.map +1 -1
  280. package/build/src/core/infrastructure/ai/llm/providers/google/GoogleStructuredOutputPolicy.d.ts.map +1 -1
  281. package/build/src/core/infrastructure/ai/llm/providers/google/GoogleStructuredOutputPolicy.js +4 -1
  282. package/build/src/core/infrastructure/ai/llm/providers/google/GoogleStructuredOutputPolicy.js.map +1 -1
  283. package/build/src/core/infrastructure/ai/llm/providers/google/GoogleTokenCountRequest.d.ts +1 -1
  284. package/build/src/core/infrastructure/ai/llm/providers/google/GoogleTokenCountRequest.d.ts.map +1 -1
  285. package/build/src/core/infrastructure/ai/llm/providers/google/GoogleTokenCountRequest.js +14 -1
  286. package/build/src/core/infrastructure/ai/llm/providers/google/GoogleTokenCountRequest.js.map +1 -1
  287. package/build/src/core/infrastructure/ai/llm/providers/google/GoogleToolLoop.d.ts +1 -0
  288. package/build/src/core/infrastructure/ai/llm/providers/google/GoogleToolLoop.d.ts.map +1 -1
  289. package/build/src/core/infrastructure/ai/llm/providers/google/GoogleToolLoop.js +2 -2
  290. package/build/src/core/infrastructure/ai/llm/providers/google/GoogleToolLoop.js.map +1 -1
  291. package/build/src/core/infrastructure/ai/llm/providers/google/GoogleVideoFiles.d.ts +19 -0
  292. package/build/src/core/infrastructure/ai/llm/providers/google/GoogleVideoFiles.d.ts.map +1 -0
  293. package/build/src/core/infrastructure/ai/llm/providers/google/GoogleVideoFiles.js +170 -0
  294. package/build/src/core/infrastructure/ai/llm/providers/google/GoogleVideoFiles.js.map +1 -0
  295. package/build/src/core/infrastructure/ai/llm/providers/google/VertexChatProfiles.d.ts +4 -0
  296. package/build/src/core/infrastructure/ai/llm/providers/google/VertexChatProfiles.d.ts.map +1 -0
  297. package/build/src/core/infrastructure/ai/llm/providers/google/VertexChatProfiles.js +42 -0
  298. package/build/src/core/infrastructure/ai/llm/providers/google/VertexChatProfiles.js.map +1 -0
  299. package/build/src/core/infrastructure/ai/llm/providers/google/VertexChatVideo.d.ts +25 -0
  300. package/build/src/core/infrastructure/ai/llm/providers/google/VertexChatVideo.d.ts.map +1 -0
  301. package/build/src/core/infrastructure/ai/llm/providers/google/VertexChatVideo.js +106 -0
  302. package/build/src/core/infrastructure/ai/llm/providers/google/VertexChatVideo.js.map +1 -0
  303. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleLiveSocket.d.ts +10 -0
  304. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleLiveSocket.d.ts.map +1 -0
  305. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleLiveSocket.js +48 -0
  306. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleLiveSocket.js.map +1 -0
  307. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeConfig.d.ts +9 -1
  308. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeConfig.d.ts.map +1 -1
  309. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeConfig.js +21 -4
  310. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeConfig.js.map +1 -1
  311. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeEventHandlerREgistry.d.ts +11 -2
  312. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeEventHandlerREgistry.d.ts.map +1 -1
  313. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeEventHandlerREgistry.js +72 -42
  314. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeEventHandlerREgistry.js.map +1 -1
  315. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeProvider.d.ts +8 -2
  316. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeProvider.d.ts.map +1 -1
  317. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeProvider.js +72 -34
  318. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeProvider.js.map +1 -1
  319. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeSession.d.ts +14 -6
  320. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeSession.d.ts.map +1 -1
  321. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeSession.js +74 -28
  322. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeSession.js.map +1 -1
  323. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeToolApprovals.d.ts +27 -0
  324. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeToolApprovals.d.ts.map +1 -0
  325. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeToolApprovals.js +138 -0
  326. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeToolApprovals.js.map +1 -0
  327. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeToolContracts.d.ts +10 -0
  328. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeToolContracts.d.ts.map +1 -0
  329. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeToolContracts.js +43 -0
  330. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeToolContracts.js.map +1 -0
  331. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeTranslationProvider.d.ts +49 -0
  332. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeTranslationProvider.d.ts.map +1 -0
  333. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeTranslationProvider.js +151 -0
  334. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeTranslationProvider.js.map +1 -0
  335. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/types.d.ts +9 -2
  336. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/types.d.ts.map +1 -1
  337. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/types.js +4 -1
  338. package/build/src/core/infrastructure/ai/llm/providers/google/realtime/types.js.map +1 -1
  339. package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceCatalog.d.ts +10 -0
  340. package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceCatalog.d.ts.map +1 -0
  341. package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceCatalog.js +74 -0
  342. package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceCatalog.js.map +1 -0
  343. package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceLLMProvider.d.ts +25 -0
  344. package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceLLMProvider.d.ts.map +1 -0
  345. package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceLLMProvider.js +104 -0
  346. package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceLLMProvider.js.map +1 -0
  347. package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceResponses.d.ts +40 -0
  348. package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceResponses.d.ts.map +1 -0
  349. package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceResponses.js +39 -0
  350. package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceResponses.js.map +1 -0
  351. package/build/src/core/infrastructure/ai/llm/providers/local/LocalLLMChatProviderService.d.ts +2 -3
  352. package/build/src/core/infrastructure/ai/llm/providers/local/LocalLLMChatProviderService.d.ts.map +1 -1
  353. package/build/src/core/infrastructure/ai/llm/providers/local/LocalLLMChatProviderService.js +11 -7
  354. package/build/src/core/infrastructure/ai/llm/providers/local/LocalLLMChatProviderService.js.map +1 -1
  355. package/build/src/core/infrastructure/ai/llm/providers/meta/MetaLLMProvider.d.ts.map +1 -1
  356. package/build/src/core/infrastructure/ai/llm/providers/meta/MetaLLMProvider.js +2 -30
  357. package/build/src/core/infrastructure/ai/llm/providers/meta/MetaLLMProvider.js.map +1 -1
  358. package/build/src/core/infrastructure/ai/llm/providers/mistral/MistralConfig.d.ts.map +1 -1
  359. package/build/src/core/infrastructure/ai/llm/providers/mistral/MistralConfig.js +18 -13
  360. package/build/src/core/infrastructure/ai/llm/providers/mistral/MistralConfig.js.map +1 -1
  361. package/build/src/core/infrastructure/ai/llm/providers/mistral/MistralService.d.ts.map +1 -1
  362. package/build/src/core/infrastructure/ai/llm/providers/mistral/MistralService.js +16 -1
  363. package/build/src/core/infrastructure/ai/llm/providers/mistral/MistralService.js.map +1 -1
  364. package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaCatalog.d.ts +9 -0
  365. package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaCatalog.d.ts.map +1 -0
  366. package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaCatalog.js +87 -0
  367. package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaCatalog.js.map +1 -0
  368. package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaService.d.ts +2 -2
  369. package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaService.d.ts.map +1 -1
  370. package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaService.js +7 -10
  371. package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaService.js.map +1 -1
  372. package/build/src/core/infrastructure/ai/llm/providers/ollama/OllamaCloudService.d.ts +40 -0
  373. package/build/src/core/infrastructure/ai/llm/providers/ollama/OllamaCloudService.d.ts.map +1 -0
  374. package/build/src/core/infrastructure/ai/llm/providers/ollama/OllamaCloudService.js +296 -0
  375. package/build/src/core/infrastructure/ai/llm/providers/ollama/OllamaCloudService.js.map +1 -0
  376. package/build/src/core/infrastructure/ai/llm/providers/ollama/OllamaLLMProvider.d.ts +14 -4
  377. package/build/src/core/infrastructure/ai/llm/providers/ollama/OllamaLLMProvider.d.ts.map +1 -1
  378. package/build/src/core/infrastructure/ai/llm/providers/ollama/OllamaLLMProvider.js +35 -5
  379. package/build/src/core/infrastructure/ai/llm/providers/ollama/OllamaLLMProvider.js.map +1 -1
  380. package/build/src/core/infrastructure/ai/llm/providers/openai/chat-completions/OpenAIChatCompletionsService.d.ts +1 -1
  381. package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveConfig.d.ts +5 -2
  382. package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveConfig.d.ts.map +1 -1
  383. package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveConfig.js +25 -1
  384. package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveConfig.js.map +1 -1
  385. package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveMediaProvider.js +1 -1
  386. package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveMediaProvider.js.map +1 -1
  387. package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveProvider.d.ts.map +1 -1
  388. package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveProvider.js +6 -4
  389. package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveProvider.js.map +1 -1
  390. package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveReceiptPlayback.d.ts +3 -4
  391. package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveReceiptPlayback.d.ts.map +1 -1
  392. package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveReceiptPlayback.js +13 -51
  393. package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveReceiptPlayback.js.map +1 -1
  394. package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveReceiptSpeech.d.ts +4 -0
  395. package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveReceiptSpeech.d.ts.map +1 -0
  396. package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveReceiptSpeech.js +163 -0
  397. package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveReceiptSpeech.js.map +1 -0
  398. package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveRtcConnection.d.ts +9 -2
  399. package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveRtcConnection.d.ts.map +1 -1
  400. package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveRtcConnection.js +24 -9
  401. package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveRtcConnection.js.map +1 -1
  402. package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveRtcEventMapper.d.ts.map +1 -1
  403. package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveRtcEventMapper.js +4 -0
  404. package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveRtcEventMapper.js.map +1 -1
  405. package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAIRealtimeReceiptSpeech.d.ts.map +1 -1
  406. package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAIRealtimeReceiptSpeech.js +12 -4
  407. package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAIRealtimeReceiptSpeech.js.map +1 -1
  408. package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeDisplayContentBuilder.d.ts +3 -21
  409. package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeDisplayContentBuilder.d.ts.map +1 -1
  410. package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeDisplayContentBuilder.js +2 -64
  411. package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeDisplayContentBuilder.js.map +1 -1
  412. package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeEventHandlerRegistry.d.ts +1 -5
  413. package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeEventHandlerRegistry.d.ts.map +1 -1
  414. package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeEventHandlerRegistry.js +12 -87
  415. package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeEventHandlerRegistry.js.map +1 -1
  416. package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeTranslationProvider.d.ts +11 -1
  417. package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeTranslationProvider.d.ts.map +1 -1
  418. package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeTranslationProvider.js +73 -73
  419. package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeTranslationProvider.js.map +1 -1
  420. package/build/src/core/infrastructure/ai/llm/providers/openai/responses/OpenAIResponsesApiService.d.ts +1 -1
  421. package/build/src/core/infrastructure/ai/llm/providers/openai/responses/createPortableResponsesContext.d.ts +5 -0
  422. package/build/src/core/infrastructure/ai/llm/providers/openai/responses/createPortableResponsesContext.d.ts.map +1 -0
  423. package/build/src/core/infrastructure/ai/llm/providers/openai/responses/createPortableResponsesContext.js +33 -0
  424. package/build/src/core/infrastructure/ai/llm/providers/openai/responses/createPortableResponsesContext.js.map +1 -0
  425. package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeCatalog.d.ts +25 -0
  426. package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeCatalog.d.ts.map +1 -0
  427. package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeCatalog.js +152 -0
  428. package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeCatalog.js.map +1 -0
  429. package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeLLMProvider.d.ts +22 -0
  430. package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeLLMProvider.d.ts.map +1 -0
  431. package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeLLMProvider.js +54 -0
  432. package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeLLMProvider.js.map +1 -0
  433. package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeService.d.ts +31 -0
  434. package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeService.d.ts.map +1 -0
  435. package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeService.js +357 -0
  436. package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeService.js.map +1 -0
  437. package/build/src/core/infrastructure/ai/llm/providers/openrouter/OpenRouterConfig.d.ts.map +1 -1
  438. package/build/src/core/infrastructure/ai/llm/providers/openrouter/OpenRouterConfig.js +9 -16
  439. package/build/src/core/infrastructure/ai/llm/providers/openrouter/OpenRouterConfig.js.map +1 -1
  440. package/build/src/core/infrastructure/ai/llm/providers/openrouter/OpenRouterService.js +1 -1
  441. package/build/src/core/infrastructure/ai/llm/providers/openrouter/OpenRouterService.js.map +1 -1
  442. package/build/src/core/infrastructure/ai/llm/providers/togetherai/TogetherCatalog.d.ts +13 -0
  443. package/build/src/core/infrastructure/ai/llm/providers/togetherai/TogetherCatalog.d.ts.map +1 -0
  444. package/build/src/core/infrastructure/ai/llm/providers/togetherai/TogetherCatalog.js +95 -0
  445. package/build/src/core/infrastructure/ai/llm/providers/togetherai/TogetherCatalog.js.map +1 -0
  446. package/build/src/core/infrastructure/ai/llm/providers/togetherai/TogetherLLMProvider.d.ts +29 -0
  447. package/build/src/core/infrastructure/ai/llm/providers/togetherai/TogetherLLMProvider.d.ts.map +1 -0
  448. package/build/src/core/infrastructure/ai/llm/providers/togetherai/TogetherLLMProvider.js +167 -0
  449. package/build/src/core/infrastructure/ai/llm/providers/togetherai/TogetherLLMProvider.js.map +1 -0
  450. package/build/src/core/infrastructure/ai/speech/GoogleSpeechConnection.d.ts +5 -0
  451. package/build/src/core/infrastructure/ai/speech/GoogleSpeechConnection.d.ts.map +1 -0
  452. package/build/src/core/infrastructure/ai/speech/GoogleSpeechConnection.js +26 -0
  453. package/build/src/core/infrastructure/ai/speech/GoogleSpeechConnection.js.map +1 -0
  454. package/build/src/core/infrastructure/ai/speech/stt/AzureSpeechToTextProvider.d.ts +7 -7
  455. package/build/src/core/infrastructure/ai/speech/stt/AzureSpeechToTextProvider.d.ts.map +1 -1
  456. package/build/src/core/infrastructure/ai/speech/stt/AzureSpeechToTextProvider.js +159 -63
  457. package/build/src/core/infrastructure/ai/speech/stt/AzureSpeechToTextProvider.js.map +1 -1
  458. package/build/src/core/infrastructure/ai/speech/stt/GoogleLiveTranscriptionProvider.d.ts +6 -2
  459. package/build/src/core/infrastructure/ai/speech/stt/GoogleLiveTranscriptionProvider.d.ts.map +1 -1
  460. package/build/src/core/infrastructure/ai/speech/stt/GoogleLiveTranscriptionProvider.js +22 -13
  461. package/build/src/core/infrastructure/ai/speech/stt/GoogleLiveTranscriptionProvider.js.map +1 -1
  462. package/build/src/core/infrastructure/ai/speech/stt/GoogleSpeechToTextProvider.d.ts +12 -6
  463. package/build/src/core/infrastructure/ai/speech/stt/GoogleSpeechToTextProvider.d.ts.map +1 -1
  464. package/build/src/core/infrastructure/ai/speech/stt/GoogleSpeechToTextProvider.js +64 -15
  465. package/build/src/core/infrastructure/ai/speech/stt/GoogleSpeechToTextProvider.js.map +1 -1
  466. package/build/src/core/infrastructure/ai/speech/stt/TogetherSpeechToTextProvider.d.ts +15 -0
  467. package/build/src/core/infrastructure/ai/speech/stt/TogetherSpeechToTextProvider.d.ts.map +1 -0
  468. package/build/src/core/infrastructure/ai/speech/stt/TogetherSpeechToTextProvider.js +81 -0
  469. package/build/src/core/infrastructure/ai/speech/stt/TogetherSpeechToTextProvider.js.map +1 -0
  470. package/build/src/core/infrastructure/ai/speech/tts/TogetherTextToSpeechProvider.d.ts +26 -0
  471. package/build/src/core/infrastructure/ai/speech/tts/TogetherTextToSpeechProvider.d.ts.map +1 -0
  472. package/build/src/core/infrastructure/ai/speech/tts/TogetherTextToSpeechProvider.js +80 -0
  473. package/build/src/core/infrastructure/ai/speech/tts/TogetherTextToSpeechProvider.js.map +1 -0
  474. package/build/src/core/infrastructure/ai/speech/tts/google/GoogleTextToSpeechProvider.d.ts +20 -17
  475. package/build/src/core/infrastructure/ai/speech/tts/google/GoogleTextToSpeechProvider.d.ts.map +1 -1
  476. package/build/src/core/infrastructure/ai/speech/tts/google/GoogleTextToSpeechProvider.js +20 -9
  477. package/build/src/core/infrastructure/ai/speech/tts/google/GoogleTextToSpeechProvider.js.map +1 -1
  478. package/build/src/core/infrastructure/ai/speech/tts/google/GoogleTtsProtocol.d.ts +2 -1
  479. package/build/src/core/infrastructure/ai/speech/tts/google/GoogleTtsProtocol.d.ts.map +1 -1
  480. package/build/src/core/infrastructure/ai/speech/tts/google/GoogleTtsProtocol.js +6 -4
  481. package/build/src/core/infrastructure/ai/speech/tts/google/GoogleTtsProtocol.js.map +1 -1
  482. package/build/src/core/infrastructure/ai/speech/tts/google/GoogleTtsWorker.js +24 -8
  483. package/build/src/core/infrastructure/ai/speech/tts/google/GoogleTtsWorker.js.map +1 -1
  484. package/build/src/core/infrastructure/ai/tools/executors/FunctionToolExecutor.d.ts.map +1 -1
  485. package/build/src/core/infrastructure/ai/tools/executors/FunctionToolExecutor.js +1 -0
  486. package/build/src/core/infrastructure/ai/tools/executors/FunctionToolExecutor.js.map +1 -1
  487. package/build/src/core/infrastructure/ai/tools/implementations/images/ImageEditingTool.d.ts.map +1 -1
  488. package/build/src/core/infrastructure/ai/tools/implementations/images/ImageEditingTool.js +11 -3
  489. package/build/src/core/infrastructure/ai/tools/implementations/images/ImageEditingTool.js.map +1 -1
  490. package/build/src/core/infrastructure/ai/tools/implementations/images/ImageGenerationToolService.js +1 -1
  491. package/build/src/core/infrastructure/ai/tools/implementations/images/ImageGenerationToolService.js.map +1 -1
  492. package/build/src/core/infrastructure/ai/tools/implementations/images/ImageOutputToolProperties.d.ts +1 -1
  493. package/build/src/core/infrastructure/ai/tools/implementations/images/schemas.d.ts +4 -4
  494. package/build/src/core/infrastructure/ai/tools/implementations/images/schemas.js +3 -3
  495. package/build/src/core/infrastructure/ai/tools/implementations/images/schemas.js.map +1 -1
  496. package/build/src/core/infrastructure/ai/tools/implementations/videos/VideoGenerationToolService.d.ts.map +1 -1
  497. package/build/src/core/infrastructure/ai/tools/implementations/videos/VideoGenerationToolService.js +5 -4
  498. package/build/src/core/infrastructure/ai/tools/implementations/videos/VideoGenerationToolService.js.map +1 -1
  499. package/build/src/core/infrastructure/ai/videos/VideoGenerationProviderRegistryImpl.d.ts.map +1 -1
  500. package/build/src/core/infrastructure/ai/videos/VideoGenerationProviderRegistryImpl.js +4 -1
  501. package/build/src/core/infrastructure/ai/videos/VideoGenerationProviderRegistryImpl.js.map +1 -1
  502. package/build/src/core/infrastructure/ai/videos/alibaba/HappyHorseVideoProvider.d.ts +18 -0
  503. package/build/src/core/infrastructure/ai/videos/alibaba/HappyHorseVideoProvider.d.ts.map +1 -0
  504. package/build/src/core/infrastructure/ai/videos/alibaba/HappyHorseVideoProvider.js +88 -0
  505. package/build/src/core/infrastructure/ai/videos/alibaba/HappyHorseVideoProvider.js.map +1 -0
  506. package/build/src/core/infrastructure/ai/videos/google/GoogleVideoGenerationProvider.d.ts +4 -2
  507. package/build/src/core/infrastructure/ai/videos/google/GoogleVideoGenerationProvider.d.ts.map +1 -1
  508. package/build/src/core/infrastructure/ai/videos/google/GoogleVideoGenerationProvider.js +109 -45
  509. package/build/src/core/infrastructure/ai/videos/google/GoogleVideoGenerationProvider.js.map +1 -1
  510. package/build/src/core/infrastructure/ai/videos/google/VertexVeoOutput.d.ts +10 -0
  511. package/build/src/core/infrastructure/ai/videos/google/VertexVeoOutput.d.ts.map +1 -0
  512. package/build/src/core/infrastructure/ai/videos/google/VertexVeoOutput.js +43 -0
  513. package/build/src/core/infrastructure/ai/videos/google/VertexVeoOutput.js.map +1 -0
  514. package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoAdapter.d.ts +3 -2
  515. package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoAdapter.d.ts.map +1 -1
  516. package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoAdapter.js +7 -7
  517. package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoAdapter.js.map +1 -1
  518. package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoOutput.d.ts.map +1 -1
  519. package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoOutput.js +4 -4
  520. package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoOutput.js.map +1 -1
  521. package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoProtocol.d.ts +3 -2
  522. package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoProtocol.d.ts.map +1 -1
  523. package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoProtocol.js +13 -4
  524. package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoProtocol.js.map +1 -1
  525. package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoWorker.js +27 -23
  526. package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoWorker.js.map +1 -1
  527. package/build/src/core/infrastructure/ai/videos/togetherai/TogetherVideoGenerationProvider.d.ts +14 -0
  528. package/build/src/core/infrastructure/ai/videos/togetherai/TogetherVideoGenerationProvider.d.ts.map +1 -0
  529. package/build/src/core/infrastructure/ai/videos/togetherai/TogetherVideoGenerationProvider.js +113 -0
  530. package/build/src/core/infrastructure/ai/videos/togetherai/TogetherVideoGenerationProvider.js.map +1 -0
  531. package/build/src/core/infrastructure/api/v1/controllers/media/ImageEditingController.d.ts +2 -0
  532. package/build/src/core/infrastructure/api/v1/controllers/media/ImageEditingController.d.ts.map +1 -1
  533. package/build/src/core/infrastructure/api/v1/controllers/media/ImageEditingController.js +18 -6
  534. package/build/src/core/infrastructure/api/v1/controllers/media/ImageEditingController.js.map +1 -1
  535. package/build/src/core/infrastructure/api/v1/controllers/media/SpeechController.d.ts +1 -0
  536. package/build/src/core/infrastructure/api/v1/controllers/media/SpeechController.d.ts.map +1 -1
  537. package/build/src/core/infrastructure/api/v1/controllers/media/SpeechController.js +3 -0
  538. package/build/src/core/infrastructure/api/v1/controllers/media/SpeechController.js.map +1 -1
  539. package/build/src/core/infrastructure/api/v1/controllers/models/ModelsController.d.ts.map +1 -1
  540. package/build/src/core/infrastructure/api/v1/controllers/models/ModelsController.js +12 -2
  541. package/build/src/core/infrastructure/api/v1/controllers/models/ModelsController.js.map +1 -1
  542. package/build/src/core/infrastructure/api/v1/openapi/coreSchemas.d.ts +32 -12
  543. package/build/src/core/infrastructure/api/v1/openapi/coreSchemas.d.ts.map +1 -1
  544. package/build/src/core/infrastructure/api/v1/openapi/coreSchemas.js +8 -8
  545. package/build/src/core/infrastructure/api/v1/openapi/coreSchemas.js.map +1 -1
  546. package/build/src/core/infrastructure/api/v1/requests/images/ImageEditRequestSchema.d.ts +6 -1
  547. package/build/src/core/infrastructure/api/v1/requests/images/ImageEditRequestSchema.d.ts.map +1 -1
  548. package/build/src/core/infrastructure/api/v1/requests/images/ImageEditRequestSchema.js +8 -1
  549. package/build/src/core/infrastructure/api/v1/requests/images/ImageEditRequestSchema.js.map +1 -1
  550. package/build/src/core/infrastructure/api/v1/requests/images/ImageGenerationRequestSchema.d.ts +1 -1
  551. package/build/src/core/infrastructure/api/v1/requests/images/ImageOutputOptionsSchema.d.ts +1 -1
  552. package/build/src/core/infrastructure/api/v1/requests/runs/CreateRunRequestSchema.d.ts +5 -0
  553. package/build/src/core/infrastructure/api/v1/requests/runs/CreateRunRequestSchema.d.ts.map +1 -1
  554. package/build/src/core/infrastructure/api/v1/requests/runs/CreateRunRequestSchema.js +5 -0
  555. package/build/src/core/infrastructure/api/v1/requests/runs/CreateRunRequestSchema.js.map +1 -1
  556. package/build/src/core/infrastructure/api/v1/routers/conversations/openapi/ConversationsRouter.openapi.d.ts.map +1 -1
  557. package/build/src/core/infrastructure/api/v1/routers/conversations/openapi/ConversationsRouter.openapi.js +4 -1
  558. package/build/src/core/infrastructure/api/v1/routers/conversations/openapi/ConversationsRouter.openapi.js.map +1 -1
  559. package/build/src/core/infrastructure/api/v1/routers/media/audio/SpeechRouter.d.ts.map +1 -1
  560. package/build/src/core/infrastructure/api/v1/routers/media/audio/SpeechRouter.js +1 -0
  561. package/build/src/core/infrastructure/api/v1/routers/media/audio/SpeechRouter.js.map +1 -1
  562. package/build/src/core/infrastructure/api/v1/routers/media/audio/openapi/SpeechRouter.openapi.d.ts +1 -0
  563. package/build/src/core/infrastructure/api/v1/routers/media/audio/openapi/SpeechRouter.openapi.d.ts.map +1 -1
  564. package/build/src/core/infrastructure/api/v1/routers/media/audio/openapi/SpeechRouter.openapi.js +16 -0
  565. package/build/src/core/infrastructure/api/v1/routers/media/audio/openapi/SpeechRouter.openapi.js.map +1 -1
  566. package/build/src/core/infrastructure/api/v1/routers/media/images/ImagesRouter.d.ts.map +1 -1
  567. package/build/src/core/infrastructure/api/v1/routers/media/images/ImagesRouter.js +1 -0
  568. package/build/src/core/infrastructure/api/v1/routers/media/images/ImagesRouter.js.map +1 -1
  569. package/build/src/core/infrastructure/api/v1/routers/media/images/ImagesRouter.openapi.d.ts.map +1 -1
  570. package/build/src/core/infrastructure/api/v1/routers/media/images/ImagesRouter.openapi.js +11 -2
  571. package/build/src/core/infrastructure/api/v1/routers/media/images/ImagesRouter.openapi.js.map +1 -1
  572. package/build/src/core/infrastructure/api/v1/routers/media/live/openapi/VoiceSessionHttpSchemas.d.ts +1 -0
  573. package/build/src/core/infrastructure/api/v1/routers/media/live/openapi/VoiceSessionHttpSchemas.d.ts.map +1 -1
  574. package/build/src/core/infrastructure/api/v1/routers/media/live/openapi/VoiceSessionHttpSchemas.js +1 -0
  575. package/build/src/core/infrastructure/api/v1/routers/media/live/openapi/VoiceSessionHttpSchemas.js.map +1 -1
  576. package/build/src/core/infrastructure/api/v1/routers/media/shared/openapi/MediaHttpExamples.d.ts.map +1 -1
  577. package/build/src/core/infrastructure/api/v1/routers/media/shared/openapi/MediaHttpExamples.js +37 -25
  578. package/build/src/core/infrastructure/api/v1/routers/media/shared/openapi/MediaHttpExamples.js.map +1 -1
  579. package/build/src/core/infrastructure/api/v1/routers/models/ModelsRouter.openapi.d.ts +36 -34
  580. package/build/src/core/infrastructure/api/v1/routers/models/ModelsRouter.openapi.d.ts.map +1 -1
  581. package/build/src/core/infrastructure/api/v1/routers/models/ModelsRouter.openapi.js +51 -17
  582. package/build/src/core/infrastructure/api/v1/routers/models/ModelsRouter.openapi.js.map +1 -1
  583. package/build/src/core/infrastructure/api/v1/routers/models/catalogRepresentation.d.ts +4 -0
  584. package/build/src/core/infrastructure/api/v1/routers/models/catalogRepresentation.d.ts.map +1 -0
  585. package/build/src/core/infrastructure/api/v1/routers/models/catalogRepresentation.js +4 -0
  586. package/build/src/core/infrastructure/api/v1/routers/models/catalogRepresentation.js.map +1 -0
  587. package/build/src/core/infrastructure/api/v1/routers/runs/openapi/DurableRunSchemas.openapi.d.ts +5 -0
  588. package/build/src/core/infrastructure/api/v1/routers/runs/openapi/DurableRunSchemas.openapi.d.ts.map +1 -1
  589. package/build/src/core/infrastructure/api/v1/routers/runs/openapi/RunsRouter.openapi.d.ts +24 -9
  590. package/build/src/core/infrastructure/api/v1/routers/runs/openapi/RunsRouter.openapi.d.ts.map +1 -1
  591. package/build/src/core/infrastructure/api/v1/routers/runs/openapi/RunsRouter.openapi.js +1 -1
  592. package/build/src/core/infrastructure/api/v1/routers/runs/openapi/RunsRouter.openapi.js.map +1 -1
  593. package/build/src/core/infrastructure/di/builtInLLMProviders.d.ts.map +1 -1
  594. package/build/src/core/infrastructure/di/builtInLLMProviders.js +21 -5
  595. package/build/src/core/infrastructure/di/builtInLLMProviders.js.map +1 -1
  596. package/build/src/core/infrastructure/di/index.d.ts.map +1 -1
  597. package/build/src/core/infrastructure/di/index.js +67 -9
  598. package/build/src/core/infrastructure/di/index.js.map +1 -1
  599. package/build/src/core/infrastructure/di/types.d.ts +4 -1
  600. package/build/src/core/infrastructure/di/types.d.ts.map +1 -1
  601. package/build/src/core/infrastructure/di/types.js +4 -1
  602. package/build/src/core/infrastructure/di/types.js.map +1 -1
  603. package/build/src/core/infrastructure/mappers/chat/default/BasicChatMessageMapper.d.ts.map +1 -1
  604. package/build/src/core/infrastructure/mappers/chat/default/BasicChatMessageMapper.js +4 -6
  605. package/build/src/core/infrastructure/mappers/chat/default/BasicChatMessageMapper.js.map +1 -1
  606. package/build/src/core/infrastructure/mappers/chat/google/GeminiChatMessageMapper.d.ts.map +1 -1
  607. package/build/src/core/infrastructure/mappers/chat/google/GeminiChatMessageMapper.js +9 -0
  608. package/build/src/core/infrastructure/mappers/chat/google/GeminiChatMessageMapper.js.map +1 -1
  609. package/build/src/core/infrastructure/models/chat/completions/ChatCompletion.d.ts +1 -0
  610. package/build/src/core/infrastructure/models/chat/completions/ChatCompletion.d.ts.map +1 -1
  611. package/build/src/core/infrastructure/models/chat/completions/ChatCompletionMessageCodec.d.ts +1 -0
  612. package/build/src/core/infrastructure/models/chat/completions/ChatCompletionMessageCodec.d.ts.map +1 -1
  613. package/build/src/core/infrastructure/models/chat/completions/ChatCompletionResponseValidator.d.ts +4 -1
  614. package/build/src/core/infrastructure/models/chat/completions/ChatCompletionResponseValidator.d.ts.map +1 -1
  615. package/build/src/core/infrastructure/models/chat/completions/ChatCompletionResponseValidator.js +16 -14
  616. package/build/src/core/infrastructure/models/chat/completions/ChatCompletionResponseValidator.js.map +1 -1
  617. package/build/src/core/infrastructure/models/chat/completions/FetchChatCompletionResponse.d.ts +2 -1
  618. package/build/src/core/infrastructure/models/chat/completions/FetchChatCompletionResponse.d.ts.map +1 -1
  619. package/build/src/core/infrastructure/models/chat/completions/FetchChatCompletionResponse.js +2 -2
  620. package/build/src/core/infrastructure/models/chat/completions/FetchChatCompletionResponse.js.map +1 -1
  621. package/build/src/core/infrastructure/models/chat/completions/OpenAICompatibleChatCompletionProtocol.d.ts +3 -1
  622. package/build/src/core/infrastructure/models/chat/completions/OpenAICompatibleChatCompletionProtocol.d.ts.map +1 -1
  623. package/build/src/core/infrastructure/models/chat/completions/OpenAICompatibleChatCompletionProtocol.js +4 -1
  624. package/build/src/core/infrastructure/models/chat/completions/OpenAICompatibleChatCompletionProtocol.js.map +1 -1
  625. package/build/src/core/infrastructure/persistence/dao/knex/KnexMessageDao.d.ts.map +1 -1
  626. package/build/src/core/infrastructure/persistence/dao/knex/KnexMessageDao.js +6 -0
  627. package/build/src/core/infrastructure/persistence/dao/knex/KnexMessageDao.js.map +1 -1
  628. package/build/src/core/infrastructure/persistence/repositories/media/KnexMediaReferenceRecorder.d.ts.map +1 -1
  629. package/build/src/core/infrastructure/persistence/repositories/media/KnexMediaReferenceRecorder.js +13 -0
  630. package/build/src/core/infrastructure/persistence/repositories/media/KnexMediaReferenceRecorder.js.map +1 -1
  631. package/build/src/core/infrastructure/persistence/repositories/voice/KnexVoiceMediaLease.d.ts.map +1 -1
  632. package/build/src/core/infrastructure/persistence/repositories/voice/KnexVoiceMediaLease.js +2 -1
  633. package/build/src/core/infrastructure/persistence/repositories/voice/KnexVoiceMediaLease.js.map +1 -1
  634. package/build/src/core/infrastructure/persistence/repositories/voice/KnexVoiceSessionRepository.d.ts +4 -2
  635. package/build/src/core/infrastructure/persistence/repositories/voice/KnexVoiceSessionRepository.d.ts.map +1 -1
  636. package/build/src/core/infrastructure/persistence/repositories/voice/KnexVoiceSessionRepository.js +28 -11
  637. package/build/src/core/infrastructure/persistence/repositories/voice/KnexVoiceSessionRepository.js.map +1 -1
  638. package/build/src/core/infrastructure/services/audio/TranscriptionWav.js +1 -1
  639. package/build/src/core/infrastructure/services/audio/TranscriptionWav.js.map +1 -1
  640. package/build/src/core/infrastructure/services/chat/ChatCompletionStreamService.d.ts.map +1 -1
  641. package/build/src/core/infrastructure/services/chat/ChatCompletionStreamService.js +2 -0
  642. package/build/src/core/infrastructure/services/chat/ChatCompletionStreamService.js.map +1 -1
  643. package/build/src/core/infrastructure/services/chat/ProviderRequestUsage.js +1 -1
  644. package/build/src/core/infrastructure/services/chat/ProviderRequestUsage.js.map +1 -1
  645. package/build/src/core/infrastructure/services/media/ImageEditInputServiceImpl.d.ts +1 -0
  646. package/build/src/core/infrastructure/services/media/ImageEditInputServiceImpl.d.ts.map +1 -1
  647. package/build/src/core/infrastructure/services/media/ImageEditInputServiceImpl.js +44 -0
  648. package/build/src/core/infrastructure/services/media/ImageEditInputServiceImpl.js.map +1 -1
  649. package/build/src/core/infrastructure/services/media/PngAnimation.d.ts +3 -0
  650. package/build/src/core/infrastructure/services/media/PngAnimation.d.ts.map +1 -0
  651. package/build/src/core/infrastructure/services/media/PngAnimation.js +12 -0
  652. package/build/src/core/infrastructure/services/media/PngAnimation.js.map +1 -0
  653. package/build/src/core/infrastructure/services/media/SafeHttpRemoteMediaFetcher.d.ts +2 -0
  654. package/build/src/core/infrastructure/services/media/SafeHttpRemoteMediaFetcher.d.ts.map +1 -1
  655. package/build/src/core/infrastructure/services/media/SafeHttpRemoteMediaFetcher.js +19 -3
  656. package/build/src/core/infrastructure/services/media/SafeHttpRemoteMediaFetcher.js.map +1 -1
  657. package/build/src/core/infrastructure/services/runs/approval/DefaultRunApprovalService.d.ts +0 -2
  658. package/build/src/core/infrastructure/services/runs/approval/DefaultRunApprovalService.d.ts.map +1 -1
  659. package/build/src/core/infrastructure/services/runs/approval/DefaultRunApprovalService.js +19 -26
  660. package/build/src/core/infrastructure/services/runs/approval/DefaultRunApprovalService.js.map +1 -1
  661. package/build/src/core/infrastructure/services/runs/approval/RunToolInvocationLifecycleImpl.js +1 -0
  662. package/build/src/core/infrastructure/services/runs/approval/RunToolInvocationLifecycleImpl.js.map +1 -1
  663. package/build/src/core/infrastructure/services/runs/approval/resolveToolApprovalPolicy.d.ts +8 -0
  664. package/build/src/core/infrastructure/services/runs/approval/resolveToolApprovalPolicy.d.ts.map +1 -0
  665. package/build/src/core/infrastructure/services/runs/approval/resolveToolApprovalPolicy.js +18 -0
  666. package/build/src/core/infrastructure/services/runs/approval/resolveToolApprovalPolicy.js.map +1 -0
  667. package/build/src/core/infrastructure/services/security/AssuranceEvaluationServiceImpl.d.ts +2 -1
  668. package/build/src/core/infrastructure/services/security/AssuranceEvaluationServiceImpl.d.ts.map +1 -1
  669. package/build/src/core/infrastructure/services/security/AssuranceEvaluationServiceImpl.js +23 -18
  670. package/build/src/core/infrastructure/services/security/AssuranceEvaluationServiceImpl.js.map +1 -1
  671. package/build/src/core/infrastructure/services/voice/media/VoiceMediaWorkerSession.d.ts +1 -1
  672. package/build/src/core/infrastructure/services/voice/media/VoiceMediaWorkerSession.d.ts.map +1 -1
  673. package/build/src/core/infrastructure/services/voice/media/VoiceMediaWorkerSession.js +2 -1
  674. package/build/src/core/infrastructure/services/voice/media/VoiceMediaWorkerSession.js.map +1 -1
  675. package/build/src/infrastructure/api/openapi/root.openapi.js +1 -1
  676. package/build/src/infrastructure/api/openapi/root.openapi.js.map +1 -1
  677. package/build/src/infrastructure/server/cors.d.ts.map +1 -1
  678. package/build/src/infrastructure/server/cors.js +0 -1
  679. package/build/src/infrastructure/server/cors.js.map +1 -1
  680. package/build/src/infrastructure/websockets/adapters/ws/WSAdapter.d.ts.map +1 -1
  681. package/build/src/infrastructure/websockets/adapters/ws/WSAdapter.js +2 -1
  682. package/build/src/infrastructure/websockets/adapters/ws/WSAdapter.js.map +1 -1
  683. package/build/src/infrastructure/websockets/commands/realtime/WebsocketRealtimeTranslationCommand.d.ts.map +1 -1
  684. package/build/src/infrastructure/websockets/commands/realtime/WebsocketRealtimeTranslationCommand.js +18 -7
  685. package/build/src/infrastructure/websockets/commands/realtime/WebsocketRealtimeTranslationCommand.js.map +1 -1
  686. package/build/src/infrastructure/websockets/mediators/WebsocketMediator.d.ts +1 -0
  687. package/build/src/infrastructure/websockets/mediators/WebsocketMediator.d.ts.map +1 -1
  688. package/build/src/infrastructure/websockets/mediators/WebsocketMediator.js +20 -1
  689. package/build/src/infrastructure/websockets/mediators/WebsocketMediator.js.map +1 -1
  690. package/build/src/infrastructure/workers/voice/startVoiceMediaHostFromContainer.d.ts.map +1 -1
  691. package/build/src/infrastructure/workers/voice/startVoiceMediaHostFromContainer.js +4 -1
  692. package/build/src/infrastructure/workers/voice/startVoiceMediaHostFromContainer.js.map +1 -1
  693. package/build/src/modules/admin/infrastructure/api/v1/AdminController.d.ts +2 -0
  694. package/build/src/modules/admin/infrastructure/api/v1/AdminController.d.ts.map +1 -1
  695. package/build/src/modules/admin/infrastructure/api/v1/AdminController.js +18 -3
  696. package/build/src/modules/admin/infrastructure/api/v1/AdminController.js.map +1 -1
  697. package/build/src/modules/admin/infrastructure/api/v1/AdminRouter.d.ts.map +1 -1
  698. package/build/src/modules/admin/infrastructure/api/v1/AdminRouter.js +1 -0
  699. package/build/src/modules/admin/infrastructure/api/v1/AdminRouter.js.map +1 -1
  700. package/build/src/modules/admin/infrastructure/api/v1/openapi/AdminExamples.openapi.d.ts.map +1 -1
  701. package/build/src/modules/admin/infrastructure/api/v1/openapi/AdminExamples.openapi.js +3 -0
  702. package/build/src/modules/admin/infrastructure/api/v1/openapi/AdminExamples.openapi.js.map +1 -1
  703. package/build/src/modules/admin/infrastructure/api/v1/openapi/AdminRouter.openapi.d.ts.map +1 -1
  704. package/build/src/modules/admin/infrastructure/api/v1/openapi/AdminRouter.openapi.js +18 -0
  705. package/build/src/modules/admin/infrastructure/api/v1/openapi/AdminRouter.openapi.js.map +1 -1
  706. package/build/src/modules/code-review/infrastructure/auth/GitHubActionsWorkflowApprovalConfig.d.ts.map +1 -1
  707. package/build/src/modules/code-review/infrastructure/auth/GitHubActionsWorkflowApprovalConfig.js +17 -45
  708. package/build/src/modules/code-review/infrastructure/auth/GitHubActionsWorkflowApprovalConfig.js.map +1 -1
  709. package/build/src/modules/code-review/infrastructure/persistence/repositories/KnexCodeReviewRepository.d.ts.map +1 -1
  710. package/build/src/modules/code-review/infrastructure/persistence/repositories/KnexCodeReviewRepository.js +8 -2
  711. package/build/src/modules/code-review/infrastructure/persistence/repositories/KnexCodeReviewRepository.js.map +1 -1
  712. package/build/src/modules/workspaces/infrastructure/recovery/operator/authority/observer/ExecutionSources.js +1 -1
  713. package/package.json +4 -3
  714. package/resources/prompts/live-conversation.md +1 -0
  715. package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsConfig.d.ts +0 -3
  716. package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsConfig.d.ts.map +0 -1
  717. package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsConfig.js +0 -64
  718. package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsConfig.js.map +0 -1
  719. package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsLLMProvider.d.ts +0 -26
  720. package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsLLMProvider.d.ts.map +0 -1
  721. package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsLLMProvider.js +0 -121
  722. package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsLLMProvider.js.map +0 -1
  723. package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsService.d.ts +0 -18
  724. package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsService.d.ts.map +0 -1
  725. package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsService.js +0 -73
  726. package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsService.js.map +0 -1
  727. package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaConfig.d.ts +0 -3
  728. package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaConfig.d.ts.map +0 -1
  729. package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaConfig.js +0 -147
  730. package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaConfig.js.map +0 -1
@@ -0,0 +1,43 @@
1
+ import { randomUUID } from 'node:crypto';
2
+ import { GoogleAuth } from 'google-auth-library';
3
+ import { VideoGenerationFailure } from '../../../../domain/models/videos/VideoGenerationRequest.js';
4
+ import { readBoundedResponse } from './omni/OmniVideoProtocol.js';
5
+ /** A fresh, server-chosen directory limits delivery to this one rendering request. */
6
+ export class VertexVeoOutput {
7
+ bucket;
8
+ directory = 'gaia/video-output/' + randomUUID() + '/';
9
+ uri;
10
+ constructor(bucket) {
11
+ this.bucket = bucket;
12
+ if (!/^[a-z0-9][a-z0-9._-]{1,220}[a-z0-9]$/.test(bucket)) {
13
+ throw new VideoGenerationFailure('video_not_configured', 503, 'Invalid Vertex video output bucket.');
14
+ }
15
+ this.uri = 'gs://' + bucket + '/' + this.directory;
16
+ }
17
+ async read(uri, limit, signal) {
18
+ const suffix = uri.startsWith(this.uri) ? uri.slice(this.uri.length) : '';
19
+ // Google names the result sample_0.mp4 and can nest it under a generated folder.
20
+ if (suffix.length > 1024 || !/^(?:[A-Za-z0-9_-]+\/)*[A-Za-z0-9_-]+\.mp4$/.test(suffix)) {
21
+ throw this.deliveryFailure();
22
+ }
23
+ signal.throwIfAborted();
24
+ const object = encodeURIComponent(this.directory + suffix);
25
+ const url = 'https://storage.googleapis.com/storage/v1/b/' + encodeURIComponent(this.bucket) + '/o/' + object + '?alt=media';
26
+ const auth = new GoogleAuth({ scopes: ['https://www.googleapis.com/auth/cloud-platform'] });
27
+ const headers = await auth.getRequestHeaders(url);
28
+ const response = await fetch(url, { headers, signal, redirect: 'error' });
29
+ const type = response.headers.get('content-type')?.split(';')[0].trim().toLowerCase();
30
+ if (!response.ok || (type !== 'video/mp4' && type !== 'application/octet-stream')) {
31
+ await response.body?.cancel();
32
+ throw this.deliveryFailure();
33
+ }
34
+ const bytes = await readBoundedResponse(response, limit);
35
+ if (!bytes.length)
36
+ throw this.deliveryFailure();
37
+ return bytes;
38
+ }
39
+ deliveryFailure() {
40
+ return new VideoGenerationFailure('video_delivery_failed', 502, 'The generated Vertex video could not be retrieved.', true);
41
+ }
42
+ }
43
+ //# sourceMappingURL=VertexVeoOutput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VertexVeoOutput.js","sourceRoot":"","sources":["../../../../../../../src/core/infrastructure/ai/videos/google/VertexVeoOutput.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,4DAA4D,CAAC;AACpG,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAElE,sFAAsF;AACtF,MAAM,OAAO,eAAe;IAIG;IAHZ,SAAS,GAAG,oBAAoB,GAAG,UAAU,EAAE,GAAG,GAAG,CAAC;IAC9D,GAAG,CAAS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,EAAE,OAAO,EAAE,CAAC,CAAC;QAC1E,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QACtF,IAAI,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,IAAI,KAAK,WAAW,IAAI,IAAI,KAAK,0BAA0B,CAAC,EAAE,CAAC;YAClF,MAAM,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;YAC9B,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;QAC/B,CAAC;QACD,MAAM,KAAK,GAAG,MAAM,mBAAmB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;QACzD,IAAI,CAAC,KAAK,CAAC,MAAM;YAAE,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;QAChD,OAAO,KAAK,CAAC;IACf,CAAC;IAEO,eAAe;QACrB,OAAO,IAAI,sBAAsB,CAAC,uBAAuB,EAAE,GAAG,EAAE,oDAAoD,EAAE,IAAI,CAAC,CAAC;IAC9H,CAAC;CACF"}
@@ -1,11 +1,12 @@
1
+ import type { GoogleGenAiConnection } from '../../../google/GoogleGenAiConnection.js';
1
2
  import type { GenerateVideoParams } from '../../../../../domain/ports/ai/videos/VideoGenerationProvider.js';
2
3
  import { ensureOmniValidationReady } from './OmniVideoOutput.js';
3
4
  export declare class OmniVideoAdapter {
4
5
  private readonly executor?;
5
6
  private readonly checkValidationReadiness;
6
7
  private readonly storageLimit;
7
- constructor(executor?: ((apiKey: string, params: GenerateVideoParams, signal: AbortSignal, deadline: AbortSignal, maximumBytes: number) => Promise<Uint8Array>) | undefined, checkValidationReadiness?: typeof ensureOmniValidationReady, storageLimit?: () => number | undefined);
8
- generate(apiKey: string, params: GenerateVideoParams): Promise<Uint8Array>;
8
+ constructor(executor?: ((connection: GoogleGenAiConnection, params: GenerateVideoParams, signal: AbortSignal, deadline: AbortSignal, maximumBytes: number) => Promise<Uint8Array>) | undefined, checkValidationReadiness?: typeof ensureOmniValidationReady, storageLimit?: () => number | undefined);
9
+ generate(connection: GoogleGenAiConnection, params: GenerateVideoParams): Promise<Uint8Array>;
9
10
  private validateExecution;
10
11
  private request;
11
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"OmniVideoAdapter.d.ts","sourceRoot":"","sources":["../../../../../../../../src/core/infrastructure/ai/videos/google/omni/OmniVideoAdapter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kEAAkE,CAAC;AAM5G,OAAO,EAAE,yBAAyB,EAAqB,MAAM,sBAAsB,CAAC;AAGpF,qBAAa,gBAAgB;IAEzB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC;IAO1B,OAAO,CAAC,QAAQ,CAAC,wBAAwB;IACzC,OAAO,CAAC,QAAQ,CAAC,YAAY;gBARZ,QAAQ,CAAC,GAAE,CAC1B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,WAAW,EACnB,QAAQ,EAAE,WAAW,EACrB,YAAY,EAAE,MAAM,KACjB,OAAO,CAAC,UAAU,CAAC,aAAA,EACP,wBAAwB,mCAA4B,EACpD,YAAY,GAAE,MAAM,MAAM,GAAG,SAA2B;IAGrE,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,CAAC;IAgChF,OAAO,CAAC,iBAAiB;IAkBzB,OAAO,CAAC,OAAO;CAsFhB"}
1
+ {"version":3,"file":"OmniVideoAdapter.d.ts","sourceRoot":"","sources":["../../../../../../../../src/core/infrastructure/ai/videos/google/omni/OmniVideoAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AAEtF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kEAAkE,CAAC;AAM5G,OAAO,EAAE,yBAAyB,EAAqB,MAAM,sBAAsB,CAAC;AAGpF,qBAAa,gBAAgB;IAEzB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC;IAO1B,OAAO,CAAC,QAAQ,CAAC,wBAAwB;IACzC,OAAO,CAAC,QAAQ,CAAC,YAAY;gBARZ,QAAQ,CAAC,GAAE,CAC1B,UAAU,EAAE,qBAAqB,EACjC,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,WAAW,EACnB,QAAQ,EAAE,WAAW,EACrB,YAAY,EAAE,MAAM,KACjB,OAAO,CAAC,UAAU,CAAC,aAAA,EACP,wBAAwB,mCAA4B,EACpD,YAAY,GAAE,MAAM,MAAM,GAAG,SAA2B;IAGrE,QAAQ,CAAC,UAAU,EAAE,qBAAqB,EAAE,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,CAAC;IAgCnG,OAAO,CAAC,iBAAiB;IAkBzB,OAAO,CAAC,OAAO;CAsFhB"}
@@ -11,8 +11,8 @@ export class OmniVideoAdapter {
11
11
  this.checkValidationReadiness = checkValidationReadiness;
12
12
  this.storageLimit = storageLimit;
13
13
  }
14
- async generate(apiKey, params) {
15
- this.validateExecution(apiKey, params.userId);
14
+ async generate(connection, params) {
15
+ this.validateExecution(connection, params.userId);
16
16
  const maximumBytes = omniOutputByteLimit(this.storageLimit());
17
17
  const deadline = AbortSignal.timeout(OMNI_VIDEO_DEADLINE_MS);
18
18
  const signal = params.abortSignal ? AbortSignal.any([params.abortSignal, deadline]) : deadline;
@@ -22,7 +22,7 @@ export class OmniVideoAdapter {
22
22
  await this.checkValidationReadiness(signal);
23
23
  throwIfVideoAborted(signal);
24
24
  executionStarted = true;
25
- const bytes = await (this.executor ?? this.request.bind(this))(apiKey, params, signal, deadline, maximumBytes);
25
+ const bytes = await (this.executor ?? this.request.bind(this))(connection, params, signal, deadline, maximumBytes);
26
26
  throwIfVideoAborted(signal, true);
27
27
  await validateOmniBytes(bytes, { ...params, abortSignal: signal }, undefined, maximumBytes);
28
28
  return bytes;
@@ -32,18 +32,18 @@ export class OmniVideoAdapter {
32
32
  throw error;
33
33
  }
34
34
  }
35
- validateExecution(apiKey, user) {
35
+ validateExecution(connection, user) {
36
36
  if (!user) {
37
37
  throw new VideoGenerationFailure('video_auth_required', 401, 'Video generation requires an authenticated user.');
38
38
  }
39
- if (!apiKey) {
39
+ if (connection.kind === 'developer' && !connection.apiKey) {
40
40
  throw new VideoGenerationFailure('video_not_configured', 503, 'Google video generation is not configured.');
41
41
  }
42
42
  }
43
- request(apiKey, params, signal, _deadline, maximumBytes) {
43
+ request(connection, params, signal, _deadline, maximumBytes) {
44
44
  const extension = import.meta.url.endsWith('.ts') ? 'ts' : 'js';
45
45
  const worker = new Worker(new URL(`./OmniVideoWorker.${extension}`, import.meta.url), {
46
- workerData: { apiKey, params: { ...params, abortSignal: undefined }, maximumBytes },
46
+ workerData: { connection, params: { ...params, abortSignal: undefined }, maximumBytes },
47
47
  });
48
48
  return new Promise((resolve, reject) => {
49
49
  const cleanup = () => {
@@ -1 +1 @@
1
- {"version":3,"file":"OmniVideoAdapter.js","sourceRoot":"","sources":["../../../../../../../../src/core/infrastructure/ai/videos/google/omni/OmniVideoAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,+DAA+D,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D,MAAM,OAAO,gBAAgB;IAER;IAOA;IACA;IATnB,YACmB,QAMO,EACP,2BAA2B,yBAAyB,EACpD,eAAyC,GAAG,EAAE,CAAC,SAAS;QARxD,aAAQ,GAAR,QAAQ,CAMD;QACP,6BAAwB,GAAxB,wBAAwB,CAA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CACF"}
1
+ {"version":3,"file":"OmniVideoAdapter.js","sourceRoot":"","sources":["../../../../../../../../src/core/infrastructure/ai/videos/google/omni/OmniVideoAdapter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,+DAA+D,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D,MAAM,OAAO,gBAAgB;IAER;IAOA;IACA;IATnB,YACmB,QAMO,EACP,2BAA2B,yBAAyB,EACpD,eAAyC,GAAG,EAAE,CAAC,SAAS;QARxD,aAAQ,GAAR,QAAQ,CAMD;QACP,6BAAwB,GAAxB,wBAAwB,CAA4B;QACpD,iBAAY,GAAZ,YAAY,CAA4C;IACxE,CAAC;IAEJ,KAAK,CAAC,QAAQ,CAAC,UAAiC,EAAE,MAA2B;QAC3E,IAAI,CAAC,iBAAiB,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;QAClD,MAAM,YAAY,GAAG,mBAAmB,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;QAC9D,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;QAC/F,mBAAmB,CAAC,MAAM,CAAC,CAAC;QAC5B,IAAI,gBAAgB,GAAG,KAAK,CAAC;QAE7B,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC,CAAC;YAC5C,mBAAmB,CAAC,MAAM,CA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F,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE;gBACxB,OAAO,EAAE,CAAC;gBACV,MAAM,CACJ,IAAI,sBAAsB,CACxB,uBAAuB,EACvB,GAAG,EACH,0BAA0B,EAC1B,IAAI,CACL,CACF,CAAC;YACJ,CAAC,CAAC,CAAC;YACH,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE;gBACvB,OAAO,EAAE,CAAC;gBACV,MAAM,CACJ,IAAI,sBAAsB,CACxB,uBAAuB,EACvB,GAAG,EACH,wCAAwC,EACxC,IAAI,CACL,CACF,CAAC;YACJ,CAAC,CAAC,CAAC;YACH,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;YAExD,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;gBACnB,KAAK,EAAE,CAAC;YACV,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"OmniVideoOutput.d.ts","sourceRoot":"","sources":["../../../../../../../../src/core/infrastructure/ai/videos/google/omni/OmniVideoOutput.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kEAAkE,CAAC;AAO5G,KAAK,mBAAmB,GAAG,IAAI,CAAC,cAAc,kBAAkB,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,IAAI,CAAC,CAAC;AAInG,UAAU,cAAc;IACtB,MAAM,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/B,OAAO,CAAC,EAAE,KAAK,CAAC;QACd,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC,CAAC;CACJ;AAID,wBAAsB,yBAAyB,CAC7C,MAAM,CAAC,EAAE,WAAW,EACpB,UAAU,SAAwC,GACjD,OAAO,CAAC,IAAI,CAAC,CAuBf;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,cAAc,EAAE,MAAM,EAAE,mBAAmB,GAAG,IAAI,CAU5F;AA8CD,wBAAsB,iBAAiB,CACrC,KAAK,EAAE,UAAU,EACjB,MAAM,EAAE,mBAAmB,EAC3B,KAAK,GAAE,mBAAiC,EACxC,YAAY,SAAmB,GAC9B,OAAO,CAAC,IAAI,CAAC,CA+Bf"}
1
+ {"version":3,"file":"OmniVideoOutput.d.ts","sourceRoot":"","sources":["../../../../../../../../src/core/infrastructure/ai/videos/google/omni/OmniVideoOutput.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kEAAkE,CAAC;AAQ5G,KAAK,mBAAmB,GAAG,IAAI,CAAC,cAAc,kBAAkB,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,IAAI,CAAC,CAAC;AAInG,UAAU,cAAc;IACtB,MAAM,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/B,OAAO,CAAC,EAAE,KAAK,CAAC;QACd,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC,CAAC;CACJ;AAID,wBAAsB,yBAAyB,CAC7C,MAAM,CAAC,EAAE,WAAW,EACpB,UAAU,SAAwC,GACjD,OAAO,CAAC,IAAI,CAAC,CAuBf;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,cAAc,EAAE,MAAM,EAAE,mBAAmB,GAAG,IAAI,CAU5F;AA8CD,wBAAsB,iBAAiB,CACrC,KAAK,EAAE,UAAU,EACjB,MAAM,EAAE,mBAAmB,EAC3B,KAAK,GAAE,mBAAiC,EACxC,YAAY,SAAmB,GAC9B,OAAO,CAAC,IAAI,CAAC,CA+Bf"}
@@ -4,7 +4,7 @@ import { tmpdir } from 'node:os';
4
4
  import { join } from 'node:path';
5
5
  import { promisify } from 'node:util';
6
6
  import { fileTypeFromBuffer } from 'file-type';
7
- import { throwIfVideoAborted, VideoGenerationFailure, } from '../../../../../domain/models/videos/VideoGenerationRequest.js';
7
+ import { isOmniVideoModel, throwIfVideoAborted, VideoGenerationFailure, } from '../../../../../domain/models/videos/VideoGenerationRequest.js';
8
8
  import { OMNI_VIDEO_LIMIT } from './OmniVideoProtocol.js';
9
9
  const nativeFiles = { mkdtemp, writeFile, rm };
10
10
  export async function ensureOmniValidationReady(signal, executable = process.env.FFPROBE_PATH || 'ffprobe') {
@@ -31,17 +31,17 @@ export function validateOmniMetadata(info, params) {
31
31
  if (streams.length !== 1) {
32
32
  throw invalidMp4();
33
33
  }
34
- validateVideoTiming(video, info.format?.duration);
34
+ validateVideoTiming(video, info.format?.duration, params.model && isOmniVideoModel(params.model) ? 15 : 10);
35
35
  validateVideoGeometry(video, params);
36
36
  }
37
- function validateVideoTiming(video, formatDuration) {
37
+ function validateVideoTiming(video, formatDuration, maxDuration) {
38
38
  const duration = Number(video.duration ?? formatDuration);
39
39
  const [numerator, denominator] = (video.avg_frame_rate ?? '').split('/').map(Number);
40
40
  const rate = numerator / denominator;
41
41
  const packets = Number(video.nb_read_packets);
42
42
  if (!Number.isFinite(duration) ||
43
43
  duration < 2.8 ||
44
- duration > 10.2 ||
44
+ duration > maxDuration + 0.2 ||
45
45
  !Number.isFinite(rate) ||
46
46
  Math.abs(rate - 24) > 0.5 ||
47
47
  !Number.isFinite(packets) ||
@@ -1 +1 @@
1
- {"version":3,"file":"OmniVideoOutput.js","s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EAAE,CAAC;QAC5C,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAK,KAA+B,EAAE,IAAI,KAAK,QAAQ,EAAE,CAAC;QACxD,OAAO,IAAI,sBAAsB,CAC/B,8BAA8B,EAC9B,GAAG,EACH,mDAAmD,EACnD,IAAI,CACL,CAAC;IACJ,CAAC;IAED,OAAO,UAAU,EAAE,CAAC;AACtB,CAAC"}
1
+ {"version":3,"file":"OmniVideoOutput.js","sourceRoot":"","sources":["../../../../../../../../src/core/infrastructure/ai/videos/google/omni/OmniVideoOutput.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,+DAA+D,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAI1D,MAAM,WAAW,GAAwB,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;AAgBpE,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAC7C,MAAoB,EACpB,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,SAAS;IAElD,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAE5B,IAAI,CAAC;QACH,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,SAAS,CAAC,QAAQ,CAAC,CAAC,UAAU,EAAE,CAAC,UAAU,CAAC,EAAE;YACrE,OAAO,EAAE,IAAI;YACb,SAAS,EAAE,EAAE,GAAG,IA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ACH,yGAAyG,EACzG,IAAI,CACL,CAAC;AACJ,CAAC;AAED,SAAS,qBAAqB,CAAC,KAAc,EAAE,MAAoB;IACjE,IAAI,MAAM,EAAE,OAAO,EAAE,CAAC;QACpB,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,IAAI,KAAK,cAAc,CAAC;QAExD,OAAO,IAAI,sBAAsB,CAC/B,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,iBAAiB,EAC9C,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EACpB,8DAA8D,EAC9D,IAAI,CACL,CAAC;IACJ,CAAC;IAED,IAAI,KAAK,YAAY,sBAAsB,EAAE,CAAC;QAC5C,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAK,KAA+B,EAAE,IAAI,KAAK,QAAQ,EAAE,CAAC;QACxD,OAAO,IAAI,sBAAsB,CAC/B,8BAA8B,EAC9B,GAAG,EACH,mDAAmD,EACnD,IAAI,CACL,CAAC;IACJ,CAAC;IAED,OAAO,UAAU,EAAE,CAAC;AACtB,CAAC"}
@@ -5,7 +5,7 @@ export declare const OMNI_VIDEO_LIMIT: number;
5
5
  export declare const OMNI_DEFAULT_STORAGE_LIMIT: number;
6
6
  export declare const OMNI_INLINE_JSON_LIMIT: number;
7
7
  export declare function omniOutputByteLimit(storageLimit?: number): number;
8
- export declare function buildOmniRequest(params: GenerateVideoParams): {
8
+ export declare function buildOmniRequest(params: GenerateVideoParams, model?: string): {
9
9
  model: string;
10
10
  input: string | ({
11
11
  type: "image";
@@ -25,11 +25,12 @@ export declare function buildOmniRequest(params: GenerateVideoParams): {
25
25
  delivery: "inline";
26
26
  };
27
27
  };
28
- export declare function extractOmniVideo(value: unknown): {
28
+ export declare function extractOmniVideo(value: unknown, expectedModel?: string): {
29
29
  uri?: string;
30
30
  data?: string;
31
31
  };
32
32
  export declare function decodeOmniVideo(data: string, maximumBytes?: number): Uint8Array;
33
33
  export declare function validateOmniDeliveryUrl(value: string): URL;
34
+ export declare function boundedVideoJson(response: Response, limit: number): Promise<Response>;
34
35
  export declare function readBoundedResponse(response: Response, limit: number): Promise<Uint8Array>;
35
36
  //# sourceMappingURL=OmniVideoProtocol.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"OmniVideoProtocol.d.ts","sourceRoot":"","sources":["../../../../../../../../src/core/infrastructure/ai/videos/google/omni/OmniVideoProtocol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kEAAkE,CAAC;AAG5G,eAAO,MAAM,iBAAiB,0BAA0B,CAAC;AACzD,eAAO,MAAM,eAAe,QAAkB,CAAC;AAC/C,eAAO,MAAM,gBAAgB,QAAmB,CAAC;AACjD,eAAO,MAAM,0BAA0B,QAAmB,CAAC;AAE3D,eAAO,MAAM,sBAAsB,QAAwD,CAAC;AAE5F,wBAAgB,mBAAmB,CAAC,YAAY,SAA6B,GAAG,MAAM,CAUrF;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,mBAAmB;;;;;;;;;;;;;;;;;;;EA8C3D;AAQD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAkBhF;AAqDD,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,SAAmB,GAAG,UAAU,CA2BzF;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,CA0B1D;AAWD,wBAAsB,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAuChG"}
1
+ {"version":3,"file":"OmniVideoProtocol.d.ts","sourceRoot":"","sources":["../../../../../../../../src/core/infrastructure/ai/videos/google/omni/OmniVideoProtocol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kEAAkE,CAAC;AAG5G,eAAO,MAAM,iBAAiB,0BAA0B,CAAC;AACzD,eAAO,MAAM,eAAe,QAAkB,CAAC;AAC/C,eAAO,MAAM,gBAAgB,QAAmB,CAAC;AACjD,eAAO,MAAM,0BAA0B,QAAmB,CAAC;AAE3D,eAAO,MAAM,sBAAsB,QAAwD,CAAC;AAE5F,wBAAgB,mBAAmB,CAAC,YAAY,SAA6B,GAAG,MAAM,CAUrF;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,mBAAmB,EAAE,KAAK,SAAoB;;;;;;;;;;;;;;;;;;;EA8CtF;AAQD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,EAAE,aAAa,SAAoB,GAAG;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAoBnH;AAqDD,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,SAAmB,GAAG,UAAU,CA2BzF;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,CA0B1D;AAWD,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAM3F;AAED,wBAAsB,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAuChG"}
@@ -11,7 +11,7 @@ export function omniOutputByteLimit(storageLimit = OMNI_DEFAULT_STORAGE_LIMIT) {
11
11
  }
12
12
  return Math.min(storageLimit, OMNI_VIDEO_LIMIT);
13
13
  }
14
- export function buildOmniRequest(params) {
14
+ export function buildOmniRequest(params, model = OMNI_NATIVE_MODEL) {
15
15
  const references = params.references ?? [];
16
16
  const sources = [];
17
17
  const subjects = [];
@@ -43,7 +43,7 @@ export function buildOmniRequest(params) {
43
43
  ]
44
44
  : text;
45
45
  return {
46
- model: OMNI_NATIVE_MODEL,
46
+ model,
47
47
  input,
48
48
  background: false,
49
49
  store: false,
@@ -62,12 +62,14 @@ function record(value) {
62
62
  ? value
63
63
  : undefined;
64
64
  }
65
- export function extractOmniVideo(value) {
65
+ export function extractOmniVideo(value, expectedModel = OMNI_NATIVE_MODEL) {
66
66
  const response = record(value);
67
67
  if (response?.status !== 'completed') {
68
68
  throw invalidOutput();
69
69
  }
70
- if (response.model !== undefined && response.model !== OMNI_NATIVE_MODEL) {
70
+ // Google transparently serves Developer API requests for Omni 1.1 using Omni 1.2.
71
+ const upgradedAlias = expectedModel === OMNI_NATIVE_MODEL && response.model === 'gemini-omni-1.2-flash';
72
+ if (response.model !== undefined && response.model !== expectedModel && !upgradedAlias) {
71
73
  throw invalidOutput();
72
74
  }
73
75
  const videos = collectOutputVideos(response);
@@ -146,6 +148,13 @@ export function validateOmniDeliveryUrl(value) {
146
148
  function invalidDelivery() {
147
149
  return new VideoGenerationFailure('video_invalid_output', 502, 'The video provider returned invalid delivery data.', true);
148
150
  }
151
+ export async function boundedVideoJson(response, limit) {
152
+ const bytes = await readBoundedResponse(response, limit);
153
+ const headers = new Headers(response.headers);
154
+ headers.delete('content-encoding');
155
+ headers.set('content-length', String(bytes.length));
156
+ return new Response(Buffer.from(bytes), { status: response.status, statusText: response.statusText, headers });
157
+ }
149
158
  export async function readBoundedResponse(response, limit) {
150
159
  const declared = response.headers.get('content-length');
151
160
  if (declared && Number(declared) > limit) {
@@ -1 +1 @@
1
- {"version":3,"file":"OmniVideoProtocol.js","sourceRoot":"","sources":["../../../../../../../../src/core/infrastructure/ai/videos/google/omni/OmniVideoProtocol.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+DAA+D,CAAC;AAEvG,MAAM,CAAC,MAAM,iBAAiB,GAAG,uBAAuB,CAAC;AACzD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI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;QAC7C,MAAM,CAAC,WAAW,EAAE,CAAC;IACvB,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"OmniVideoProtocol.js","sourceRoot":"","sources":["../../../../../../../../src/core/infrastructure/ai/videos/google/omni/OmniVideoProtocol.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+DAA+D,CAAC;AAEvG,MAAM,CAAC,MAAM,iBAAiB,GAAG,uBAAuB,CAAC;AACzD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;AAC/C,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AACjD,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAC3D,mGAAmG;AACnG,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC,IAAI,CAAC,gBAAgB,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,eAAe,CAAC;AAE5F,MAAM,UAAU,mBAAmB,CAAC,YAAY,GAAG,0BAA0B;IAC3E,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,YAAY,CAAC,IAAI,YAAY,GAAG,CAAC,EAAE,CAAC;QAC5D,MAAM,IAAI,sBAAsB,CAC9B,sBAAsB,EACtB,GAAG,EACH,6DAA6D,CAC9D,CAAC;IACJ,CAAC;IAED,OAAO,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAC;AAClD,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,MAA2B,EAAE,KAAK,GAAG,iBAAiB;IACrF,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC;IAC3C,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,MAAM,QAAQ,GAAa,EAAE,CAAC;IAC9B,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,UAAU,CAAC,OAAO,CAAC,CAAC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../../domain/models/videos/VideoGenerationRequest.js';
2
+ import { createGoogleGenAiClient } from '../../../google/GoogleGenAiConnection.js';
3
+ import { OMNI_VIDEO_DEADLINE_MS, VERTEX_OMNI_VIDEO_MODEL, VideoGenerationFailure } from '../../../../../domain/models/videos/VideoGenerationRequest.js';
4
4
  import { normalizeOmniFailure } from './OmniVideoFailure.js';
5
5
  import { awaitOmniFile, downloadOmniVideo } from './OmniVideoDelivery.js';
6
- import { buildOmniRequest, decodeOmniVideo, extractOmniVideo, OMNI_JSON_LIMIT, omniOutputByteLimit, readBoundedResponse, validateOmniDeliveryUrl, } from './OmniVideoProtocol.js';
6
+ import { buildOmniRequest, decodeOmniVideo, extractOmniVideo, OMNI_JSON_LIMIT, OMNI_NATIVE_MODEL, omniOutputByteLimit, boundedVideoJson, validateOmniDeliveryUrl, } from './OmniVideoProtocol.js';
7
7
  const input = workerData;
8
8
  const maximumBytes = omniOutputByteLimit(input.maximumBytes);
9
9
  const deadline = AbortSignal.timeout(OMNI_VIDEO_DEADLINE_MS);
10
- const nativeFetch = globalThis.fetch;
11
- // The SDK has no public per-client fetch hook. This override is confined to this request's worker.
12
- globalThis.fetch = async (resource, init) => {
10
+ const connection = input.connection;
11
+ const boundedFetch = async (resource, init) => {
13
12
  const url = resource instanceof Request ? resource.url : String(resource);
14
- validateOmniDeliveryUrl(url);
13
+ if (connection.kind === 'developer') {
14
+ validateOmniDeliveryUrl(url);
15
+ }
16
+ else {
17
+ const endpoint = new URL(url);
18
+ const hostname = connection.location === 'global' ? 'aiplatform.googleapis.com' : connection.location + '-aiplatform.googleapis.com';
19
+ const path = '/projects/' + connection.project + '/locations/' + connection.location + '/interactions';
20
+ if (endpoint.origin !== 'https://' + hostname || !endpoint.pathname.endsWith(path)) {
21
+ throw new VideoGenerationFailure('video_invalid_output', 502, 'Unexpected Vertex API endpoint.', true);
22
+ }
23
+ }
15
24
  const signal = init?.signal ?? (resource instanceof Request ? resource.signal : undefined);
16
- const response = await nativeFetch(resource, {
25
+ const response = await fetch(resource, {
17
26
  ...init,
18
27
  redirect: 'error',
19
28
  signal: signal ? AbortSignal.any([signal, deadline]) : deadline,
@@ -21,32 +30,27 @@ globalThis.fetch = async (resource, init) => {
21
30
  const limit = response.ok && new URL(url).pathname.endsWith('/interactions')
22
31
  ? Math.ceil(maximumBytes / 3) * 4 + OMNI_JSON_LIMIT
23
32
  : OMNI_JSON_LIMIT;
24
- const bytes = await readBoundedResponse(response, limit);
25
- const headers = new Headers(response.headers);
26
- headers.delete('content-encoding');
27
- headers.set('content-length', String(bytes.length));
28
- return new Response(Buffer.from(bytes), {
29
- status: response.status,
30
- statusText: response.statusText,
31
- headers,
32
- });
33
+ return boundedVideoJson(response, limit);
33
34
  };
34
35
  async function run() {
35
- const ai = new GoogleGenAI({
36
- apiKey: input.apiKey,
37
- httpOptions: { timeout: OMNI_VIDEO_DEADLINE_MS, retryOptions: { attempts: 1 } },
36
+ const ai = createGoogleGenAiClient(connection, {
37
+ httpOptions: { timeout: OMNI_VIDEO_DEADLINE_MS, retryOptions: { attempts: 1 }, fetch: boundedFetch },
38
38
  });
39
- const response = await ai.interactions.create(buildOmniRequest(input.params), {
39
+ const model = connection.kind === 'vertex' ? VERTEX_OMNI_VIDEO_MODEL.split('/')[1] : OMNI_NATIVE_MODEL;
40
+ const response = await ai.interactions.create(buildOmniRequest(input.params, model), {
40
41
  timeout: OMNI_VIDEO_DEADLINE_MS,
41
42
  fetchOptions: { signal: deadline },
42
43
  maxRetries: 0,
43
44
  });
44
- const video = extractOmniVideo(response);
45
+ const video = extractOmniVideo(response, model);
45
46
  if (video.data) {
46
47
  return decodeOmniVideo(video.data, maximumBytes);
47
48
  }
49
+ if (connection.kind === 'vertex') {
50
+ throw new VideoGenerationFailure('video_invalid_output', 502, 'Vertex did not return the requested inline video.', true);
51
+ }
48
52
  await awaitOmniFile((name, signal) => ai.files.get({ name, config: { abortSignal: signal } }), video.uri, deadline, undefined, maximumBytes);
49
- return downloadOmniVideo(video.uri, input.apiKey, deadline, nativeFetch, maximumBytes);
53
+ return downloadOmniVideo(video.uri, connection.apiKey, deadline, fetch, maximumBytes);
50
54
  }
51
55
  try {
52
56
  const bytes = await run();
@@ -1 +1 @@
1
- {"version":3,"file":"OmniVideoWorker.js","sourceRoot":"","sources":["../../../../../../../../src/core/infrastructure/ai/videos/google/omni/OmniVideoWorker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,+DAA+D,CAAC;AACvG,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,KAAK,GAAG,UAAoF,CAAC;AACnG,MAAM,YAAY,GAAG,mBAAmB,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAC7D,MAAM,WAAW,GAAG,UAAU,CAAC,KAAK,CAAC;AAErC,mGAAmG;AACnG,UAAU,CAAC,KAAK,GAAG,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE;IAC1C,MAAM,GAAG,GAAG,QAAQ,YAAY,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC1E,uBAAuB,CAAC,GAAG,CAAC,CAAC;IAC7B,MAAM,MAAM,GAAG,IAAI,EAAE,MAAM,IAAI,CAAC,QAAQ,YAAY,OAAO,CAAC,CAAC,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KAAK,CAAC,GAAI,EAAE,UAAU,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,YAAY,CAAC,CAAC;AACzF,CAAC;AAED,IAAI,CAAC;IACH,MAAM,KAAK,GAAG,MAAM,GAAG,EAAE,CAAC;IAE1B,UAAU,EAAE,WAAW,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;AACrC,CAAC;AAAC,OAAO,KAAK,EAAE,CAAC;IACf,MAAM,OAAO,GAAG,oBAAoB,CAAC,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC9D,UAAU,EAAE,WAAW,CAAC;QACtB,OAAO,EAAE;YACP,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,SAAS,EAAE,OAAO,CAAC,SAAS;SAC7B;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { ConfigService } from '@gaia-framework/config';
2
+ import type { GenerateVideoParams, VideoGenerationProvider } from '../../../../domain/ports/ai/videos/VideoGenerationProvider.js';
3
+ import type { VideoGenerationModelInfo } from '../../../../domain/models/videos/VideoGenerationModelInfo.js';
4
+ export declare class TogetherVideoGenerationProvider implements VideoGenerationProvider {
5
+ private readonly config;
6
+ readonly id = "togetherai";
7
+ constructor(config: ConfigService);
8
+ private get key();
9
+ getModels(): VideoGenerationModelInfo[];
10
+ generateVideo(params: GenerateVideoParams): Promise<Uint8Array>;
11
+ private request;
12
+ private download;
13
+ }
14
+ //# sourceMappingURL=TogetherVideoGenerationProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TogetherVideoGenerationProvider.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/infrastructure/ai/videos/togetherai/TogetherVideoGenerationProvider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAIvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,+DAA+D,CAAC;AAClI,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8DAA8D,CAAC;AAgB7G,qBACa,+BAAgC,YAAW,uBAAuB;IAGhC,OAAO,CAAC,QAAQ,CAAC,MAAM;IAFpE,QAAQ,CAAC,EAAE,gBAAgB;gBAEmC,MAAM,EAAE,aAAa;IAEnF,OAAO,KAAK,GAAG,GAGd;IAED,SAAS;IAEH,aAAa,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,CAAC;YA+BvD,OAAO;YASP,QAAQ;CAyBvB"}
@@ -0,0 +1,113 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
11
+ return function (target, key) { decorator(target, key, paramIndex); }
12
+ };
13
+ import { inject, injectable } from 'inversify';
14
+ import { ConfigService } from '@gaia-framework/config';
15
+ import { setTimeout as wait } from 'node:timers/promises';
16
+ import { z } from 'zod';
17
+ import CoreTypes from '../../../di/types.js';
18
+ import { validateVideoOptions, VideoGenerationFailure } from '../../../../domain/models/videos/VideoGenerationRequest.js';
19
+ import { videoCreationFailure, videoProviderRequest } from '../VideoProviderRequest.js';
20
+ const endpoint = 'https://api.together.ai/v2/videos';
21
+ const model = {
22
+ id: 'togetherai/ByteDance/Seedance-1.0-lite', providerModel: 'ByteDance/Seedance-1.0-lite',
23
+ displayName: 'Seedance 1.0 Lite (Together AI)', provider: 'Together AI', type: 'video',
24
+ };
25
+ const job = z.object({
26
+ id: z.string().min(1),
27
+ status: z.enum(['queued', 'in_progress', 'completed', 'failed', 'cancelled']),
28
+ outputs: z.object({ video_url: z.string() }).nullish(),
29
+ });
30
+ const maxVideoBytes = 64 * 1024 * 1024;
31
+ let TogetherVideoGenerationProvider = class TogetherVideoGenerationProvider {
32
+ config;
33
+ id = 'togetherai';
34
+ constructor(config) {
35
+ this.config = config;
36
+ }
37
+ get key() {
38
+ return this.config.getOptionalBoolean('ai.videos.providers.togetherai.enabled')
39
+ ? this.config.getOptionalString('ai.videos.providers.togetherai.apiKey')?.trim() : undefined;
40
+ }
41
+ getModels() { return this.key ? [model] : []; }
42
+ async generateVideo(params) {
43
+ const key = this.key;
44
+ if (!key)
45
+ throw new VideoGenerationFailure('video_provider_disabled', 503, 'Together AI video is disabled.');
46
+ const selected = params.model ?? model.id;
47
+ if (selected !== model.id)
48
+ throw new VideoGenerationFailure('video_model_unavailable', 400, 'The selected video model is unavailable.');
49
+ validateVideoOptions(selected, params);
50
+ if (params.input_reference !== undefined) {
51
+ throw new VideoGenerationFailure('invalid_video_options', 400, 'This Together AI video model accepts a text prompt only.');
52
+ }
53
+ const deadline = AbortSignal.timeout(600_000);
54
+ const signal = params.abortSignal ? AbortSignal.any([deadline, params.abortSignal]) : deadline;
55
+ const headers = { Authorization: 'Bearer ' + key, 'Content-Type': 'application/json' };
56
+ let result = await videoProviderRequest(() => this.request(endpoint, {
57
+ method: 'POST', headers, signal,
58
+ body: JSON.stringify({ model: model.providerModel, prompt: params.prompt, width: 864, height: 480, seconds: '5' }),
59
+ }), signal, 'creation');
60
+ return videoProviderRequest(async () => {
61
+ const poll = endpoint + '/' + encodeURIComponent(result.id);
62
+ while (result.status === 'queued' || result.status === 'in_progress') {
63
+ await wait(5000, undefined, { signal });
64
+ result = await this.request(poll, { headers, signal });
65
+ }
66
+ if (result.status !== 'completed' || !result.outputs?.video_url) {
67
+ throw new VideoGenerationFailure('video_provider_failed', 502, 'Together AI did not complete the video job.');
68
+ }
69
+ return this.download(result.outputs.video_url, signal);
70
+ }, signal, 'completion');
71
+ }
72
+ async request(url, init) {
73
+ const response = await fetch(url, { ...init, redirect: 'error' });
74
+ if (!response.ok) {
75
+ await response.body?.cancel();
76
+ throw videoCreationFailure(response.status);
77
+ }
78
+ return job.parse(await response.json());
79
+ }
80
+ async download(source, signal) {
81
+ const url = URL.parse(source);
82
+ const failure = () => new VideoGenerationFailure('video_delivery_failed', 502, 'The Together AI video could not be downloaded.');
83
+ if (url?.origin !== 'https://api.together.ai' || url.username || url.password || !url.pathname.startsWith('/shrt/')) {
84
+ throw failure();
85
+ }
86
+ // The hosted short link is signed. Never forward the provider key to the download.
87
+ const response = await fetch(url, { signal, redirect: 'error' });
88
+ if (!response.ok || !response.body || !response.headers.get('Content-Type')?.startsWith('video/mp4')
89
+ || Number(response.headers.get('Content-Length')) > maxVideoBytes) {
90
+ await response.body?.cancel();
91
+ throw failure();
92
+ }
93
+ let size = 0;
94
+ const chunks = [];
95
+ for await (const chunk of response.body) {
96
+ size += chunk.length;
97
+ if (size > maxVideoBytes)
98
+ throw failure();
99
+ chunks.push(chunk);
100
+ }
101
+ const video = Buffer.concat(chunks, size);
102
+ if (video.toString('ascii', 4, 8) !== 'ftyp')
103
+ throw failure();
104
+ return video;
105
+ }
106
+ };
107
+ TogetherVideoGenerationProvider = __decorate([
108
+ injectable(),
109
+ __param(0, inject(CoreTypes.ConfigService)),
110
+ __metadata("design:paramtypes", [ConfigService])
111
+ ], TogetherVideoGenerationProvider);
112
+ export { TogetherVideoGenerationProvider };
113
+ //# sourceMappingURL=TogetherVideoGenerationProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TogetherVideoGenerationProvider.js","sourceRoot":"","sources":["../../../../../../../src/core/infrastructure/ai/videos/togetherai/TogetherVideoGener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MAAM,EAAE,CAAC;YAC9B,MAAM,OAAO,EAAE,CAAC;QAClB,CAAC;QAED,IAAI,IAAI,GAAG,CAAC,CAAC;QACb,MAAM,MAAM,GAAiB,EAAE,CAAC;QAChC,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC;YACxC,IAAI,IAAI,KAAK,CAAC,MAAM,CAAC;YACrB,IAAI,IAAI,GAAG,aAAa;gBAAE,MAAM,OAAO,EAAE,CAAC;YAC1C,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC;QACD,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAC1C,IAAI,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM;YAAE,MAAM,OAAO,EAAE,CAAC;QAC9D,OAAO,KAAK,CAAC;IACf,CAAC;CACF,CAAA;AA7EY,+BAA+B;IAD3C,UAAU,EAAE;IAIE,WAAA,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,CAAA;qCAA0B,aAAa;GAHxE,+BAA+B,CA6E3C"}
@@ -6,5 +6,7 @@ export declare class ImageEditingController {
6
6
  constructor(editing: ImageEditingAppService);
7
7
  capabilities(req: AuthenticatedRequest, res: Response): void;
8
8
  edit(req: AuthenticatedRequest, res: Response): Promise<void>;
9
+ uploadMask(req: AuthenticatedRequest, res: Response): Promise<void>;
10
+ private handle;
9
11
  }
10
12
  //# sourceMappingURL=ImageEditingController.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ImageEditingController.d.ts","sourceRoot":"","sources":["../../../../../../../../src/core/infrastructure/api/v1/controllers/media/ImageEditingController.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACxF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qEAAqE,CAAC;AAIlH,qBACa,sBAAsB;IACqB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,sBAAsB;IAEtG,YAAY,CAAC,GAAG,EAAE,oBAAoB,EAAE,GAAG,EAAE,QAAQ;IAK/C,IAAI,CAAC,GAAG,EAAE,oBAAoB,EAAE,GAAG,EAAE,QAAQ;CAiBpD"}
1
+ {"version":3,"file":"ImageEditingController.d.ts","sourceRoot":"","sources":["../../../../../../../../src/core/infrastructure/api/v1/controllers/media/ImageEditingController.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACxF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qEAAqE,CAAC;AAIlH,qBACa,sBAAsB;IACqB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,sBAAsB;IAEtG,YAAY,CAAC,GAAG,EAAE,oBAAoB,EAAE,GAAG,EAAE,QAAQ;IAK/C,IAAI,CAAC,GAAG,EAAE,oBAAoB,EAAE,GAAG,EAAE,QAAQ;IAQ7C,UAAU,CAAC,GAAG,EAAE,oBAAoB,EAAE,GAAG,EAAE,QAAQ;YAQ3C,MAAM;CAarB"}