@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,167 @@
|
|
|
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 CoreTypes from '../../../../di/types.js';
|
|
16
|
+
import { classifyAIExecutionFailure, createAIExecutionFailure } from '../../../../../domain/errors/AIExecutionFailure.js';
|
|
17
|
+
import { SubagentWaitSuspended } from '../../../../../domain/errors/SubagentWaitSuspended.js';
|
|
18
|
+
import { VoiceContextSuspended } from '../../../../../domain/errors/VoiceContextSuspended.js';
|
|
19
|
+
import { BaseLLMProvider } from '../../base/BaseLLMProvider.js';
|
|
20
|
+
import { PortableContextAdapter, CONTEXT_SUMMARY_INSTRUCTIONS } from '../../context/PortableContextAdapter.js';
|
|
21
|
+
import { responsesContextCodec } from '../../context/codecs/PortableContextCodecs.js';
|
|
22
|
+
import { estimateResponsesRequestTokens } from '../../context/counting/ResponsesContextTokenEstimator.js';
|
|
23
|
+
import { reserveContextSummary } from '../../execution/ModelRequestPolicy.js';
|
|
24
|
+
import { responseUsage } from '../../../../services/chat/ProviderRequestUsage.js';
|
|
25
|
+
import { ResponsesApiStreamService } from '../../../../services/chat/ResponsesApiStreamService.js';
|
|
26
|
+
import { OpenAIResponsesApiMessageMapper } from '../../../../mappers/chat/openai/OpenAIResponsesApiMessageMapper.js';
|
|
27
|
+
import { DefaultChatMessageTransformer } from '../../../../transformers/default/DefaultChatMessageTransformer.js';
|
|
28
|
+
import { OpenAIResponsesApiService } from '../openai/responses/OpenAIResponsesApiService.js';
|
|
29
|
+
import { prepareOpenAIResponsesInput } from '../openai/responses/OpenAIResponsesInput.js';
|
|
30
|
+
import { TOGETHER_BASE_URL, TOGETHER_LLM_CONFIG, TogetherCatalog } from './TogetherCatalog.js';
|
|
31
|
+
let TogetherLLMProvider = class TogetherLLMProvider extends BaseLLMProvider {
|
|
32
|
+
config;
|
|
33
|
+
catalog;
|
|
34
|
+
responses;
|
|
35
|
+
streams;
|
|
36
|
+
mapper;
|
|
37
|
+
transformer;
|
|
38
|
+
id = 'togetherai';
|
|
39
|
+
constructor(config, catalog, responses, streams, mapper, transformer) {
|
|
40
|
+
super();
|
|
41
|
+
this.config = config;
|
|
42
|
+
this.catalog = catalog;
|
|
43
|
+
this.responses = responses;
|
|
44
|
+
this.streams = streams;
|
|
45
|
+
this.mapper = mapper;
|
|
46
|
+
this.transformer = transformer;
|
|
47
|
+
}
|
|
48
|
+
getModels() { return this.catalog.getModels(); }
|
|
49
|
+
async isValidModel(id) {
|
|
50
|
+
return id.startsWith('togetherai/') && (await this.getModels()).some(model => model.id === id);
|
|
51
|
+
}
|
|
52
|
+
supportsBoundedSubagentExecution() { return true; }
|
|
53
|
+
async prepare(options) {
|
|
54
|
+
const models = await this.getModels();
|
|
55
|
+
const model = models.find(info => info.id === options.model);
|
|
56
|
+
if (!model)
|
|
57
|
+
throw createAIExecutionFailure('provider_model_unavailable');
|
|
58
|
+
const input = prepareOpenAIResponsesInput(options.messages, options.instructions);
|
|
59
|
+
const messages = await this.transformAndMapMessages(input.messages, this.transformer, this.mapper);
|
|
60
|
+
const maxTokens = options.settings?.maxTokens ?? model.defaultSettings?.maxTokens ?? 4096;
|
|
61
|
+
const settings = { ...options.settings, maxTokens };
|
|
62
|
+
const params = { ...options, messages, settings, instructions: input.instructions };
|
|
63
|
+
const transport = {
|
|
64
|
+
apiKey: this.config.getString(TOGETHER_LLM_CONFIG + '.apiKey').trim(),
|
|
65
|
+
baseURL: TOGETHER_BASE_URL,
|
|
66
|
+
signal: options.abortSignal,
|
|
67
|
+
timeout: 120_000,
|
|
68
|
+
maxRetries: 0,
|
|
69
|
+
logLevel: 'off',
|
|
70
|
+
requestPolicy: togetherResponsesRequest,
|
|
71
|
+
normalizeError: normalizeTogetherError,
|
|
72
|
+
};
|
|
73
|
+
// Together does not expose the native token-count or compact endpoints.
|
|
74
|
+
const contextAdapter = new PortableContextAdapter(model.maxContextLength, maxTokens, responsesContextCodec, {
|
|
75
|
+
countTokens: items => Promise.resolve(estimateResponsesRequestTokens({
|
|
76
|
+
model: model.providerModel, input: [...items], instructions: input.instructions ?? '',
|
|
77
|
+
})),
|
|
78
|
+
countSummaryTokens: items => Promise.resolve(estimateResponsesRequestTokens({
|
|
79
|
+
model: model.providerModel, input: [...items], instructions: CONTEXT_SUMMARY_INSTRUCTIONS,
|
|
80
|
+
})),
|
|
81
|
+
summarize: async (history, maxTokens, signal) => {
|
|
82
|
+
const settle = await reserveContextSummary(maxTokens, options.toolExecutionContext);
|
|
83
|
+
const result = await this.responses.getResponse({
|
|
84
|
+
...params, messages: [...history], instructions: CONTEXT_SUMMARY_INSTRUCTIONS, tools: [],
|
|
85
|
+
settings: { maxTokens }, toolExecutionContext: undefined, runId: undefined,
|
|
86
|
+
approvalResumeCheckpoint: undefined,
|
|
87
|
+
}, { ...transport, signal }, models);
|
|
88
|
+
if (result.kind !== 'completed')
|
|
89
|
+
throw createAIExecutionFailure('llm_response_incomplete');
|
|
90
|
+
await settle?.(responseUsage(result.response.usage));
|
|
91
|
+
return result.response.output.flatMap(item => item.type === 'message'
|
|
92
|
+
? item.content.flatMap(part => part.type === 'output_text' ? [part.text] : []) : []).join('');
|
|
93
|
+
},
|
|
94
|
+
});
|
|
95
|
+
return {
|
|
96
|
+
models, params,
|
|
97
|
+
transport: {
|
|
98
|
+
...transport, contextAdapter: Object.assign(contextAdapter, {
|
|
99
|
+
continuationIdentity: this.responses.getContinuationIdentity(model.providerModel, transport),
|
|
100
|
+
}),
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
async getResponse(options) {
|
|
105
|
+
for await (const event of this.getResponseEvents(options)) {
|
|
106
|
+
if (event.type === 'message.completed' && 'message' in event && event.message)
|
|
107
|
+
return event.message;
|
|
108
|
+
if (event.type === 'approval.required' && 'approvalRequestId' in event)
|
|
109
|
+
return event;
|
|
110
|
+
}
|
|
111
|
+
throw createAIExecutionFailure('llm_response_incomplete');
|
|
112
|
+
}
|
|
113
|
+
async *getResponseEvents(options) {
|
|
114
|
+
try {
|
|
115
|
+
const { params, transport, models } = await this.prepare(options);
|
|
116
|
+
yield* this.responses.getResponseEvents(params, transport, models, response => this.mapper.convertToMessage(response.output, options.conversationId ?? undefined));
|
|
117
|
+
}
|
|
118
|
+
catch (error) {
|
|
119
|
+
throw normalizeTogetherError(error);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
async *getResponseStream(options) {
|
|
123
|
+
try {
|
|
124
|
+
const { params, transport, models } = await this.prepare(options);
|
|
125
|
+
yield* this.streams.getResponseStream(request => this.responses.getResponseStream(request, transport, models), params, { ...transport, contextAdapter: options.toolExecutionContext?.executionSession ? transport.contextAdapter : undefined });
|
|
126
|
+
}
|
|
127
|
+
catch (error) {
|
|
128
|
+
throw normalizeTogetherError(error);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
TogetherLLMProvider = __decorate([
|
|
133
|
+
injectable(),
|
|
134
|
+
__param(0, inject(CoreTypes.ConfigService)),
|
|
135
|
+
__param(1, inject(TogetherCatalog)),
|
|
136
|
+
__param(2, inject(CoreTypes.OpenAIResponsesApiService)),
|
|
137
|
+
__param(3, inject(CoreTypes.ResponsesApiStreamService)),
|
|
138
|
+
__param(4, inject(CoreTypes.OpenAIResponsesApiMessageMapper)),
|
|
139
|
+
__param(5, inject(CoreTypes.ChatMessageTransformer)),
|
|
140
|
+
__metadata("design:paramtypes", [ConfigService,
|
|
141
|
+
TogetherCatalog,
|
|
142
|
+
OpenAIResponsesApiService,
|
|
143
|
+
ResponsesApiStreamService,
|
|
144
|
+
OpenAIResponsesApiMessageMapper,
|
|
145
|
+
DefaultChatMessageTransformer])
|
|
146
|
+
], TogetherLLMProvider);
|
|
147
|
+
export { TogetherLLMProvider };
|
|
148
|
+
export function togetherResponsesRequest(request) {
|
|
149
|
+
const tools = request.tools?.map(tool => {
|
|
150
|
+
if (tool.type !== 'function')
|
|
151
|
+
throw createAIExecutionFailure('provider_request_rejected');
|
|
152
|
+
return { ...tool, strict: false };
|
|
153
|
+
});
|
|
154
|
+
return {
|
|
155
|
+
model: request.model, input: request.input, instructions: request.instructions, store: false,
|
|
156
|
+
...(tools?.length && { tools, tool_choice: request.tool_choice, parallel_tool_calls: request.parallel_tool_calls }),
|
|
157
|
+
max_output_tokens: request.max_output_tokens,
|
|
158
|
+
text: request.text,
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
function normalizeTogetherError(error) {
|
|
162
|
+
if (error instanceof SubagentWaitSuspended || error instanceof VoiceContextSuspended
|
|
163
|
+
|| (error instanceof Error && error.name === 'AbortError'))
|
|
164
|
+
return error;
|
|
165
|
+
return createAIExecutionFailure(classifyAIExecutionFailure(error).code);
|
|
166
|
+
}
|
|
167
|
+
//# sourceMappingURL=TogetherLLMProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TogetherLLMProvider.js","sourceRoot":"","sources":["../../../../../../../../src/core/infrastructure/ai/llm/providers/togetherai/TogetherLLMProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAGhD,OAAO,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,CAAC;AAC1H,OAAO,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AAC9F,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,MAAM,yCAAyC,CAAC;AAC/G,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,EAAE,8BAA8B,EAAE,MAAM,0DAA0D,CAAC;AAC1G,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,mDAAmD,CAAC;AAClF,OAAO,EAAE,yBAAyB,EAAE,MAAM,wDAAwD,CAAC;AACnG,OAAO,EAAE,+BAA+B,EAAE,MAAM,oEAAoE,CAAC;AACrH,OAAO,EAAE,6BAA6B,EAAE,MAAM,mEAAmE,CAAC;AAClH,OAAO,EAAE,yBAAyB,EAAE,MAAM,kDAAkD,CAAC;AAC7F,OAAO,EAAE,2BAA2B,EAAE,MAAM,6CAA6C,CAAC;AAC1F,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAGxF,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,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IAEH,OAAO;QACL,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,YAAY,EAAE,OAAO,CAAC,YAAY,EAAE,KAAK,EAAE,KAAK;QAC5F,GAAG,CAAC,KAAK,EAAE,MAAM,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,mBAAmB,EAAE,OAAO,CAAC,mBAAmB,EAAE,CAAC;QACnH,iBAAiB,EAAE,OAAO,CAAC,iBAAiB;QAC5C,IAAI,EAAE,OAAO,CAAC,IAAI;KACnB,CAAC;AACJ,CAAC;AAED,SAAS,sBAAsB,CAAC,KAAc;IAC5C,IAAI,KAAK,YAAY,qBAAqB,IAAI,KAAK,YAAY,qBAAqB;WAC/E,CAAC,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,YAAY,CAAC;QAAE,OAAO,KAAK,CAAC;IAC3E,OAAO,wBAAwB,CAAC,0BAA0B,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC;AAC1E,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ConfigService } from '@gaia-framework/config';
|
|
2
|
+
import { type GoogleGenAiConnection } from '../google/GoogleGenAiConnection.js';
|
|
3
|
+
export type GoogleSpeechSurface = 'speech' | 'realtime' | 'translation';
|
|
4
|
+
export declare function googleSpeechConnection(config: ConfigService, provider: 'google' | 'vertex', surface?: GoogleSpeechSurface): GoogleGenAiConnection | undefined;
|
|
5
|
+
//# sourceMappingURL=GoogleSpeechConnection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GoogleSpeechConnection.d.ts","sourceRoot":"","sources":["../../../../../../src/core/infrastructure/ai/speech/GoogleSpeechConnection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAyB,KAAK,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAEvG,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,UAAU,GAAG,aAAa,CAAC;AASxE,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,GAAG,QAAQ,EAAE,OAAO,GAAE,mBAA8B,GAAG,qBAAqB,GAAG,SAAS,CAcvK"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { googleGenAiConnection } from '../google/GoogleGenAiConnection.js';
|
|
2
|
+
// Model availability differs by endpoint. Never route audio outside the selected location.
|
|
3
|
+
const vertexSpeechLocations = {
|
|
4
|
+
speech: ['global', 'us', 'eu'],
|
|
5
|
+
realtime: ['us', 'eu', 'us-central1', 'asia-south1'],
|
|
6
|
+
translation: ['global'],
|
|
7
|
+
};
|
|
8
|
+
export function googleSpeechConnection(config, provider, surface = 'speech') {
|
|
9
|
+
if (provider === 'google') {
|
|
10
|
+
const apiKey = config.getOptionalString('ai.llm.providers.google.apiKey')?.trim();
|
|
11
|
+
return apiKey ? { kind: 'developer', apiKey } : undefined;
|
|
12
|
+
}
|
|
13
|
+
if (!config.getOptionalBoolean('ai.speech.providers.vertex.enabled')
|
|
14
|
+
|| !config.getOptionalString('ai.vertex.project')?.trim()
|
|
15
|
+
|| !config.getOptionalString('ai.vertex.location')?.trim())
|
|
16
|
+
return undefined;
|
|
17
|
+
const connection = googleGenAiConnection(config, provider);
|
|
18
|
+
if (connection.kind !== 'vertex')
|
|
19
|
+
return undefined;
|
|
20
|
+
const realtimeLocation = surface === 'realtime' ? config.getOptionalString('ai.speech.providers.vertex.realtimeLocation')?.trim() : undefined;
|
|
21
|
+
const location = realtimeLocation || config.getOptionalString('ai.speech.providers.vertex.location')?.trim() || connection.location;
|
|
22
|
+
if (!vertexSpeechLocations[surface].includes(location))
|
|
23
|
+
return undefined;
|
|
24
|
+
return { ...connection, location };
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=GoogleSpeechConnection.js.map
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EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IAC9I,MAAM,QAAQ,GAAG,gBAAgB,IAAI,MAAM,CAAC,iBAAiB,CAAC,qCAAqC,CAAC,EAAE,IAAI,EAAE,IAAI,UAAU,CAAC,QAAQ,CAAC;IACpI,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAAE,OAAO,SAAS,CAAC;IACzE,OAAO,EAAE,GAAG,UAAU,EAAE,QAAQ,EAAE,CAAC;AACrC,CAAC"}
|
|
@@ -2,23 +2,23 @@ import { ConfigService } from "@gaia-framework/config";
|
|
|
2
2
|
import { SpeechToTextModelInfo } from "../../../../domain/models/speech/SpeechModelInfo.js";
|
|
3
3
|
import { LoggerService } from "../../../../domain/ports/services/LoggerService.js";
|
|
4
4
|
import { SpeechRecognitionOptions, SpeechToTextProvider } from "../../../../domain/ports/speech/SpeechToTextProvider.js";
|
|
5
|
+
import type { AudioProcessingService } from "../../../../domain/ports/services/media/AudioProcessingService.js";
|
|
5
6
|
import { TranscriptionProviderCapability, TranscriptionResult } from '../../../../domain/models/speech/Transcription.js';
|
|
6
7
|
export declare class AzureSpeechToTextProvider implements SpeechToTextProvider {
|
|
7
8
|
private readonly loggerService;
|
|
9
|
+
private readonly audioService;
|
|
8
10
|
readonly id = "azure";
|
|
9
11
|
private readonly enabled;
|
|
10
|
-
private readonly
|
|
11
|
-
private readonly
|
|
12
|
+
private readonly defaultResource;
|
|
13
|
+
private readonly maiResources;
|
|
12
14
|
private readonly requestTimeoutMs;
|
|
13
15
|
private readonly maxInputBytes;
|
|
14
|
-
constructor(loggerService: LoggerService, configService: ConfigService);
|
|
16
|
+
constructor(loggerService: LoggerService, configService: ConfigService, audioService: AudioProcessingService);
|
|
15
17
|
getModels(): readonly SpeechToTextModelInfo[];
|
|
16
18
|
getTranscriptionCapabilities(): TranscriptionProviderCapability;
|
|
17
|
-
transcribe(audio: Buffer, model?: string, options?: SpeechRecognitionOptions): Promise<TranscriptionResult>;
|
|
18
19
|
recognizeSpeech(audioBuffer: Buffer, model?: string, options?: SpeechRecognitionOptions): Promise<string>;
|
|
19
|
-
|
|
20
|
-
private
|
|
21
|
-
private endpoint;
|
|
20
|
+
transcribe(audioBuffer: Buffer, model?: string, options?: SpeechRecognitionOptions): Promise<TranscriptionResult>;
|
|
21
|
+
private validateSize;
|
|
22
22
|
private parseResponse;
|
|
23
23
|
private classifyHttpFailure;
|
|
24
24
|
private failure;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AzureSpeechToTextProvider.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/infrastructure/ai/speech/stt/AzureSpeechToTextProvider.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAC;AAC5F,OAAO,EAAE,aAAa,EAAE,MAAM,oDAAoD,CAAC;AACnF,OAAO,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,yDAAyD,CAAC;
|
|
1
|
+
{"version":3,"file":"AzureSpeechToTextProvider.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/infrastructure/ai/speech/stt/AzureSpeechToTextProvider.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAC;AAC5F,OAAO,EAAE,aAAa,EAAE,MAAM,oDAAoD,CAAC;AACnF,OAAO,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,yDAAyD,CAAC;AACzH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mEAAmE,CAAC;AAEhH,OAAO,EAAgC,+BAA+B,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAC;AA0CvJ,qBACa,yBAA0B,YAAW,oBAAoB;IAUjC,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE/B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAX/D,QAAQ,CAAC,EAAE,WAAW;IAEtB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAU;IAClC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAiB;IACjD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAqC;IAClE,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAS;IAC1C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;gBAGa,aAAa,EAAE,aAAa,EAC7C,aAAa,EAAE,aAAa,EACZ,YAAY,EAAE,sBAAsB;IAkBvF,SAAS,IAAI,SAAS,qBAAqB,EAAE;IAQ7C,4BAA4B,IAAI,+BAA+B;IAiBzD,eAAe,CACnB,WAAW,EAAE,MAAM,EACnB,KAAK,CAAC,EAAE,MAAM,EACd,OAAO,GAAE,wBAA6B,GACrC,OAAO,CAAC,MAAM,CAAC;IAIZ,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE,wBAA6B,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAuE3H,OAAO,CAAC,YAAY;YAMN,aAAa;IA2B3B,OAAO,CAAC,mBAAmB;IAa3B,OAAO,CAAC,OAAO;CAoBhB"}
|
|
@@ -20,52 +20,102 @@ import { resolveTranscriptionModel, validateTranscriptionContext } from '../../.
|
|
|
20
20
|
const AZURE_FAST_TRANSCRIPTION_API_VERSION = "2025-10-15";
|
|
21
21
|
const MAX_RESPONSE_BYTES = 1_048_576;
|
|
22
22
|
const AZURE_REGION_PATTERN = /^[a-z0-9-]{1,64}$/;
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
const AZURE_STT = "ai.speech.providers.azure.speechToText";
|
|
24
|
+
const DEFAULT_MODEL = {
|
|
25
|
+
id: "azure/speech-to-text",
|
|
26
|
+
providerModel: "default",
|
|
27
|
+
displayName: "Azure Speech to Text",
|
|
28
|
+
provider: "azure",
|
|
29
|
+
type: "speech_to_text",
|
|
30
|
+
};
|
|
31
|
+
const MAI_MODELS = [
|
|
32
|
+
{ id: "azure/mai-transcribe-2.5", providerModel: "MAI-Transcribe-2.5", configKey: "transcribe25", maxKeywords: 1000 },
|
|
33
|
+
{ id: "azure/mai-transcribe-2", providerModel: "MAI-Transcribe-2", configKey: "transcribe2", maxKeywords: 200 },
|
|
31
34
|
];
|
|
35
|
+
const timing = {
|
|
36
|
+
offsetMilliseconds: z.number().nonnegative().optional(),
|
|
37
|
+
durationMilliseconds: z.number().nonnegative().optional(),
|
|
38
|
+
};
|
|
39
|
+
const timedText = z.object({ text: z.string(), ...timing });
|
|
32
40
|
const AzureFastTranscriptionResponseSchema = z.object({
|
|
33
|
-
combinedPhrases: z.array(z.object({
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
41
|
+
combinedPhrases: z.array(z.object({ text: z.string() })).max(128),
|
|
42
|
+
});
|
|
43
|
+
const MaiTranscriptionResponseSchema = AzureFastTranscriptionResponseSchema.extend({
|
|
44
|
+
phrases: z.array(timedText.extend({
|
|
45
|
+
speaker: z.number().int().nonnegative().optional(),
|
|
46
|
+
locale: z.string().optional(),
|
|
47
|
+
words: z.array(timedText).optional(),
|
|
48
|
+
})).optional(),
|
|
49
|
+
});
|
|
37
50
|
let AzureSpeechToTextProvider = class AzureSpeechToTextProvider {
|
|
38
51
|
loggerService;
|
|
52
|
+
audioService;
|
|
39
53
|
id = "azure";
|
|
40
54
|
enabled;
|
|
41
|
-
|
|
42
|
-
|
|
55
|
+
defaultResource;
|
|
56
|
+
maiResources = new Map();
|
|
43
57
|
requestTimeoutMs;
|
|
44
58
|
maxInputBytes;
|
|
45
|
-
constructor(loggerService, configService) {
|
|
59
|
+
constructor(loggerService, configService, audioService) {
|
|
46
60
|
this.loggerService = loggerService;
|
|
61
|
+
this.audioService = audioService;
|
|
47
62
|
this.enabled = configService.getOptionalBoolean("ai.speech.providers.azure.speechToText.enabled") ?? false;
|
|
48
|
-
this.
|
|
49
|
-
|
|
50
|
-
|
|
63
|
+
this.defaultResource = {
|
|
64
|
+
apiKey: configService.getOptionalString("ai.speech.providers.azure.apiKey")?.trim() ?? "",
|
|
65
|
+
region: configService.getOptionalString("ai.speech.providers.azure.region")?.trim() ?? "",
|
|
66
|
+
resourceName: configService.getOptionalString(AZURE_STT + ".resourceName"),
|
|
67
|
+
};
|
|
68
|
+
this.requestTimeoutMs = configService.getOptionalNumber(AZURE_STT + ".requestTimeoutMs") ?? 120_000;
|
|
51
69
|
this.maxInputBytes = configService.getOptionalNumber("ai.speech.transcription.maxUploadBytes") ?? 26_214_400;
|
|
70
|
+
for (const { configKey, providerModel } of MAI_MODELS) {
|
|
71
|
+
const path = AZURE_STT + ".mai." + configKey;
|
|
72
|
+
if (!configService.getOptionalBoolean(path + ".enabled"))
|
|
73
|
+
continue;
|
|
74
|
+
const resource = configService.getOptional(path + ".resource") ?? this.defaultResource;
|
|
75
|
+
if (this.enabled && validResource(resource))
|
|
76
|
+
this.maiResources.set(providerModel, resource);
|
|
77
|
+
}
|
|
52
78
|
}
|
|
53
79
|
getModels() {
|
|
54
|
-
|
|
80
|
+
const { configured, models } = this.getTranscriptionCapabilities();
|
|
81
|
+
if (!configured)
|
|
82
|
+
return [];
|
|
83
|
+
return models.map(({ id, providerModel, displayName }) => ({
|
|
84
|
+
id, providerModel, displayName, provider: this.id, type: "speech_to_text",
|
|
85
|
+
}));
|
|
55
86
|
}
|
|
56
87
|
getTranscriptionCapabilities() {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
88
|
+
const models = [{
|
|
89
|
+
...DEFAULT_MODEL, modes: ["file"], settings: [],
|
|
90
|
+
formats: ["wav", "mp3", "ogg", "flac", "webm", "m4a", "mp4"], maxUploadBytes: this.maxInputBytes,
|
|
91
|
+
}];
|
|
92
|
+
for (const { id, providerModel, maxKeywords } of MAI_MODELS) {
|
|
93
|
+
if (!this.maiResources.has(providerModel))
|
|
94
|
+
continue;
|
|
95
|
+
models.push({
|
|
96
|
+
id, providerModel, displayName: providerModel, modes: ["file"],
|
|
97
|
+
settings: ["keywords", "languages", "mode", "diarization", "timestamps"],
|
|
98
|
+
languageHintMode: "single", maxKeywords, annotationsWithSmart: true, timestampGranularity: "word",
|
|
99
|
+
formats: ["wav", "mp3", "flac", "ogg"], maxUploadBytes: this.maxInputBytes,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
return { id: this.id, configured: this.enabled && validResource(this.defaultResource), access: "unverified", models };
|
|
61
103
|
}
|
|
62
104
|
async recognizeSpeech(audioBuffer, model, options = {}) {
|
|
63
|
-
|
|
105
|
+
return (await this.transcribe(audioBuffer, model, options)).text;
|
|
106
|
+
}
|
|
107
|
+
async transcribe(audioBuffer, model, options = {}) {
|
|
108
|
+
const catalog = this.getTranscriptionCapabilities();
|
|
109
|
+
if (model !== undefined && !catalog.models.some(entry => entry.id === model || entry.providerModel === model)) {
|
|
64
110
|
throw this.failure('speech_request_rejected', 'rejection', false, 422);
|
|
65
111
|
}
|
|
66
|
-
const capability = resolveTranscriptionModel(
|
|
112
|
+
const capability = resolveTranscriptionModel(catalog.models, model, 'default');
|
|
67
113
|
validateTranscriptionContext(options, capability);
|
|
68
|
-
|
|
114
|
+
const mai = capability.providerModel !== "default";
|
|
115
|
+
if (!catalog.configured)
|
|
116
|
+
throw this.failure("speech_provider_not_configured", "configuration", false, 503);
|
|
117
|
+
const resource = this.maiResources.get(capability.providerModel) ?? this.defaultResource;
|
|
118
|
+
this.validateSize(audioBuffer);
|
|
69
119
|
if (options.abortSignal?.aborted) {
|
|
70
120
|
throw this.failure("speech_recognition_cancelled", "cancelled", false, 408);
|
|
71
121
|
}
|
|
@@ -76,21 +126,33 @@ let AzureSpeechToTextProvider = class AzureSpeechToTextProvider {
|
|
|
76
126
|
? AbortSignal.any([options.abortSignal, timeoutController.signal])
|
|
77
127
|
: timeoutController.signal;
|
|
78
128
|
try {
|
|
79
|
-
|
|
80
|
-
|
|
129
|
+
let audio = audioBuffer;
|
|
130
|
+
let upload = options;
|
|
131
|
+
if (mai && needsPcmConversion(options)) {
|
|
132
|
+
if (!this.audioService.toTranscriptionWav) {
|
|
133
|
+
throw this.failure("speech_provider_not_configured", "configuration", false, 503);
|
|
134
|
+
}
|
|
135
|
+
audio = await this.audioService.toTranscriptionWav(audio, signal);
|
|
136
|
+
this.validateSize(audio);
|
|
137
|
+
upload = { ...options, fileName: "recording.wav", mimeType: "audio/wav" };
|
|
138
|
+
}
|
|
139
|
+
const definition = mai ? maiDefinition(capability.providerModel, options) : undefined;
|
|
140
|
+
const multipart = createAudioMultipart(audio, upload, definition);
|
|
141
|
+
const response = await globalThis.fetch(endpoint(resource), {
|
|
81
142
|
method: "POST",
|
|
82
143
|
headers: {
|
|
83
|
-
"Ocp-Apim-Subscription-Key":
|
|
144
|
+
"Ocp-Apim-Subscription-Key": resource.apiKey,
|
|
84
145
|
"Content-Type": `multipart/form-data; boundary=${multipart.boundary}`,
|
|
85
146
|
"Content-Length": multipart.body.byteLength.toString(),
|
|
86
147
|
},
|
|
87
148
|
body: multipart.body,
|
|
149
|
+
redirect: "error",
|
|
88
150
|
signal,
|
|
89
151
|
});
|
|
90
152
|
if (!response.ok) {
|
|
91
153
|
throw this.classifyHttpFailure(response.status);
|
|
92
154
|
}
|
|
93
|
-
return await this.parseResponse(response);
|
|
155
|
+
return await this.parseResponse(response, mai ? options : undefined);
|
|
94
156
|
}
|
|
95
157
|
catch (error) {
|
|
96
158
|
if (options.abortSignal?.aborted) {
|
|
@@ -108,44 +170,38 @@ let AzureSpeechToTextProvider = class AzureSpeechToTextProvider {
|
|
|
108
170
|
clearTimeout(timeout);
|
|
109
171
|
}
|
|
110
172
|
}
|
|
111
|
-
|
|
112
|
-
if (
|
|
113
|
-
throw this.failure("speech_provider_not_configured", "configuration", false, 503);
|
|
114
|
-
}
|
|
115
|
-
if (model !== undefined && model !== "default") {
|
|
116
|
-
throw this.failure("speech_request_rejected", "rejection", false, 422);
|
|
117
|
-
}
|
|
118
|
-
if (audioBuffer.length === 0 || audioBuffer.length > this.maxInputBytes) {
|
|
173
|
+
validateSize(audio) {
|
|
174
|
+
if (audio.length === 0 || audio.length > this.maxInputBytes) {
|
|
119
175
|
throw this.failure("speech_request_rejected", "rejection", false, 422);
|
|
120
176
|
}
|
|
121
177
|
}
|
|
122
|
-
|
|
123
|
-
return this.enabled
|
|
124
|
-
&& this.apiKey.length > 0
|
|
125
|
-
&& AZURE_REGION_PATTERN.test(this.region);
|
|
126
|
-
}
|
|
127
|
-
endpoint() {
|
|
128
|
-
return `https://${this.region}.api.cognitive.microsoft.com/speechtotext/transcriptions:transcribe?api-version=${AZURE_FAST_TRANSCRIPTION_API_VERSION}`;
|
|
129
|
-
}
|
|
130
|
-
async parseResponse(response) {
|
|
178
|
+
async parseResponse(response, mai) {
|
|
131
179
|
let payload;
|
|
132
180
|
try {
|
|
133
|
-
|
|
181
|
+
const data = await readBoundedJson(response, mai?.timestamps ? 8 * MAX_RESPONSE_BYTES : MAX_RESPONSE_BYTES);
|
|
182
|
+
payload = (mai ? MaiTranscriptionResponseSchema : AzureFastTranscriptionResponseSchema).parse(data);
|
|
134
183
|
}
|
|
135
184
|
catch (error) {
|
|
136
|
-
if (error instanceof SpeechRecognitionError)
|
|
185
|
+
if (error instanceof SpeechRecognitionError)
|
|
137
186
|
throw error;
|
|
138
|
-
}
|
|
139
187
|
throw this.failure("speech_provider_invalid_response", "invalid_response", true, 502, error);
|
|
140
188
|
}
|
|
141
|
-
const
|
|
142
|
-
|
|
143
|
-
.filter(Boolean)
|
|
144
|
-
.join("\n");
|
|
145
|
-
if (!transcript) {
|
|
189
|
+
const text = payload.combinedPhrases.map(phrase => phrase.text.trim()).filter(Boolean).join("\n");
|
|
190
|
+
if (!text)
|
|
146
191
|
throw this.failure("speech_no_match", "no_match", false, 422);
|
|
147
|
-
|
|
148
|
-
|
|
192
|
+
if (!mai || !payload.phrases?.length)
|
|
193
|
+
return { text };
|
|
194
|
+
const phrases = payload.phrases.filter(phrase => phrase.text.trim());
|
|
195
|
+
const locales = [...new Set(phrases.flatMap(phrase => phrase.locale ? [phrase.locale] : []))];
|
|
196
|
+
const speakerFor = (speaker) => mai.diarization && speaker !== undefined ? String(speaker + 1) : undefined;
|
|
197
|
+
const segments = mai.diarization || mai.timestamps ? phrases.map((phrase, index) => ({
|
|
198
|
+
id: String(index), text: phrase.text, speaker: speakerFor(phrase.speaker), ...times(phrase),
|
|
199
|
+
})) : undefined;
|
|
200
|
+
const words = mai.timestamps ? phrases.flatMap(phrase => (phrase.words ?? []).map(word => ({
|
|
201
|
+
text: word.text, speaker: speakerFor(phrase.speaker), ...times(word),
|
|
202
|
+
}))) : undefined;
|
|
203
|
+
return { text, ...(segments?.length && { segments }), ...(words?.length && { words }),
|
|
204
|
+
...(locales.length && { languages: locales.map(code => ({ code })) }) };
|
|
149
205
|
}
|
|
150
206
|
classifyHttpFailure(status) {
|
|
151
207
|
if (status === 401 || status === 403) {
|
|
@@ -178,17 +234,57 @@ AzureSpeechToTextProvider = __decorate([
|
|
|
178
234
|
injectable(),
|
|
179
235
|
__param(0, inject(CoreTypes.LoggerService)),
|
|
180
236
|
__param(1, inject(CoreTypes.ConfigService)),
|
|
181
|
-
|
|
237
|
+
__param(2, inject(CoreTypes.AudioService)),
|
|
238
|
+
__metadata("design:paramtypes", [Object, ConfigService, Object])
|
|
182
239
|
], AzureSpeechToTextProvider);
|
|
183
240
|
export { AzureSpeechToTextProvider };
|
|
184
|
-
function
|
|
241
|
+
function validResource(resource) {
|
|
242
|
+
return !!resource.apiKey?.trim() && AZURE_REGION_PATTERN.test(resource.region)
|
|
243
|
+
&& (!resource.resourceName || /^[a-z0-9][a-z0-9-]{1,62}$/.test(resource.resourceName));
|
|
244
|
+
}
|
|
245
|
+
function endpoint(resource) {
|
|
246
|
+
const hostname = resource.resourceName
|
|
247
|
+
? resource.resourceName + ".cognitiveservices.azure.com"
|
|
248
|
+
: resource.region + ".api.cognitive.microsoft.com";
|
|
249
|
+
return "https://" + hostname + "/speechtotext/transcriptions:transcribe?api-version=" + AZURE_FAST_TRANSCRIPTION_API_VERSION;
|
|
250
|
+
}
|
|
251
|
+
function needsPcmConversion(options) {
|
|
252
|
+
const mime = options.mimeType?.split(";")[0].trim().toLowerCase();
|
|
253
|
+
return mime === "audio/webm" || mime === "video/webm" || mime === "audio/mp4"
|
|
254
|
+
|| mime === "video/mp4" || mime === "audio/x-m4a" || /\.(webm|m4a|mp4)$/i.test(options.fileName ?? "");
|
|
255
|
+
}
|
|
256
|
+
function maiDefinition(model, options) {
|
|
257
|
+
return {
|
|
258
|
+
enhancedMode: {
|
|
259
|
+
enabled: true,
|
|
260
|
+
model,
|
|
261
|
+
modelOptions: {
|
|
262
|
+
transcribeStyle: options.mode === "smart" ? "clean" : "verbatim",
|
|
263
|
+
timestamps: options.timestamps ? "word" : options.diarization ? "segment" : "none",
|
|
264
|
+
},
|
|
265
|
+
},
|
|
266
|
+
...(options.languages?.length && { locales: options.languages }),
|
|
267
|
+
...(options.keywords?.length && { phraseList: { phrases: options.keywords } }),
|
|
268
|
+
...(options.diarization && { diarization: { enabled: true } }),
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
function times(value) {
|
|
272
|
+
const { offsetMilliseconds: offset, durationMilliseconds: duration } = value;
|
|
273
|
+
return offset === undefined ? {} : {
|
|
274
|
+
startSeconds: offset / 1000,
|
|
275
|
+
...(duration !== undefined && { endSeconds: (offset + duration) / 1000 }),
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
function createAudioMultipart(audioBuffer, options, definition) {
|
|
185
279
|
const mimeType = normalizeMimeType(options.mimeType);
|
|
186
280
|
const fileName = normalizeFileName(options.fileName, mimeType);
|
|
187
281
|
const boundary = `gaia-speech-${randomBytes(18).toString("hex")}`;
|
|
188
282
|
const prefix = Buffer.from(`--${boundary}\r\n`
|
|
189
283
|
+ `Content-Disposition: form-data; name="audio"; filename="${fileName}"\r\n`
|
|
190
284
|
+ `Content-Type: ${mimeType}\r\n\r\n`, "utf8");
|
|
191
|
-
const
|
|
285
|
+
const settings = definition === undefined ? "" :
|
|
286
|
+
"\r\n--" + boundary + '\r\nContent-Disposition: form-data; name="definition"\r\n\r\n' + JSON.stringify(definition);
|
|
287
|
+
const suffix = Buffer.from(settings + `\r\n--${boundary}--\r\n`, "utf8");
|
|
192
288
|
return {
|
|
193
289
|
boundary,
|
|
194
290
|
body: Buffer.concat([prefix, audioBuffer, suffix]),
|
|
@@ -218,9 +314,9 @@ function extensionForMimeType(mimeType) {
|
|
|
218
314
|
default: return "wav";
|
|
219
315
|
}
|
|
220
316
|
}
|
|
221
|
-
async function readBoundedJson(response) {
|
|
317
|
+
async function readBoundedJson(response, maxBytes) {
|
|
222
318
|
const declaredLength = Number(response.headers.get("content-length"));
|
|
223
|
-
if (Number.isFinite(declaredLength) && declaredLength >
|
|
319
|
+
if (Number.isFinite(declaredLength) && declaredLength > maxBytes) {
|
|
224
320
|
throw invalidResponse();
|
|
225
321
|
}
|
|
226
322
|
if (!response.body) {
|
|
@@ -235,7 +331,7 @@ async function readBoundedJson(response) {
|
|
|
235
331
|
if (done)
|
|
236
332
|
break;
|
|
237
333
|
byteLength += value.byteLength;
|
|
238
|
-
if (byteLength >
|
|
334
|
+
if (byteLength > maxBytes) {
|
|
239
335
|
await reader.cancel();
|
|
240
336
|
throw invalidResponse();
|
|
241
337
|
}
|