@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.
- package/CHANGELOG.md +79 -0
- package/README.md +1 -1
- package/build/openapi/openapi.json +1596 -132
- package/build/openapi/openapi.yaml +1092 -102
- package/build/openapi/voice-media-worker.json +1 -1
- package/build/openapi/voice-media-worker.yaml +1 -1
- package/build/openapi/worker-health.json +1 -1
- package/build/openapi/worker-health.yaml +1 -1
- package/build/src/config/VoiceMediaConfig.d.ts +1 -0
- package/build/src/config/VoiceMediaConfig.d.ts.map +1 -1
- package/build/src/config/VoiceMediaConfig.js +5 -0
- package/build/src/config/VoiceMediaConfig.js.map +1 -1
- package/build/src/config/schema.d.ts +106 -7
- package/build/src/config/schema.d.ts.map +1 -1
- package/build/src/config/schema.js +79 -7
- package/build/src/config/schema.js.map +1 -1
- package/build/src/core/application/dtos/llms/responses/LLMInfoDto.d.ts +2 -1
- package/build/src/core/application/dtos/llms/responses/LLMInfoDto.d.ts.map +1 -1
- package/build/src/core/application/dtos/messages/responses/MessageDto.d.ts +2 -1
- package/build/src/core/application/dtos/messages/responses/MessageDto.d.ts.map +1 -1
- package/build/src/core/application/dtos/runs/CreateRunRequestDto.d.ts +2 -0
- package/build/src/core/application/dtos/runs/CreateRunRequestDto.d.ts.map +1 -1
- package/build/src/core/application/mappers/llms/LLMInfoMapper.d.ts.map +1 -1
- package/build/src/core/application/mappers/llms/LLMInfoMapper.js +2 -0
- package/build/src/core/application/mappers/llms/LLMInfoMapper.js.map +1 -1
- package/build/src/core/application/mappers/messages/MessageMapper.d.ts.map +1 -1
- package/build/src/core/application/mappers/messages/MessageMapper.js +2 -0
- package/build/src/core/application/mappers/messages/MessageMapper.js.map +1 -1
- package/build/src/core/application/services/media/DefaultContentMediaService.d.ts +1 -1
- package/build/src/core/application/services/media/DefaultContentMediaService.d.ts.map +1 -1
- package/build/src/core/application/services/media/DefaultContentMediaService.js +48 -15
- package/build/src/core/application/services/media/DefaultContentMediaService.js.map +1 -1
- package/build/src/core/application/services/media/ImageAppServiceImpl.js +1 -1
- package/build/src/core/application/services/media/ImageAppServiceImpl.js.map +1 -1
- package/build/src/core/application/services/media/ImageEditingAppService.d.ts +7 -1
- package/build/src/core/application/services/media/ImageEditingAppService.d.ts.map +1 -1
- package/build/src/core/application/services/media/ImageEditingAppServiceImpl.d.ts +6 -1
- package/build/src/core/application/services/media/ImageEditingAppServiceImpl.d.ts.map +1 -1
- package/build/src/core/application/services/media/ImageEditingAppServiceImpl.js +59 -5
- package/build/src/core/application/services/media/ImageEditingAppServiceImpl.js.map +1 -1
- package/build/src/core/application/services/media/SpeechAppService.d.ts +2 -1
- package/build/src/core/application/services/media/SpeechAppService.d.ts.map +1 -1
- package/build/src/core/application/services/media/SpeechAppServiceImpl.d.ts +1 -0
- package/build/src/core/application/services/media/SpeechAppServiceImpl.d.ts.map +1 -1
- package/build/src/core/application/services/media/SpeechAppServiceImpl.js +3 -0
- package/build/src/core/application/services/media/SpeechAppServiceImpl.js.map +1 -1
- package/build/src/core/application/services/media/VideoGenerationRequestService.js +2 -2
- package/build/src/core/application/services/media/VideoGenerationRequestService.js.map +1 -1
- package/build/src/core/application/services/realtime/RealtimeTranscriptSession.d.ts +3 -0
- package/build/src/core/application/services/realtime/RealtimeTranscriptSession.d.ts.map +1 -1
- package/build/src/core/application/services/realtime/RealtimeTranscriptSession.js +62 -0
- package/build/src/core/application/services/realtime/RealtimeTranscriptSession.js.map +1 -1
- package/build/src/core/application/services/runs/RunAppServiceImpl.d.ts +7 -3
- package/build/src/core/application/services/runs/RunAppServiceImpl.d.ts.map +1 -1
- package/build/src/core/application/services/runs/RunAppServiceImpl.js +79 -17
- package/build/src/core/application/services/runs/RunAppServiceImpl.js.map +1 -1
- package/build/src/core/application/services/runs/RunExecutionSessionFactoryImpl.js +1 -1
- package/build/src/core/application/services/runs/RunExecutionSessionFactoryImpl.js.map +1 -1
- package/build/src/core/application/services/tasks/ScheduledRunDispatchService.d.ts.map +1 -1
- package/build/src/core/application/services/tasks/ScheduledRunDispatchService.js +9 -2
- package/build/src/core/application/services/tasks/ScheduledRunDispatchService.js.map +1 -1
- package/build/src/core/application/services/voice/intake/VoiceTranscriptService.d.ts +1 -1
- package/build/src/core/application/services/voice/intake/VoiceTranscriptService.d.ts.map +1 -1
- package/build/src/core/application/services/voice/intake/VoiceTranscriptService.js +17 -14
- package/build/src/core/application/services/voice/intake/VoiceTranscriptService.js.map +1 -1
- package/build/src/core/application/services/voice/review/VoiceReviewInput.d.ts +1 -0
- package/build/src/core/application/services/voice/review/VoiceReviewInput.d.ts.map +1 -1
- package/build/src/core/application/services/voice/session/ActiveVoiceSession.d.ts +2 -0
- package/build/src/core/application/services/voice/session/ActiveVoiceSession.d.ts.map +1 -1
- package/build/src/core/application/services/voice/session/ActiveVoiceSession.js +37 -12
- package/build/src/core/application/services/voice/session/ActiveVoiceSession.js.map +1 -1
- package/build/src/core/application/services/voice/session/VoiceContextService.js +1 -1
- package/build/src/core/application/services/voice/session/VoiceContextService.js.map +1 -1
- package/build/src/core/application/services/voice/session/VoiceSessionAppService.js +1 -1
- package/build/src/core/application/services/voice/session/VoiceSessionAppService.js.map +1 -1
- package/build/src/core/domain/factories/speech/SpeechProviderFactory.d.ts +1 -0
- package/build/src/core/domain/factories/speech/SpeechProviderFactory.d.ts.map +1 -1
- package/build/src/core/domain/factories/speech/SpeechProviderFactory.js +3 -0
- package/build/src/core/domain/factories/speech/SpeechProviderFactory.js.map +1 -1
- package/build/src/core/domain/models/images/ImageEditing.d.ts +9 -0
- package/build/src/core/domain/models/images/ImageEditing.d.ts.map +1 -1
- package/build/src/core/domain/models/images/ImageEditing.js +2 -1
- package/build/src/core/domain/models/images/ImageEditing.js.map +1 -1
- package/build/src/core/domain/models/images/ImageOutputOptions.js +1 -1
- package/build/src/core/domain/models/llms/LLMInfo.d.ts +2 -1
- package/build/src/core/domain/models/llms/LLMInfo.d.ts.map +1 -1
- package/build/src/core/domain/models/messages/Message.d.ts +8 -0
- package/build/src/core/domain/models/messages/Message.d.ts.map +1 -1
- package/build/src/core/domain/models/runs/RunApproval.d.ts +1 -1
- package/build/src/core/domain/models/runs/RunApproval.d.ts.map +1 -1
- package/build/src/core/domain/models/runs/RunApproval.js.map +1 -1
- package/build/src/core/domain/models/speech/RealtimeTranslationLanguage.d.ts +10 -0
- package/build/src/core/domain/models/speech/RealtimeTranslationLanguage.d.ts.map +1 -1
- package/build/src/core/domain/models/speech/Transcription.d.ts +1 -0
- package/build/src/core/domain/models/speech/Transcription.d.ts.map +1 -1
- package/build/src/core/domain/models/tools/ToolExecutionContext.d.ts +2 -0
- package/build/src/core/domain/models/tools/ToolExecutionContext.d.ts.map +1 -1
- package/build/src/core/domain/models/videos/VideoGenerationRequest.d.ts +2 -0
- package/build/src/core/domain/models/videos/VideoGenerationRequest.d.ts.map +1 -1
- package/build/src/core/domain/models/videos/VideoGenerationRequest.js +5 -1
- package/build/src/core/domain/models/videos/VideoGenerationRequest.js.map +1 -1
- package/build/src/core/domain/models/voice/VoiceSession.d.ts +2 -0
- package/build/src/core/domain/models/voice/VoiceSession.d.ts.map +1 -1
- package/build/src/core/domain/params/chat/LLMExecutionRequest.d.ts +2 -0
- package/build/src/core/domain/params/chat/LLMExecutionRequest.d.ts.map +1 -1
- package/build/src/core/domain/ports/ai/images/ImageEditingProvider.d.ts +2 -0
- package/build/src/core/domain/ports/ai/images/ImageEditingProvider.d.ts.map +1 -1
- package/build/src/core/domain/ports/ai/llm/LLMProvider.d.ts +2 -0
- package/build/src/core/domain/ports/ai/llm/LLMProvider.d.ts.map +1 -1
- package/build/src/core/domain/ports/repositories/voice/VoiceSessionRepository.d.ts +3 -1
- package/build/src/core/domain/ports/repositories/voice/VoiceSessionRepository.d.ts.map +1 -1
- package/build/src/core/domain/ports/services/assurance/AssuranceEvaluationService.d.ts +1 -1
- package/build/src/core/domain/ports/services/assurance/AssuranceEvaluationService.d.ts.map +1 -1
- package/build/src/core/domain/ports/services/media/RemoteMediaFetcher.d.ts +1 -0
- package/build/src/core/domain/ports/services/media/RemoteMediaFetcher.d.ts.map +1 -1
- package/build/src/core/domain/ports/speech/RealtimeTranslationProvider.d.ts +2 -1
- package/build/src/core/domain/ports/speech/RealtimeTranslationProvider.d.ts.map +1 -1
- package/build/src/core/domain/services/chat/ConversationContextService.d.ts +1 -1
- package/build/src/core/domain/services/chat/ConversationContextService.d.ts.map +1 -1
- package/build/src/core/domain/services/chat/ConversationContextServiceImpl.d.ts +1 -1
- package/build/src/core/domain/services/chat/ConversationContextServiceImpl.d.ts.map +1 -1
- package/build/src/core/domain/services/chat/ConversationContextServiceImpl.js +12 -3
- package/build/src/core/domain/services/chat/ConversationContextServiceImpl.js.map +1 -1
- package/build/src/core/domain/services/chat/LLMExecutionServiceImpl.d.ts.map +1 -1
- package/build/src/core/domain/services/chat/LLMExecutionServiceImpl.js +20 -5
- package/build/src/core/domain/services/chat/LLMExecutionServiceImpl.js.map +1 -1
- package/build/src/core/domain/services/chat/VideoInputPolicy.d.ts +5 -0
- package/build/src/core/domain/services/chat/VideoInputPolicy.d.ts.map +1 -0
- package/build/src/core/domain/services/chat/VideoInputPolicy.js +14 -0
- package/build/src/core/domain/services/chat/VideoInputPolicy.js.map +1 -0
- package/build/src/core/domain/services/media/ImageEditPolicy.d.ts +14 -1
- package/build/src/core/domain/services/media/ImageEditPolicy.d.ts.map +1 -1
- package/build/src/core/domain/services/media/ImageEditPolicy.js +54 -4
- package/build/src/core/domain/services/media/ImageEditPolicy.js.map +1 -1
- package/build/src/core/domain/services/media/SpeechService.d.ts +2 -1
- package/build/src/core/domain/services/media/SpeechService.d.ts.map +1 -1
- package/build/src/core/domain/services/media/SpeechServiceImpl.d.ts +1 -0
- package/build/src/core/domain/services/media/SpeechServiceImpl.d.ts.map +1 -1
- package/build/src/core/domain/services/media/SpeechServiceImpl.js +3 -0
- package/build/src/core/domain/services/media/SpeechServiceImpl.js.map +1 -1
- package/build/src/core/domain/services/media/TranscriptionPolicy.js +1 -1
- package/build/src/core/domain/services/media/TranscriptionPolicy.js.map +1 -1
- package/build/src/core/domain/services/models/ModelServiceImpl.d.ts +1 -0
- package/build/src/core/domain/services/models/ModelServiceImpl.d.ts.map +1 -1
- package/build/src/core/domain/services/models/ModelServiceImpl.js +33 -32
- package/build/src/core/domain/services/models/ModelServiceImpl.js.map +1 -1
- package/build/src/core/domain/services/runs/NativeRunEngine.d.ts.map +1 -1
- package/build/src/core/domain/services/runs/NativeRunEngine.js +6 -1
- package/build/src/core/domain/services/runs/NativeRunEngine.js.map +1 -1
- package/build/src/core/domain/services/runs/RunEngine.d.ts +2 -0
- package/build/src/core/domain/services/runs/RunEngine.d.ts.map +1 -1
- package/build/src/core/domain/services/runs/RunToolApprovalProviderCapability.d.ts +2 -0
- package/build/src/core/domain/services/runs/RunToolApprovalProviderCapability.d.ts.map +1 -1
- package/build/src/core/domain/services/runs/RunToolApprovalProviderCapability.js +10 -4
- package/build/src/core/domain/services/runs/RunToolApprovalProviderCapability.js.map +1 -1
- package/build/src/core/domain/services/tools/ToolExecutionContextPolicy.d.ts +1 -0
- package/build/src/core/domain/services/tools/ToolExecutionContextPolicy.d.ts.map +1 -1
- package/build/src/core/domain/services/tools/ToolExecutionContextPolicy.js +1 -0
- package/build/src/core/domain/services/tools/ToolExecutionContextPolicy.js.map +1 -1
- package/build/src/core/infrastructure/ai/alibaba/AlibabaWorkspace.d.ts +8 -0
- package/build/src/core/infrastructure/ai/alibaba/AlibabaWorkspace.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/alibaba/AlibabaWorkspace.js +16 -0
- package/build/src/core/infrastructure/ai/alibaba/AlibabaWorkspace.js.map +1 -0
- package/build/src/core/infrastructure/ai/embedding/providers/google/GoogleAIEmbeddingService.d.ts +2 -3
- package/build/src/core/infrastructure/ai/embedding/providers/google/GoogleAIEmbeddingService.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/embedding/providers/google/GoogleAIEmbeddingService.js +42 -17
- package/build/src/core/infrastructure/ai/embedding/providers/google/GoogleAIEmbeddingService.js.map +1 -1
- package/build/src/core/infrastructure/ai/google/GoogleGenAiConnection.d.ts +15 -0
- package/build/src/core/infrastructure/ai/google/GoogleGenAiConnection.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/google/GoogleGenAiConnection.js +21 -0
- package/build/src/core/infrastructure/ai/google/GoogleGenAiConnection.js.map +1 -0
- package/build/src/core/infrastructure/ai/images/AnimatedPngFixture.test-support.d.ts +2 -0
- package/build/src/core/infrastructure/ai/images/AnimatedPngFixture.test-support.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/images/AnimatedPngFixture.test-support.js +5 -0
- package/build/src/core/infrastructure/ai/images/AnimatedPngFixture.test-support.js.map +1 -0
- package/build/src/core/infrastructure/ai/images/ImageOutputBytes.d.ts +1 -0
- package/build/src/core/infrastructure/ai/images/ImageOutputBytes.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/images/ImageOutputBytes.js +9 -3
- package/build/src/core/infrastructure/ai/images/ImageOutputBytes.js.map +1 -1
- package/build/src/core/infrastructure/ai/images/alibaba/QwenImageProviders.d.ts +36 -0
- package/build/src/core/infrastructure/ai/images/alibaba/QwenImageProviders.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/images/alibaba/QwenImageProviders.js +108 -0
- package/build/src/core/infrastructure/ai/images/alibaba/QwenImageProviders.js.map +1 -0
- package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageClient.d.ts +20 -0
- package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageClient.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageClient.js +52 -0
- package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageClient.js.map +1 -0
- package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageEditingProvider.d.ts +13 -0
- package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageEditingProvider.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageEditingProvider.js +137 -0
- package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageEditingProvider.js.map +1 -0
- package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageGenerationProvider.d.ts +3 -37
- package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageGenerationProvider.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageGenerationProvider.js +52 -208
- package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageGenerationProvider.js.map +1 -1
- package/build/src/core/infrastructure/ai/images/editing/OpenAICompatibleImageEditingProvider.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/images/editing/OpenAICompatibleImageEditingProvider.js +11 -3
- package/build/src/core/infrastructure/ai/images/editing/OpenAICompatibleImageEditingProvider.js.map +1 -1
- package/build/src/core/infrastructure/ai/images/editing/OpenAIImageEditMask.d.ts +12 -0
- package/build/src/core/infrastructure/ai/images/editing/OpenAIImageEditMask.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/images/editing/OpenAIImageEditMask.js +39 -0
- package/build/src/core/infrastructure/ai/images/editing/OpenAIImageEditMask.js.map +1 -0
- package/build/src/core/infrastructure/ai/images/google/GoogleAIImageGenerationProvider.d.ts +3 -3
- package/build/src/core/infrastructure/ai/images/google/GoogleAIImageGenerationProvider.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/images/google/GoogleAIImageGenerationProvider.js +36 -25
- package/build/src/core/infrastructure/ai/images/google/GoogleAIImageGenerationProvider.js.map +1 -1
- package/build/src/core/infrastructure/ai/images/openai/OpenAIImageModels.d.ts +1 -1
- package/build/src/core/infrastructure/ai/images/togetherai/TogetherImageGenerationProvider.d.ts +12 -0
- package/build/src/core/infrastructure/ai/images/togetherai/TogetherImageGenerationProvider.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/images/togetherai/TogetherImageGenerationProvider.js +97 -0
- package/build/src/core/infrastructure/ai/images/togetherai/TogetherImageGenerationProvider.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/base/realtime/NativeRealtimeApprovalStore.d.ts +32 -0
- package/build/src/core/infrastructure/ai/llm/base/realtime/NativeRealtimeApprovalStore.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/base/realtime/NativeRealtimeApprovalStore.js +80 -0
- package/build/src/core/infrastructure/ai/llm/base/realtime/NativeRealtimeApprovalStore.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/base/realtime/RealtimeToolInvocationBuilder.d.ts +23 -0
- package/build/src/core/infrastructure/ai/llm/base/realtime/RealtimeToolInvocationBuilder.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/base/realtime/RealtimeToolInvocationBuilder.js +66 -0
- package/build/src/core/infrastructure/ai/llm/base/realtime/RealtimeToolInvocationBuilder.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/context/codecs/RunMediaContextCodecs.js +3 -1
- package/build/src/core/infrastructure/ai/llm/context/codecs/RunMediaContextCodecs.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/alibaba/AlibabaCatalog.d.ts +12 -0
- package/build/src/core/infrastructure/ai/llm/providers/alibaba/AlibabaCatalog.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/alibaba/AlibabaCatalog.js +46 -0
- package/build/src/core/infrastructure/ai/llm/providers/alibaba/AlibabaCatalog.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/alibaba/AlibabaLLMProvider.d.ts +24 -0
- package/build/src/core/infrastructure/ai/llm/providers/alibaba/AlibabaLLMProvider.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/alibaba/AlibabaLLMProvider.js +100 -0
- package/build/src/core/infrastructure/ai/llm/providers/alibaba/AlibabaLLMProvider.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/azure/services/AzureFoundryService.d.ts +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockCatalog.d.ts +53 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockCatalog.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockCatalog.js +178 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockCatalog.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockLLMProvider.d.ts +19 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockLLMProvider.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockLLMProvider.js +59 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockLLMProvider.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockMessages.d.ts +8 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockMessages.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockMessages.js +72 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockMessages.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockOutput.d.ts +28 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockOutput.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockOutput.js +117 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockOutput.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockService.d.ts +44 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockService.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockService.js +148 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockService.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/cerebras/CerebrasConfig.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/cerebras/CerebrasConfig.js +11 -15
- package/build/src/core/infrastructure/ai/llm/providers/cerebras/CerebrasConfig.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/cerebras/CerebrasService.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/cerebras/CerebrasService.js +3 -5
- package/build/src/core/infrastructure/ai/llm/providers/cerebras/CerebrasService.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/foundry-local/FoundryLocalService.d.ts +2 -1
- package/build/src/core/infrastructure/ai/llm/providers/foundry-local/FoundryLocalService.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/foundry-local/FoundryLocalService.js +33 -38
- package/build/src/core/infrastructure/ai/llm/providers/foundry-local/FoundryLocalService.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleAIService.d.ts +6 -2
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleAIService.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleAIService.js +47 -37
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleAIService.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleApprovalCoordinator.d.ts +3 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleApprovalCoordinator.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleApprovalCoordinator.js +16 -8
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleApprovalCoordinator.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleChatRoute.d.ts +12 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleChatRoute.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleChatRoute.js +12 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleChatRoute.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleConfig.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleConfig.js +6 -2
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleConfig.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleLLMProvider.d.ts +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleLLMProvider.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleLLMProvider.js +12 -6
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleLLMProvider.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleStructuredOutputPolicy.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleStructuredOutputPolicy.js +4 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleStructuredOutputPolicy.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleTokenCountRequest.d.ts +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleTokenCountRequest.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleTokenCountRequest.js +14 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleTokenCountRequest.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleToolLoop.d.ts +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleToolLoop.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleToolLoop.js +2 -2
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleToolLoop.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleVideoFiles.d.ts +19 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleVideoFiles.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleVideoFiles.js +170 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleVideoFiles.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/VertexChatProfiles.d.ts +4 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/VertexChatProfiles.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/VertexChatProfiles.js +42 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/VertexChatProfiles.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/VertexChatVideo.d.ts +25 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/VertexChatVideo.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/VertexChatVideo.js +106 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/VertexChatVideo.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleLiveSocket.d.ts +10 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleLiveSocket.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleLiveSocket.js +48 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleLiveSocket.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeConfig.d.ts +9 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeConfig.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeConfig.js +21 -4
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeConfig.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeEventHandlerREgistry.d.ts +11 -2
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeEventHandlerREgistry.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeEventHandlerREgistry.js +72 -42
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeEventHandlerREgistry.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeProvider.d.ts +8 -2
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeProvider.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeProvider.js +72 -34
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeProvider.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeSession.d.ts +14 -6
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeSession.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeSession.js +74 -28
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeSession.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeToolApprovals.d.ts +27 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeToolApprovals.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeToolApprovals.js +138 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeToolApprovals.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeToolContracts.d.ts +10 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeToolContracts.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeToolContracts.js +43 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeToolContracts.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeTranslationProvider.d.ts +49 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeTranslationProvider.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeTranslationProvider.js +151 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeTranslationProvider.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/types.d.ts +9 -2
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/types.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/types.js +4 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/types.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceCatalog.d.ts +10 -0
- package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceCatalog.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceCatalog.js +74 -0
- package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceCatalog.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceLLMProvider.d.ts +25 -0
- package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceLLMProvider.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceLLMProvider.js +104 -0
- package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceLLMProvider.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceResponses.d.ts +40 -0
- package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceResponses.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceResponses.js +39 -0
- package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceResponses.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/local/LocalLLMChatProviderService.d.ts +2 -3
- package/build/src/core/infrastructure/ai/llm/providers/local/LocalLLMChatProviderService.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/local/LocalLLMChatProviderService.js +11 -7
- package/build/src/core/infrastructure/ai/llm/providers/local/LocalLLMChatProviderService.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/meta/MetaLLMProvider.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/meta/MetaLLMProvider.js +2 -30
- package/build/src/core/infrastructure/ai/llm/providers/meta/MetaLLMProvider.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/mistral/MistralConfig.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/mistral/MistralConfig.js +18 -13
- package/build/src/core/infrastructure/ai/llm/providers/mistral/MistralConfig.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/mistral/MistralService.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/mistral/MistralService.js +16 -1
- package/build/src/core/infrastructure/ai/llm/providers/mistral/MistralService.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaCatalog.d.ts +9 -0
- package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaCatalog.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaCatalog.js +87 -0
- package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaCatalog.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaService.d.ts +2 -2
- package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaService.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaService.js +7 -10
- package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaService.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/ollama/OllamaCloudService.d.ts +40 -0
- package/build/src/core/infrastructure/ai/llm/providers/ollama/OllamaCloudService.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/ollama/OllamaCloudService.js +296 -0
- package/build/src/core/infrastructure/ai/llm/providers/ollama/OllamaCloudService.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/ollama/OllamaLLMProvider.d.ts +14 -4
- package/build/src/core/infrastructure/ai/llm/providers/ollama/OllamaLLMProvider.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/ollama/OllamaLLMProvider.js +35 -5
- package/build/src/core/infrastructure/ai/llm/providers/ollama/OllamaLLMProvider.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/chat-completions/OpenAIChatCompletionsService.d.ts +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveConfig.d.ts +5 -2
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveConfig.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveConfig.js +25 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveConfig.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveMediaProvider.js +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveMediaProvider.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveProvider.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveProvider.js +6 -4
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveProvider.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveReceiptPlayback.d.ts +3 -4
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveReceiptPlayback.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveReceiptPlayback.js +13 -51
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveReceiptPlayback.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveReceiptSpeech.d.ts +4 -0
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveReceiptSpeech.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveReceiptSpeech.js +163 -0
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveReceiptSpeech.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveRtcConnection.d.ts +9 -2
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveRtcConnection.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveRtcConnection.js +24 -9
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveRtcConnection.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveRtcEventMapper.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveRtcEventMapper.js +4 -0
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveRtcEventMapper.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAIRealtimeReceiptSpeech.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAIRealtimeReceiptSpeech.js +12 -4
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAIRealtimeReceiptSpeech.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeDisplayContentBuilder.d.ts +3 -21
- package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeDisplayContentBuilder.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeDisplayContentBuilder.js +2 -64
- package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeDisplayContentBuilder.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeEventHandlerRegistry.d.ts +1 -5
- package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeEventHandlerRegistry.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeEventHandlerRegistry.js +12 -87
- package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeEventHandlerRegistry.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeTranslationProvider.d.ts +11 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeTranslationProvider.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeTranslationProvider.js +73 -73
- package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeTranslationProvider.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/responses/OpenAIResponsesApiService.d.ts +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/responses/createPortableResponsesContext.d.ts +5 -0
- package/build/src/core/infrastructure/ai/llm/providers/openai/responses/createPortableResponsesContext.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/openai/responses/createPortableResponsesContext.js +33 -0
- package/build/src/core/infrastructure/ai/llm/providers/openai/responses/createPortableResponsesContext.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeCatalog.d.ts +25 -0
- package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeCatalog.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeCatalog.js +152 -0
- package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeCatalog.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeLLMProvider.d.ts +22 -0
- package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeLLMProvider.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeLLMProvider.js +54 -0
- package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeLLMProvider.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeService.d.ts +31 -0
- package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeService.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeService.js +357 -0
- package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeService.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/openrouter/OpenRouterConfig.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openrouter/OpenRouterConfig.js +9 -16
- package/build/src/core/infrastructure/ai/llm/providers/openrouter/OpenRouterConfig.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openrouter/OpenRouterService.js +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openrouter/OpenRouterService.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/togetherai/TogetherCatalog.d.ts +13 -0
- package/build/src/core/infrastructure/ai/llm/providers/togetherai/TogetherCatalog.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/togetherai/TogetherCatalog.js +95 -0
- package/build/src/core/infrastructure/ai/llm/providers/togetherai/TogetherCatalog.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/togetherai/TogetherLLMProvider.d.ts +29 -0
- package/build/src/core/infrastructure/ai/llm/providers/togetherai/TogetherLLMProvider.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/togetherai/TogetherLLMProvider.js +167 -0
- package/build/src/core/infrastructure/ai/llm/providers/togetherai/TogetherLLMProvider.js.map +1 -0
- package/build/src/core/infrastructure/ai/speech/GoogleSpeechConnection.d.ts +5 -0
- package/build/src/core/infrastructure/ai/speech/GoogleSpeechConnection.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/speech/GoogleSpeechConnection.js +26 -0
- package/build/src/core/infrastructure/ai/speech/GoogleSpeechConnection.js.map +1 -0
- package/build/src/core/infrastructure/ai/speech/stt/AzureSpeechToTextProvider.d.ts +7 -7
- package/build/src/core/infrastructure/ai/speech/stt/AzureSpeechToTextProvider.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/speech/stt/AzureSpeechToTextProvider.js +159 -63
- package/build/src/core/infrastructure/ai/speech/stt/AzureSpeechToTextProvider.js.map +1 -1
- package/build/src/core/infrastructure/ai/speech/stt/GoogleLiveTranscriptionProvider.d.ts +6 -2
- package/build/src/core/infrastructure/ai/speech/stt/GoogleLiveTranscriptionProvider.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/speech/stt/GoogleLiveTranscriptionProvider.js +22 -13
- package/build/src/core/infrastructure/ai/speech/stt/GoogleLiveTranscriptionProvider.js.map +1 -1
- package/build/src/core/infrastructure/ai/speech/stt/GoogleSpeechToTextProvider.d.ts +12 -6
- package/build/src/core/infrastructure/ai/speech/stt/GoogleSpeechToTextProvider.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/speech/stt/GoogleSpeechToTextProvider.js +64 -15
- package/build/src/core/infrastructure/ai/speech/stt/GoogleSpeechToTextProvider.js.map +1 -1
- package/build/src/core/infrastructure/ai/speech/stt/TogetherSpeechToTextProvider.d.ts +15 -0
- package/build/src/core/infrastructure/ai/speech/stt/TogetherSpeechToTextProvider.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/speech/stt/TogetherSpeechToTextProvider.js +81 -0
- package/build/src/core/infrastructure/ai/speech/stt/TogetherSpeechToTextProvider.js.map +1 -0
- package/build/src/core/infrastructure/ai/speech/tts/TogetherTextToSpeechProvider.d.ts +26 -0
- package/build/src/core/infrastructure/ai/speech/tts/TogetherTextToSpeechProvider.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/speech/tts/TogetherTextToSpeechProvider.js +80 -0
- package/build/src/core/infrastructure/ai/speech/tts/TogetherTextToSpeechProvider.js.map +1 -0
- package/build/src/core/infrastructure/ai/speech/tts/google/GoogleTextToSpeechProvider.d.ts +20 -17
- package/build/src/core/infrastructure/ai/speech/tts/google/GoogleTextToSpeechProvider.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/speech/tts/google/GoogleTextToSpeechProvider.js +20 -9
- package/build/src/core/infrastructure/ai/speech/tts/google/GoogleTextToSpeechProvider.js.map +1 -1
- package/build/src/core/infrastructure/ai/speech/tts/google/GoogleTtsProtocol.d.ts +2 -1
- package/build/src/core/infrastructure/ai/speech/tts/google/GoogleTtsProtocol.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/speech/tts/google/GoogleTtsProtocol.js +6 -4
- package/build/src/core/infrastructure/ai/speech/tts/google/GoogleTtsProtocol.js.map +1 -1
- package/build/src/core/infrastructure/ai/speech/tts/google/GoogleTtsWorker.js +24 -8
- package/build/src/core/infrastructure/ai/speech/tts/google/GoogleTtsWorker.js.map +1 -1
- package/build/src/core/infrastructure/ai/tools/executors/FunctionToolExecutor.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/tools/executors/FunctionToolExecutor.js +1 -0
- package/build/src/core/infrastructure/ai/tools/executors/FunctionToolExecutor.js.map +1 -1
- package/build/src/core/infrastructure/ai/tools/implementations/images/ImageEditingTool.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/tools/implementations/images/ImageEditingTool.js +11 -3
- package/build/src/core/infrastructure/ai/tools/implementations/images/ImageEditingTool.js.map +1 -1
- package/build/src/core/infrastructure/ai/tools/implementations/images/ImageGenerationToolService.js +1 -1
- package/build/src/core/infrastructure/ai/tools/implementations/images/ImageGenerationToolService.js.map +1 -1
- package/build/src/core/infrastructure/ai/tools/implementations/images/ImageOutputToolProperties.d.ts +1 -1
- package/build/src/core/infrastructure/ai/tools/implementations/images/schemas.d.ts +4 -4
- package/build/src/core/infrastructure/ai/tools/implementations/images/schemas.js +3 -3
- package/build/src/core/infrastructure/ai/tools/implementations/images/schemas.js.map +1 -1
- package/build/src/core/infrastructure/ai/tools/implementations/videos/VideoGenerationToolService.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/tools/implementations/videos/VideoGenerationToolService.js +5 -4
- package/build/src/core/infrastructure/ai/tools/implementations/videos/VideoGenerationToolService.js.map +1 -1
- package/build/src/core/infrastructure/ai/videos/VideoGenerationProviderRegistryImpl.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/videos/VideoGenerationProviderRegistryImpl.js +4 -1
- package/build/src/core/infrastructure/ai/videos/VideoGenerationProviderRegistryImpl.js.map +1 -1
- package/build/src/core/infrastructure/ai/videos/alibaba/HappyHorseVideoProvider.d.ts +18 -0
- package/build/src/core/infrastructure/ai/videos/alibaba/HappyHorseVideoProvider.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/videos/alibaba/HappyHorseVideoProvider.js +88 -0
- package/build/src/core/infrastructure/ai/videos/alibaba/HappyHorseVideoProvider.js.map +1 -0
- package/build/src/core/infrastructure/ai/videos/google/GoogleVideoGenerationProvider.d.ts +4 -2
- package/build/src/core/infrastructure/ai/videos/google/GoogleVideoGenerationProvider.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/videos/google/GoogleVideoGenerationProvider.js +109 -45
- package/build/src/core/infrastructure/ai/videos/google/GoogleVideoGenerationProvider.js.map +1 -1
- package/build/src/core/infrastructure/ai/videos/google/VertexVeoOutput.d.ts +10 -0
- package/build/src/core/infrastructure/ai/videos/google/VertexVeoOutput.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/videos/google/VertexVeoOutput.js +43 -0
- package/build/src/core/infrastructure/ai/videos/google/VertexVeoOutput.js.map +1 -0
- package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoAdapter.d.ts +3 -2
- package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoAdapter.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoAdapter.js +7 -7
- package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoAdapter.js.map +1 -1
- package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoOutput.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoOutput.js +4 -4
- package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoOutput.js.map +1 -1
- package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoProtocol.d.ts +3 -2
- package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoProtocol.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoProtocol.js +13 -4
- package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoProtocol.js.map +1 -1
- package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoWorker.js +27 -23
- package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoWorker.js.map +1 -1
- package/build/src/core/infrastructure/ai/videos/togetherai/TogetherVideoGenerationProvider.d.ts +14 -0
- package/build/src/core/infrastructure/ai/videos/togetherai/TogetherVideoGenerationProvider.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/videos/togetherai/TogetherVideoGenerationProvider.js +113 -0
- package/build/src/core/infrastructure/ai/videos/togetherai/TogetherVideoGenerationProvider.js.map +1 -0
- package/build/src/core/infrastructure/api/v1/controllers/media/ImageEditingController.d.ts +2 -0
- package/build/src/core/infrastructure/api/v1/controllers/media/ImageEditingController.d.ts.map +1 -1
- package/build/src/core/infrastructure/api/v1/controllers/media/ImageEditingController.js +18 -6
- package/build/src/core/infrastructure/api/v1/controllers/media/ImageEditingController.js.map +1 -1
- package/build/src/core/infrastructure/api/v1/controllers/media/SpeechController.d.ts +1 -0
- package/build/src/core/infrastructure/api/v1/controllers/media/SpeechController.d.ts.map +1 -1
- package/build/src/core/infrastructure/api/v1/controllers/media/SpeechController.js +3 -0
- package/build/src/core/infrastructure/api/v1/controllers/media/SpeechController.js.map +1 -1
- package/build/src/core/infrastructure/api/v1/controllers/models/ModelsController.d.ts.map +1 -1
- package/build/src/core/infrastructure/api/v1/controllers/models/ModelsController.js +12 -2
- package/build/src/core/infrastructure/api/v1/controllers/models/ModelsController.js.map +1 -1
- package/build/src/core/infrastructure/api/v1/openapi/coreSchemas.d.ts +32 -12
- package/build/src/core/infrastructure/api/v1/openapi/coreSchemas.d.ts.map +1 -1
- package/build/src/core/infrastructure/api/v1/openapi/coreSchemas.js +8 -8
- package/build/src/core/infrastructure/api/v1/openapi/coreSchemas.js.map +1 -1
- package/build/src/core/infrastructure/api/v1/requests/images/ImageEditRequestSchema.d.ts +6 -1
- package/build/src/core/infrastructure/api/v1/requests/images/ImageEditRequestSchema.d.ts.map +1 -1
- package/build/src/core/infrastructure/api/v1/requests/images/ImageEditRequestSchema.js +8 -1
- package/build/src/core/infrastructure/api/v1/requests/images/ImageEditRequestSchema.js.map +1 -1
- package/build/src/core/infrastructure/api/v1/requests/images/ImageGenerationRequestSchema.d.ts +1 -1
- package/build/src/core/infrastructure/api/v1/requests/images/ImageOutputOptionsSchema.d.ts +1 -1
- package/build/src/core/infrastructure/api/v1/requests/runs/CreateRunRequestSchema.d.ts +5 -0
- package/build/src/core/infrastructure/api/v1/requests/runs/CreateRunRequestSchema.d.ts.map +1 -1
- package/build/src/core/infrastructure/api/v1/requests/runs/CreateRunRequestSchema.js +5 -0
- package/build/src/core/infrastructure/api/v1/requests/runs/CreateRunRequestSchema.js.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/conversations/openapi/ConversationsRouter.openapi.d.ts.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/conversations/openapi/ConversationsRouter.openapi.js +4 -1
- package/build/src/core/infrastructure/api/v1/routers/conversations/openapi/ConversationsRouter.openapi.js.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/media/audio/SpeechRouter.d.ts.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/media/audio/SpeechRouter.js +1 -0
- package/build/src/core/infrastructure/api/v1/routers/media/audio/SpeechRouter.js.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/media/audio/openapi/SpeechRouter.openapi.d.ts +1 -0
- package/build/src/core/infrastructure/api/v1/routers/media/audio/openapi/SpeechRouter.openapi.d.ts.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/media/audio/openapi/SpeechRouter.openapi.js +16 -0
- package/build/src/core/infrastructure/api/v1/routers/media/audio/openapi/SpeechRouter.openapi.js.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/media/images/ImagesRouter.d.ts.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/media/images/ImagesRouter.js +1 -0
- package/build/src/core/infrastructure/api/v1/routers/media/images/ImagesRouter.js.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/media/images/ImagesRouter.openapi.d.ts.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/media/images/ImagesRouter.openapi.js +11 -2
- package/build/src/core/infrastructure/api/v1/routers/media/images/ImagesRouter.openapi.js.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/media/live/openapi/VoiceSessionHttpSchemas.d.ts +1 -0
- package/build/src/core/infrastructure/api/v1/routers/media/live/openapi/VoiceSessionHttpSchemas.d.ts.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/media/live/openapi/VoiceSessionHttpSchemas.js +1 -0
- package/build/src/core/infrastructure/api/v1/routers/media/live/openapi/VoiceSessionHttpSchemas.js.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/media/shared/openapi/MediaHttpExamples.d.ts.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/media/shared/openapi/MediaHttpExamples.js +37 -25
- package/build/src/core/infrastructure/api/v1/routers/media/shared/openapi/MediaHttpExamples.js.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/models/ModelsRouter.openapi.d.ts +36 -34
- package/build/src/core/infrastructure/api/v1/routers/models/ModelsRouter.openapi.d.ts.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/models/ModelsRouter.openapi.js +51 -17
- package/build/src/core/infrastructure/api/v1/routers/models/ModelsRouter.openapi.js.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/models/catalogRepresentation.d.ts +4 -0
- package/build/src/core/infrastructure/api/v1/routers/models/catalogRepresentation.d.ts.map +1 -0
- package/build/src/core/infrastructure/api/v1/routers/models/catalogRepresentation.js +4 -0
- package/build/src/core/infrastructure/api/v1/routers/models/catalogRepresentation.js.map +1 -0
- package/build/src/core/infrastructure/api/v1/routers/runs/openapi/DurableRunSchemas.openapi.d.ts +5 -0
- package/build/src/core/infrastructure/api/v1/routers/runs/openapi/DurableRunSchemas.openapi.d.ts.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/runs/openapi/RunsRouter.openapi.d.ts +24 -9
- package/build/src/core/infrastructure/api/v1/routers/runs/openapi/RunsRouter.openapi.d.ts.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/runs/openapi/RunsRouter.openapi.js +1 -1
- package/build/src/core/infrastructure/api/v1/routers/runs/openapi/RunsRouter.openapi.js.map +1 -1
- package/build/src/core/infrastructure/di/builtInLLMProviders.d.ts.map +1 -1
- package/build/src/core/infrastructure/di/builtInLLMProviders.js +21 -5
- package/build/src/core/infrastructure/di/builtInLLMProviders.js.map +1 -1
- package/build/src/core/infrastructure/di/index.d.ts.map +1 -1
- package/build/src/core/infrastructure/di/index.js +67 -9
- package/build/src/core/infrastructure/di/index.js.map +1 -1
- package/build/src/core/infrastructure/di/types.d.ts +4 -1
- package/build/src/core/infrastructure/di/types.d.ts.map +1 -1
- package/build/src/core/infrastructure/di/types.js +4 -1
- package/build/src/core/infrastructure/di/types.js.map +1 -1
- package/build/src/core/infrastructure/mappers/chat/default/BasicChatMessageMapper.d.ts.map +1 -1
- package/build/src/core/infrastructure/mappers/chat/default/BasicChatMessageMapper.js +4 -6
- package/build/src/core/infrastructure/mappers/chat/default/BasicChatMessageMapper.js.map +1 -1
- package/build/src/core/infrastructure/mappers/chat/google/GeminiChatMessageMapper.d.ts.map +1 -1
- package/build/src/core/infrastructure/mappers/chat/google/GeminiChatMessageMapper.js +9 -0
- package/build/src/core/infrastructure/mappers/chat/google/GeminiChatMessageMapper.js.map +1 -1
- package/build/src/core/infrastructure/models/chat/completions/ChatCompletion.d.ts +1 -0
- package/build/src/core/infrastructure/models/chat/completions/ChatCompletion.d.ts.map +1 -1
- package/build/src/core/infrastructure/models/chat/completions/ChatCompletionMessageCodec.d.ts +1 -0
- package/build/src/core/infrastructure/models/chat/completions/ChatCompletionMessageCodec.d.ts.map +1 -1
- package/build/src/core/infrastructure/models/chat/completions/ChatCompletionResponseValidator.d.ts +4 -1
- package/build/src/core/infrastructure/models/chat/completions/ChatCompletionResponseValidator.d.ts.map +1 -1
- package/build/src/core/infrastructure/models/chat/completions/ChatCompletionResponseValidator.js +16 -14
- package/build/src/core/infrastructure/models/chat/completions/ChatCompletionResponseValidator.js.map +1 -1
- package/build/src/core/infrastructure/models/chat/completions/FetchChatCompletionResponse.d.ts +2 -1
- package/build/src/core/infrastructure/models/chat/completions/FetchChatCompletionResponse.d.ts.map +1 -1
- package/build/src/core/infrastructure/models/chat/completions/FetchChatCompletionResponse.js +2 -2
- package/build/src/core/infrastructure/models/chat/completions/FetchChatCompletionResponse.js.map +1 -1
- package/build/src/core/infrastructure/models/chat/completions/OpenAICompatibleChatCompletionProtocol.d.ts +3 -1
- package/build/src/core/infrastructure/models/chat/completions/OpenAICompatibleChatCompletionProtocol.d.ts.map +1 -1
- package/build/src/core/infrastructure/models/chat/completions/OpenAICompatibleChatCompletionProtocol.js +4 -1
- package/build/src/core/infrastructure/models/chat/completions/OpenAICompatibleChatCompletionProtocol.js.map +1 -1
- package/build/src/core/infrastructure/persistence/dao/knex/KnexMessageDao.d.ts.map +1 -1
- package/build/src/core/infrastructure/persistence/dao/knex/KnexMessageDao.js +6 -0
- package/build/src/core/infrastructure/persistence/dao/knex/KnexMessageDao.js.map +1 -1
- package/build/src/core/infrastructure/persistence/repositories/media/KnexMediaReferenceRecorder.d.ts.map +1 -1
- package/build/src/core/infrastructure/persistence/repositories/media/KnexMediaReferenceRecorder.js +13 -0
- package/build/src/core/infrastructure/persistence/repositories/media/KnexMediaReferenceRecorder.js.map +1 -1
- package/build/src/core/infrastructure/persistence/repositories/voice/KnexVoiceMediaLease.d.ts.map +1 -1
- package/build/src/core/infrastructure/persistence/repositories/voice/KnexVoiceMediaLease.js +2 -1
- package/build/src/core/infrastructure/persistence/repositories/voice/KnexVoiceMediaLease.js.map +1 -1
- package/build/src/core/infrastructure/persistence/repositories/voice/KnexVoiceSessionRepository.d.ts +4 -2
- package/build/src/core/infrastructure/persistence/repositories/voice/KnexVoiceSessionRepository.d.ts.map +1 -1
- package/build/src/core/infrastructure/persistence/repositories/voice/KnexVoiceSessionRepository.js +28 -11
- package/build/src/core/infrastructure/persistence/repositories/voice/KnexVoiceSessionRepository.js.map +1 -1
- package/build/src/core/infrastructure/services/audio/TranscriptionWav.js +1 -1
- package/build/src/core/infrastructure/services/audio/TranscriptionWav.js.map +1 -1
- package/build/src/core/infrastructure/services/chat/ChatCompletionStreamService.d.ts.map +1 -1
- package/build/src/core/infrastructure/services/chat/ChatCompletionStreamService.js +2 -0
- package/build/src/core/infrastructure/services/chat/ChatCompletionStreamService.js.map +1 -1
- package/build/src/core/infrastructure/services/chat/ProviderRequestUsage.js +1 -1
- package/build/src/core/infrastructure/services/chat/ProviderRequestUsage.js.map +1 -1
- package/build/src/core/infrastructure/services/media/ImageEditInputServiceImpl.d.ts +1 -0
- package/build/src/core/infrastructure/services/media/ImageEditInputServiceImpl.d.ts.map +1 -1
- package/build/src/core/infrastructure/services/media/ImageEditInputServiceImpl.js +44 -0
- package/build/src/core/infrastructure/services/media/ImageEditInputServiceImpl.js.map +1 -1
- package/build/src/core/infrastructure/services/media/PngAnimation.d.ts +3 -0
- package/build/src/core/infrastructure/services/media/PngAnimation.d.ts.map +1 -0
- package/build/src/core/infrastructure/services/media/PngAnimation.js +12 -0
- package/build/src/core/infrastructure/services/media/PngAnimation.js.map +1 -0
- package/build/src/core/infrastructure/services/media/SafeHttpRemoteMediaFetcher.d.ts +2 -0
- package/build/src/core/infrastructure/services/media/SafeHttpRemoteMediaFetcher.d.ts.map +1 -1
- package/build/src/core/infrastructure/services/media/SafeHttpRemoteMediaFetcher.js +19 -3
- package/build/src/core/infrastructure/services/media/SafeHttpRemoteMediaFetcher.js.map +1 -1
- package/build/src/core/infrastructure/services/runs/approval/DefaultRunApprovalService.d.ts +0 -2
- package/build/src/core/infrastructure/services/runs/approval/DefaultRunApprovalService.d.ts.map +1 -1
- package/build/src/core/infrastructure/services/runs/approval/DefaultRunApprovalService.js +19 -26
- package/build/src/core/infrastructure/services/runs/approval/DefaultRunApprovalService.js.map +1 -1
- package/build/src/core/infrastructure/services/runs/approval/RunToolInvocationLifecycleImpl.js +1 -0
- package/build/src/core/infrastructure/services/runs/approval/RunToolInvocationLifecycleImpl.js.map +1 -1
- package/build/src/core/infrastructure/services/runs/approval/resolveToolApprovalPolicy.d.ts +8 -0
- package/build/src/core/infrastructure/services/runs/approval/resolveToolApprovalPolicy.d.ts.map +1 -0
- package/build/src/core/infrastructure/services/runs/approval/resolveToolApprovalPolicy.js +18 -0
- package/build/src/core/infrastructure/services/runs/approval/resolveToolApprovalPolicy.js.map +1 -0
- package/build/src/core/infrastructure/services/security/AssuranceEvaluationServiceImpl.d.ts +2 -1
- package/build/src/core/infrastructure/services/security/AssuranceEvaluationServiceImpl.d.ts.map +1 -1
- package/build/src/core/infrastructure/services/security/AssuranceEvaluationServiceImpl.js +23 -18
- package/build/src/core/infrastructure/services/security/AssuranceEvaluationServiceImpl.js.map +1 -1
- package/build/src/core/infrastructure/services/voice/media/VoiceMediaWorkerSession.d.ts +1 -1
- package/build/src/core/infrastructure/services/voice/media/VoiceMediaWorkerSession.d.ts.map +1 -1
- package/build/src/core/infrastructure/services/voice/media/VoiceMediaWorkerSession.js +2 -1
- package/build/src/core/infrastructure/services/voice/media/VoiceMediaWorkerSession.js.map +1 -1
- package/build/src/infrastructure/api/openapi/root.openapi.js +1 -1
- package/build/src/infrastructure/api/openapi/root.openapi.js.map +1 -1
- package/build/src/infrastructure/server/cors.d.ts.map +1 -1
- package/build/src/infrastructure/server/cors.js +0 -1
- package/build/src/infrastructure/server/cors.js.map +1 -1
- package/build/src/infrastructure/websockets/adapters/ws/WSAdapter.d.ts.map +1 -1
- package/build/src/infrastructure/websockets/adapters/ws/WSAdapter.js +2 -1
- package/build/src/infrastructure/websockets/adapters/ws/WSAdapter.js.map +1 -1
- package/build/src/infrastructure/websockets/commands/realtime/WebsocketRealtimeTranslationCommand.d.ts.map +1 -1
- package/build/src/infrastructure/websockets/commands/realtime/WebsocketRealtimeTranslationCommand.js +18 -7
- package/build/src/infrastructure/websockets/commands/realtime/WebsocketRealtimeTranslationCommand.js.map +1 -1
- package/build/src/infrastructure/websockets/mediators/WebsocketMediator.d.ts +1 -0
- package/build/src/infrastructure/websockets/mediators/WebsocketMediator.d.ts.map +1 -1
- package/build/src/infrastructure/websockets/mediators/WebsocketMediator.js +20 -1
- package/build/src/infrastructure/websockets/mediators/WebsocketMediator.js.map +1 -1
- package/build/src/infrastructure/workers/voice/startVoiceMediaHostFromContainer.d.ts.map +1 -1
- package/build/src/infrastructure/workers/voice/startVoiceMediaHostFromContainer.js +4 -1
- package/build/src/infrastructure/workers/voice/startVoiceMediaHostFromContainer.js.map +1 -1
- package/build/src/modules/admin/infrastructure/api/v1/AdminController.d.ts +2 -0
- package/build/src/modules/admin/infrastructure/api/v1/AdminController.d.ts.map +1 -1
- package/build/src/modules/admin/infrastructure/api/v1/AdminController.js +18 -3
- package/build/src/modules/admin/infrastructure/api/v1/AdminController.js.map +1 -1
- package/build/src/modules/admin/infrastructure/api/v1/AdminRouter.d.ts.map +1 -1
- package/build/src/modules/admin/infrastructure/api/v1/AdminRouter.js +1 -0
- package/build/src/modules/admin/infrastructure/api/v1/AdminRouter.js.map +1 -1
- package/build/src/modules/admin/infrastructure/api/v1/openapi/AdminExamples.openapi.d.ts.map +1 -1
- package/build/src/modules/admin/infrastructure/api/v1/openapi/AdminExamples.openapi.js +3 -0
- package/build/src/modules/admin/infrastructure/api/v1/openapi/AdminExamples.openapi.js.map +1 -1
- package/build/src/modules/admin/infrastructure/api/v1/openapi/AdminRouter.openapi.d.ts.map +1 -1
- package/build/src/modules/admin/infrastructure/api/v1/openapi/AdminRouter.openapi.js +18 -0
- package/build/src/modules/admin/infrastructure/api/v1/openapi/AdminRouter.openapi.js.map +1 -1
- package/build/src/modules/code-review/infrastructure/auth/GitHubActionsWorkflowApprovalConfig.d.ts.map +1 -1
- package/build/src/modules/code-review/infrastructure/auth/GitHubActionsWorkflowApprovalConfig.js +17 -45
- package/build/src/modules/code-review/infrastructure/auth/GitHubActionsWorkflowApprovalConfig.js.map +1 -1
- package/build/src/modules/code-review/infrastructure/persistence/repositories/KnexCodeReviewRepository.d.ts.map +1 -1
- package/build/src/modules/code-review/infrastructure/persistence/repositories/KnexCodeReviewRepository.js +8 -2
- package/build/src/modules/code-review/infrastructure/persistence/repositories/KnexCodeReviewRepository.js.map +1 -1
- package/build/src/modules/workspaces/infrastructure/recovery/operator/authority/observer/ExecutionSources.js +1 -1
- package/package.json +4 -3
- package/resources/prompts/live-conversation.md +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsConfig.d.ts +0 -3
- package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsConfig.d.ts.map +0 -1
- package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsConfig.js +0 -64
- package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsConfig.js.map +0 -1
- package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsLLMProvider.d.ts +0 -26
- package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsLLMProvider.d.ts.map +0 -1
- package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsLLMProvider.js +0 -121
- package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsLLMProvider.js.map +0 -1
- package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsService.d.ts +0 -18
- package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsService.d.ts.map +0 -1
- package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsService.js +0 -73
- package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsService.js.map +0 -1
- package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaConfig.d.ts +0 -3
- package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaConfig.d.ts.map +0 -1
- package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaConfig.js +0 -147
- 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;IAErB,YAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QACzC,IAAI,CAAC,sCAAsC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;YACzD,MAAM,IAAI,sBAAsB,CAAC,sBAAsB,EAAE,GAAG,EAAE,qCAAqC,CAAC,CAAC;QACvG,CA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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?: ((
|
|
8
|
-
generate(
|
|
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":"
|
|
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(
|
|
15
|
-
this.validateExecution(
|
|
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))(
|
|
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(
|
|
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(
|
|
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: {
|
|
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":"
|
|
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,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,CACL,CACF,CAAC;gBACJ,CAAC;YACH,CAAC,CACF,CAAC;YACF,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;
|
|
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 >
|
|
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","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,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,+DAA+D,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAI1D,MAAM,WAAW,GAAwB,EAAE,OAA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AC,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;;;;;;;;;;;;;;;;;;;
|
|
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
|
|
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
|
-
|
|
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,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;
|
|
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,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AAE,MAAM,CAAC,CAAC;IACvC,CAAC;YAAS,CAAC;QACT,MAAM,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;QAC7C,MAAM,CAAC,WAAW,EAAE,CAAC;IACvB,CAAC;AACH,CAAC"}
|
|
@@ -1,19 +1,28 @@
|
|
|
1
1
|
import { parentPort, workerData } from 'node:worker_threads';
|
|
2
|
-
import {
|
|
3
|
-
import { OMNI_VIDEO_DEADLINE_MS } from '../../../../../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,
|
|
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
|
|
11
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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 =
|
|
36
|
-
|
|
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
|
|
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,
|
|
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,
|
|
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,uBAAuB,EAA8B,MAAM,0CAA0C,CAAC;AAE/G,OAAO,EAAE,sBAAsB,EAAE,uBAAu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AAC,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"}
|
package/build/src/core/infrastructure/ai/videos/togetherai/TogetherVideoGenerationProvider.d.ts
ADDED
|
@@ -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
|
package/build/src/core/infrastructure/ai/videos/togetherai/TogetherVideoGenerationProvider.d.ts.map
ADDED
|
@@ -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
|
package/build/src/core/infrastructure/ai/videos/togetherai/TogetherVideoGenerationProvider.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TogetherVideoGenerationProvider.js","sourceRoot":"","sources":["../../../../../../../src/core/infrastructure/ai/videos/togetherai/TogetherVideoGenerationProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,UAAU,IAAI,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,SAAS,MAAM,sBAAsB,CAAC;AAG7C,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,4DAA4D,CAAC;AAC1H,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAA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AM,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
|
package/build/src/core/infrastructure/api/v1/controllers/media/ImageEditingController.d.ts.map
CHANGED
|
@@ -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;
|
|
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"}
|