@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleAIEmbeddingService.d.ts","sourceRoot":"","sources":["../../../../../../../../src/core/infrastructure/ai/embedding/providers/google/GoogleAIEmbeddingService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAwB,MAAM,+DAA+D,CAAC;AACzH,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0DAA0D,CAAC;AAC9F,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AAGvF,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAmD,MAAM,6DAA6D,CAAC;
|
|
1
|
+
{"version":3,"file":"GoogleAIEmbeddingService.d.ts","sourceRoot":"","sources":["../../../../../../../../src/core/infrastructure/ai/embedding/providers/google/GoogleAIEmbeddingService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAwB,MAAM,+DAA+D,CAAC;AACzH,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0DAA0D,CAAC;AAC9F,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AAGvF,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAmD,MAAM,6DAA6D,CAAC;AAejK,qBACa,wBAAyB,YAAW,sBAAsB;IAqBnE,QAAQ,CAAC,EAAE,EAAE,QAAQ,GAAG,QAAQ;IApBlC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAE1B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAc;IACtC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAa9B;gBAGiC,aAAa,EAAE,aAAa,EACpD,EAAE,GAAE,QAAQ,GAAG,QAAmB;IAkBvC,KAAK,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,SAAS,eAAe,EAAE,CAAC;IA0BrE,eAAe,CACnB,IAAI,EAAE,MAAM,EACZ,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,kBAAkB,EAAE,CAAC;IAqBhC,kBAAkB,IAAI,kBAAkB,EAAE;IAiB1C,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;CAGrC"}
|
package/build/src/core/infrastructure/ai/embedding/providers/google/GoogleAIEmbeddingService.js
CHANGED
|
@@ -12,14 +12,22 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
12
12
|
};
|
|
13
13
|
import { injectable, inject } from "inversify";
|
|
14
14
|
import { ConfigService } from "@gaia-framework/config";
|
|
15
|
-
import { GoogleGenAI } from "@google/genai";
|
|
16
15
|
import CoreTypes from "../../../../di/types.js";
|
|
17
16
|
import { createEmbeddingSpace, DEFAULT_EMBEDDING_PROFILE } from "../../../../../domain/models/embeddings/EmbeddingProfile.js";
|
|
18
17
|
import { EmbeddingFailure } from "../../../../../domain/models/embeddings/EmbeddingFailure.js";
|
|
19
18
|
import { mapEmbeddingProviderFailure } from "../../EmbeddingProviderFailureMapper.js";
|
|
19
|
+
import { createGoogleGenAiClient, googleGenAiConnection } from "../../../google/GoogleGenAiConnection.js";
|
|
20
|
+
// Google Cloud's embedding availability table lists regional endpoints for 001.
|
|
21
|
+
// The global endpoint also serves this model. Embedding 2 uses global and the US/EU multi-regions.
|
|
22
|
+
const VERTEX_EMBEDDING_001_LOCATIONS = new Set([
|
|
23
|
+
"global", "us-west1", "us-west4", "us-central1", "us-east1", "us-east4", "us-east5", "us-south1",
|
|
24
|
+
"northamerica-northeast1", "southamerica-east1", "europe-west2", "europe-west1", "europe-west4",
|
|
25
|
+
"europe-west6", "europe-west3", "europe-north1", "europe-central2", "europe-west8", "europe-southwest1",
|
|
26
|
+
"europe-west9", "asia-south1", "asia-southeast1", "asia-east2", "asia-east1", "asia-northeast1",
|
|
27
|
+
"australia-southeast1", "asia-northeast3", "me-west1", "me-central1", "me-central2",
|
|
28
|
+
]);
|
|
20
29
|
let GoogleAIEmbeddingService = class GoogleAIEmbeddingService {
|
|
21
|
-
|
|
22
|
-
id = 'google';
|
|
30
|
+
id;
|
|
23
31
|
enabled;
|
|
24
32
|
client;
|
|
25
33
|
embeddingModels = [
|
|
@@ -36,18 +44,33 @@ let GoogleAIEmbeddingService = class GoogleAIEmbeddingService {
|
|
|
36
44
|
modalities: ["text", "image", "multimodal"],
|
|
37
45
|
}
|
|
38
46
|
];
|
|
39
|
-
constructor(configService) {
|
|
40
|
-
this.
|
|
41
|
-
this.enabled =
|
|
42
|
-
|
|
43
|
-
|
|
47
|
+
constructor(configService, id = "google") {
|
|
48
|
+
this.id = id;
|
|
49
|
+
this.enabled = configService.getOptionalBoolean('ai.embeddings.providers.' + id + '.enabled') ?? false;
|
|
50
|
+
if (!this.enabled)
|
|
51
|
+
return;
|
|
52
|
+
if (id === "vertex") {
|
|
53
|
+
const connection = googleGenAiConnection(configService, id);
|
|
54
|
+
if (connection.kind !== "vertex")
|
|
55
|
+
throw new Error("Vertex embeddings require a Cloud project.");
|
|
56
|
+
const location = configService.getOptionalString("ai.embeddings.providers.vertex.location")?.trim() || connection.location;
|
|
57
|
+
this.client = createGoogleGenAiClient({ ...connection, location });
|
|
58
|
+
this.embeddingModels = this.embeddingModels.filter(model => model.name === "gemini-embedding-001"
|
|
59
|
+
? VERTEX_EMBEDDING_001_LOCATIONS.has(location)
|
|
60
|
+
: ["global", "us", "eu"].includes(location));
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
const apiKey = configService.getOptionalString("ai.embeddings.providers.google.apiKey")?.trim();
|
|
64
|
+
if (apiKey)
|
|
65
|
+
this.client = createGoogleGenAiClient({ kind: "developer", apiKey });
|
|
66
|
+
}
|
|
44
67
|
}
|
|
45
68
|
async embed(request) {
|
|
46
69
|
if (!this.enabled)
|
|
47
70
|
throw new EmbeddingFailure("embedding_configuration_error", "Google embeddings are not enabled.", false);
|
|
48
71
|
if (!this.client)
|
|
49
72
|
throw new EmbeddingFailure("embedding_configuration_error", "Google embeddings are not configured.", false);
|
|
50
|
-
if (!this.isValidModel(request.space.providerModel))
|
|
73
|
+
if (request.space.provider !== this.id || !this.isValidModel(request.space.providerModel))
|
|
51
74
|
throw new EmbeddingFailure("embedding_configuration_error", "The configured Google embedding model is not supported.", false);
|
|
52
75
|
const isEmbedding2 = request.space.providerModel === "gemini-embedding-2";
|
|
53
76
|
const text = isEmbedding2
|
|
@@ -73,17 +96,19 @@ let GoogleAIEmbeddingService = class GoogleAIEmbeddingService {
|
|
|
73
96
|
}
|
|
74
97
|
}
|
|
75
98
|
async createEmbedding(text, model) {
|
|
76
|
-
const
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
99
|
+
const selected = this.embeddingModels.find(candidate => candidate.name === model);
|
|
100
|
+
const modelInfo = selected ?? (this.id === "google" || !model ? this.embeddingModels[0] : undefined);
|
|
101
|
+
if (!modelInfo)
|
|
102
|
+
throw new EmbeddingFailure("embedding_configuration_error", "The requested embedding model is unavailable at this location.", false);
|
|
103
|
+
const modelToUse = modelInfo.name;
|
|
104
|
+
const space = createEmbeddingSpace({ ...DEFAULT_EMBEDDING_PROFILE, model: `${this.id}/${modelToUse}`, dimension: modelInfo.defaultDimension });
|
|
80
105
|
const [result] = await this.embed({ text, space, purpose: "document" });
|
|
81
106
|
const embeddingChunks = [
|
|
82
107
|
{
|
|
83
108
|
chunkIndex: 0,
|
|
84
109
|
text: text,
|
|
85
110
|
embedding: [...result.embedding],
|
|
86
|
-
model:
|
|
111
|
+
model: `${this.id}/${modelToUse}`,
|
|
87
112
|
dimension: space.dimension,
|
|
88
113
|
embeddingSpaceKey: space.key,
|
|
89
114
|
}
|
|
@@ -93,7 +118,7 @@ let GoogleAIEmbeddingService = class GoogleAIEmbeddingService {
|
|
|
93
118
|
getEmbeddingModels() {
|
|
94
119
|
return this.embeddingModels.map((model) => {
|
|
95
120
|
return {
|
|
96
|
-
id:
|
|
121
|
+
id: `${this.id}/${model.name}`,
|
|
97
122
|
providerModel: model.name,
|
|
98
123
|
displayName: model.name,
|
|
99
124
|
defaultDimension: model.defaultDimension,
|
|
@@ -101,7 +126,7 @@ let GoogleAIEmbeddingService = class GoogleAIEmbeddingService {
|
|
|
101
126
|
modalities: model.modalities,
|
|
102
127
|
supportedPurposes: ["document", "query"],
|
|
103
128
|
dimension: model.defaultDimension,
|
|
104
|
-
provider:
|
|
129
|
+
provider: this.id,
|
|
105
130
|
type: 'embedding',
|
|
106
131
|
};
|
|
107
132
|
});
|
|
@@ -113,7 +138,7 @@ let GoogleAIEmbeddingService = class GoogleAIEmbeddingService {
|
|
|
113
138
|
GoogleAIEmbeddingService = __decorate([
|
|
114
139
|
injectable(),
|
|
115
140
|
__param(0, inject(CoreTypes.ConfigService)),
|
|
116
|
-
__metadata("design:paramtypes", [ConfigService])
|
|
141
|
+
__metadata("design:paramtypes", [ConfigService, String])
|
|
117
142
|
], GoogleAIEmbeddingService);
|
|
118
143
|
export { GoogleAIEmbeddingService };
|
|
119
144
|
//# sourceMappingURL=GoogleAIEmbeddingService.js.map
|
package/build/src/core/infrastructure/ai/embedding/providers/google/GoogleAIEmbeddingService.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleAIEmbeddingService.js","sourceRoot":"","sources":["../../../../../../../../src/core/infrastructure/ai/embedding/providers/google/GoogleAIEmbeddingService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"GoogleAIEmbeddingService.js","sourceRoot":"","sources":["../../../../../../../../src/core/infrast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,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,KAAK,CAAC,CAAC;IAC1D,CAAC;CACF,CAAA;AA7GY,wBAAwB;IADpC,UAAU,EAAE;IAqBR,WAAA,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,CAAA;qCAAgB,aAAa;GApBpD,wBAAwB,CA6GpC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { GoogleGenAI, type GoogleGenAIOptions } from '@google/genai';
|
|
2
|
+
import type { ConfigService } from '@gaia-framework/config';
|
|
3
|
+
export type GoogleGenAiProvider = 'google' | 'vertex';
|
|
4
|
+
export type GoogleGenAiConnection = {
|
|
5
|
+
readonly kind: 'developer';
|
|
6
|
+
readonly apiKey: string;
|
|
7
|
+
} | {
|
|
8
|
+
readonly kind: 'vertex';
|
|
9
|
+
readonly project: string;
|
|
10
|
+
readonly location: string;
|
|
11
|
+
readonly stagingBucket?: string;
|
|
12
|
+
};
|
|
13
|
+
export declare function googleGenAiConnection(config: Pick<ConfigService, 'getOptionalString'>, provider: GoogleGenAiProvider): GoogleGenAiConnection;
|
|
14
|
+
export declare function createGoogleGenAiClient(connection: GoogleGenAiConnection, options?: Pick<GoogleGenAIOptions, 'httpOptions'>): GoogleGenAI;
|
|
15
|
+
//# sourceMappingURL=GoogleGenAiConnection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GoogleGenAiConnection.d.ts","sourceRoot":"","sources":["../../../../../../src/core/infrastructure/ai/google/GoogleGenAiConnection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,QAAQ,CAAC;AACtD,MAAM,MAAM,qBAAqB,GAC7B;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACvD;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,IAAI,CAAC,aAAa,EAAE,mBAAmB,CAAC,EAChD,QAAQ,EAAE,mBAAmB,GAC5B,qBAAqB,CAUvB;AAED,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,qBAAqB,EACjC,OAAO,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,aAAa,CAAC,GAChD,WAAW,CAKb"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { GoogleGenAI } from '@google/genai';
|
|
2
|
+
export function googleGenAiConnection(config, provider) {
|
|
3
|
+
if (provider === 'google') {
|
|
4
|
+
const apiKey = config.getOptionalString('ai.llm.providers.google.apiKey')?.trim();
|
|
5
|
+
if (!apiKey)
|
|
6
|
+
throw new Error('Google Gemini requires a Developer API key.');
|
|
7
|
+
return { kind: 'developer', apiKey };
|
|
8
|
+
}
|
|
9
|
+
const project = config.getOptionalString('ai.vertex.project')?.trim();
|
|
10
|
+
const location = config.getOptionalString('ai.vertex.location')?.trim();
|
|
11
|
+
if (!project || !location)
|
|
12
|
+
throw new Error('Vertex AI requires a Google Cloud project and location.');
|
|
13
|
+
return { kind: 'vertex', project, location, stagingBucket: config.getOptionalString('ai.vertex.stagingBucket')?.trim() || undefined };
|
|
14
|
+
}
|
|
15
|
+
export function createGoogleGenAiClient(connection, options) {
|
|
16
|
+
// Explicit selection lets both routes coexist even when the SDK's environment flags are set.
|
|
17
|
+
return new GoogleGenAI(connection.kind === 'developer'
|
|
18
|
+
? { ...options, enterprise: false, apiKey: connection.apiKey }
|
|
19
|
+
: { ...options, enterprise: true, project: connection.project, location: connection.location });
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=GoogleGenAiConnection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GoogleGenAiConnection.js","sourceRoot":"","sources":["../../../../../../src/core/infrastructure/ai/google/GoogleGenAiConnection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAA2B,MAAM,eAAe,CAAC;AAQrE,MAAM,UAAU,qBAAqB,CACnC,MAAgD,EAChD,QAA6B;IAE7B,IAAI,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAC1B,MAAM,MAAM,GAAG,MAAM,CAAC,iBAAiB,CAAC,gCAAgC,CAAC,EAAE,IAAI,EAAE,CAAC;QAClF,IAAI,CAAC,MAAM;YAAE,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;QAC5E,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC;IACvC,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,EAAE,IAAI,EAAE,CAAC;IACtE,MAAM,QAAQ,GAAG,MAAM,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,EAAE,IAAI,EAAE,CAAC;IACxE,IAAI,CAAC,OAAO,IAAI,CAAC,QAAQ;QAAE,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;IACtG,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,CAAC,iBAAiB,CAAC,yBAAyB,CAAC,EAAE,IAAI,EAAE,IAAI,SAAS,EAAE,CAAC;AACxI,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,UAAiC,EACjC,OAAiD;IAEjD,6FAA6F;IAC7F,OAAO,IAAI,WAAW,CAAC,UAAU,CAAC,IAAI,KAAK,WAAW;QACpD,CAAC,CAAC,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE;QAC9D,CAAC,CAAC,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,CAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC;AACpG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnimatedPngFixture.test-support.d.ts","sourceRoot":"","sources":["../../../../../../src/core/infrastructure/ai/images/AnimatedPngFixture.test-support.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,iBAAiB,QAGkB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// An 8×8 grayscale APNG with two 100 ms frames: opaque white, then opaque black.
|
|
2
|
+
export const animatedPngBase64 = 'iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAAAAADhZOFXAAAACGFjVEwAAAACAAAAAPONk3AAAAAaZmNUTAAAAAAAAAAIAAAACAAAAAAAAAAA' +
|
|
3
|
+
'AAEACgAA8k66YgAAAA5JREFUeJxj+A8FDJQxAPfAP8GyNEG7AAAAGmZjVEwAAAABAAAACAAAAAgAAAAAAAAAAAABAAoAAGk9ULYAAAAQZmRB' +
|
|
4
|
+
'VAAAAAJ4nGNgoA4AAABIAAFOjhNmAAAAAElFTkSuQmCC';
|
|
5
|
+
//# sourceMappingURL=AnimatedPngFixture.test-support.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnimatedPngFixture.test-support.js","sourceRoot":"","sources":["../../../../../../src/core/infrastructure/ai/images/AnimatedPngFixture.test-support.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,MAAM,CAAC,MAAM,iBAAiB,GAC5B,8GAA8G;IAC9G,8GAA8G;IAC9G,8CAA8C,CAAC"}
|
|
@@ -7,5 +7,6 @@ export declare const imageMimeTypes: {
|
|
|
7
7
|
};
|
|
8
8
|
/** Decode every pixel to reject corrupt/truncated images, but preserve the provider's encoded bytes and metadata. */
|
|
9
9
|
export declare function decodeImageOutput(encoded: string | undefined, format: keyof typeof imageMimeTypes, invalid: () => Error): Promise<ImageEditBytes>;
|
|
10
|
+
export declare function validateImageOutputBytes(data: Buffer, format: keyof typeof imageMimeTypes, invalid: () => Error, maxStaticPixels?: number): Promise<ImageEditBytes>;
|
|
10
11
|
export declare function boundedImageFetch(invalid: () => Error, upstream?: typeof fetch): typeof fetch;
|
|
11
12
|
//# sourceMappingURL=ImageOutputBytes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageOutputBytes.d.ts","sourceRoot":"","sources":["../../../../../../src/core/infrastructure/ai/images/ImageOutputBytes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yDAAyD,CAAC;
|
|
1
|
+
{"version":3,"file":"ImageOutputBytes.d.ts","sourceRoot":"","sources":["../../../../../../src/core/infrastructure/ai/images/ImageOutputBytes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yDAAyD,CAAC;AAG9F,eAAO,MAAM,cAAc;;;;;CAA0F,CAAC;AAEtH,qHAAqH;AACrH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,cAAc,EAAE,OAAO,EAAE,MAAM,KAAK,GAAG,OAAO,CAAC,cAAc,CAAC,CAYvJ;AAED,wBAAsB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,OAAO,cAAc,EAC9F,OAAO,EAAE,MAAM,KAAK,EAAE,eAAe,SAAa,GAAG,OAAO,CAAC,cAAc,CAAC,CA6B7E;AAyBD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,KAAK,EAAE,QAAQ,GAAE,OAAO,KAAa,GAAG,OAAO,KAAK,CAcpG"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import sharp from 'sharp';
|
|
2
|
+
import { hasPngAnimation } from '../../services/media/PngAnimation.js';
|
|
2
3
|
export const imageMimeTypes = { png: 'image/png', jpeg: 'image/jpeg', webp: 'image/webp', gif: 'image/gif' };
|
|
3
4
|
/** Decode every pixel to reject corrupt/truncated images, but preserve the provider's encoded bytes and metadata. */
|
|
4
5
|
export async function decodeImageOutput(encoded, format, invalid) {
|
|
@@ -6,14 +7,19 @@ export async function decodeImageOutput(encoded, format, invalid) {
|
|
|
6
7
|
throw invalid();
|
|
7
8
|
}
|
|
8
9
|
const data = Buffer.from(encoded, 'base64');
|
|
9
|
-
if (
|
|
10
|
+
if (data.toString('base64') !== encoded) {
|
|
10
11
|
throw invalid();
|
|
11
12
|
}
|
|
13
|
+
return validateImageOutputBytes(data, format, invalid);
|
|
14
|
+
}
|
|
15
|
+
export async function validateImageOutputBytes(data, format, invalid, maxStaticPixels = 16_000_000) {
|
|
16
|
+
if (!data.length || data.length > 20_000_000)
|
|
17
|
+
throw invalid();
|
|
12
18
|
try {
|
|
13
19
|
const animated = format === 'gif';
|
|
14
20
|
const decoder = sharp(data, {
|
|
15
21
|
animated,
|
|
16
|
-
limitInputPixels: animated ? 64_000_000 :
|
|
22
|
+
limitInputPixels: animated ? 64_000_000 : maxStaticPixels,
|
|
17
23
|
failOn: 'warning',
|
|
18
24
|
});
|
|
19
25
|
const metadata = await decoder.metadata();
|
|
@@ -24,7 +30,7 @@ export async function decodeImageOutput(encoded, format, invalid) {
|
|
|
24
30
|
await validateAnimation(decoder, metadata, invalid);
|
|
25
31
|
}
|
|
26
32
|
else {
|
|
27
|
-
if ((metadata.pages ?? 1) !== 1) {
|
|
33
|
+
if ((metadata.pages ?? 1) !== 1 || (format === 'png' && hasPngAnimation(data))) {
|
|
28
34
|
throw invalid();
|
|
29
35
|
}
|
|
30
36
|
await decoder.stats();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageOutputBytes.js","sourceRoot":"","sources":["../../../../../../src/core/infrastructure/ai/images/ImageOutputBytes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ImageOutputBytes.js","sourceRoot":"","sources":["../../../../../../src/core/infrastructure/ai/images/ImageOutputBytes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAEvE,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,EAAE,WAAW,EAAW,CAAC;AAEtH,qHAAqH;AACrH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,OAA2B,EAAE,MAAmC,EAAE,OAAoB;IAC5H,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,UAAU,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QAC7G,MAAM,OAAO,EAAE,CAAC;IAClB,CAAC;IAED,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAE5C,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,OAAO,EAAE,CAAC;QACxC,MAAM,OAAO,EAAE,CAAC;IAClB,CAAC;IAED,OAAO,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AACzD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,IAAY,EAAE,MAAmC,EAC9F,OAAoB,EAAE,eAAe,GAAG,UAAU;IAClD,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,GAAG,UAAU;QAAE,MAAM,OAAO,EAAE,CAAC;IAC9D,IAAI,CA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AAI,KAAK,CAAC,MAAM,CAAC;gBACtB,IAAI,KAAK,GAAG,UAAU;oBAAE,MAAM,OAAO,EAAE,CAAC;gBACxC,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YAC5B,CAAC;SACF,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,IAAI,SAAS,EAAE,CAAC,CAAC;QAC3C,OAAO,IAAI,QAAQ,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,UAAU,EAAE,QAAQ,CAAC,UAAU,EAAE,OAAO,EAAE,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;IACrH,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ConfigService } from '@gaia-framework/config';
|
|
2
|
+
import { type ImageEditModelInfo } from '../../../../domain/models/images/ImageEditing.js';
|
|
3
|
+
import type { GenerateImageParams, ImageGenerationProvider } from '../../../../domain/ports/ai/images/ImageGenerationProvider.js';
|
|
4
|
+
import type { ImageEditingProvider } from '../../../../domain/ports/ai/images/ImageEditingProvider.js';
|
|
5
|
+
export declare class QwenImageGenerationProvider implements ImageGenerationProvider {
|
|
6
|
+
private readonly config;
|
|
7
|
+
readonly id = "alibaba";
|
|
8
|
+
constructor(config: ConfigService);
|
|
9
|
+
getModels(): {
|
|
10
|
+
id: string;
|
|
11
|
+
providerModel: string;
|
|
12
|
+
provider: string;
|
|
13
|
+
displayName: string;
|
|
14
|
+
type: "image";
|
|
15
|
+
capabilities: {
|
|
16
|
+
outputFormats: string[];
|
|
17
|
+
sizes: readonly ["auto", "1024x1024", "1536x1024", "1024x1536"];
|
|
18
|
+
maxOutputImages: number;
|
|
19
|
+
customSize: {
|
|
20
|
+
multiple: number;
|
|
21
|
+
maxEdge: number;
|
|
22
|
+
minPixels: number;
|
|
23
|
+
maxPixels: number;
|
|
24
|
+
maxAspectRatio: number;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
}[];
|
|
28
|
+
generateImages(input: GenerateImageParams): Promise<string[]>;
|
|
29
|
+
}
|
|
30
|
+
export declare class QwenImageEditingProvider implements ImageEditingProvider {
|
|
31
|
+
private readonly config;
|
|
32
|
+
constructor(config: ConfigService);
|
|
33
|
+
getModels(): ImageEditModelInfo[];
|
|
34
|
+
editImages(input: Parameters<ImageEditingProvider['editImages']>[0]): Promise<import("../../../../domain/ports/ai/images/ImageEditingProvider.js").ImageEditBytes[]>;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=QwenImageProviders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QwenImageProviders.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/infrastructure/ai/images/alibaba/QwenImageProviders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAMvD,OAAO,EAAqC,KAAK,kBAAkB,EAAE,MAAM,kDAAkD,CAAC;AAI9H,OAAO,KAAK,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,+DAA+D,CAAC;AAClI,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4DAA4D,CAAC;AAkCvG,qBACa,2BAA4B,YAAW,uBAAuB;IAE5B,OAAO,CAAC,QAAQ,CAAC,MAAM;IADpE,QAAQ,CAAC,EAAE,aAAa;gBACsC,MAAM,EAAE,aAAa;IACnF,SAAS;;;;;;;;;;;;;;;;;;;IAIH,cAAc,CAAC,KAAK,EAAE,mBAAmB;CAUhD;AAED,qBACa,wBAAyB,YAAW,oBAAoB;IACtB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,aAAa;IACnF,SAAS;IACH,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,oBAAoB,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;CAa1E"}
|
|
@@ -0,0 +1,108 @@
|
|
|
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 { ConfigService } from '@gaia-framework/config';
|
|
14
|
+
import { inject, injectable } from 'inversify';
|
|
15
|
+
import { z } from 'zod';
|
|
16
|
+
import CoreTypes from '../../../di/types.js';
|
|
17
|
+
import { alibabaWorkspace } from '../../alibaba/AlibabaWorkspace.js';
|
|
18
|
+
import { boundedImageFetch, decodeImageOutput } from '../ImageOutputBytes.js';
|
|
19
|
+
import { ImageEditingError, imageEditSizes } from '../../../../domain/models/images/ImageEditing.js';
|
|
20
|
+
import { validateImageSize } from '../../../../domain/models/images/ImageOutputOptions.js';
|
|
21
|
+
import { validateGenerationOutputOptions } from '../../../../domain/services/media/ImageGenerationOptionsPolicy.js';
|
|
22
|
+
import { validateImageEditOptions } from '../../../../domain/services/media/ImageEditPolicy.js';
|
|
23
|
+
const modelId = 'alibaba/qwen-image-3.0';
|
|
24
|
+
const capabilities = { outputFormats: ['png'], sizes: imageEditSizes, maxOutputImages: 1,
|
|
25
|
+
customSize: { multiple: 1, maxEdge: 5792, minPixels: 512 ** 2, maxPixels: 2048 ** 2, maxAspectRatio: 8 } };
|
|
26
|
+
const editor = {
|
|
27
|
+
id: modelId, provider: 'alibaba', displayName: 'Qwen Image 3.0', sizes: imageEditSizes,
|
|
28
|
+
sizeBehavior: 'dimensions', supportsMask: false, maxInputImages: 3, maxOutputImages: 1,
|
|
29
|
+
inputFormats: ['image/png', 'image/jpeg', 'image/webp'], capabilities,
|
|
30
|
+
};
|
|
31
|
+
const imageResponse = z.object({ data: z.tuple([z.object({ b64_json: z.string() })]) });
|
|
32
|
+
const invalid = () => new ImageEditingError('image_edit_invalid_output', 'Alibaba returned invalid image data.', 502);
|
|
33
|
+
async function requestImage(config, prompt, size, signal, images) {
|
|
34
|
+
const workspace = alibabaWorkspace(config, 'images');
|
|
35
|
+
if (!workspace)
|
|
36
|
+
throw new ImageEditingError('image_edit_unavailable', 'Alibaba image generation is disabled.', 503);
|
|
37
|
+
const timeout = AbortSignal.timeout(180_000);
|
|
38
|
+
const abortSignal = signal ? AbortSignal.any([signal, timeout]) : timeout;
|
|
39
|
+
const response = await boundedImageFetch(invalid)(workspace.baseURL + '/images/generations', {
|
|
40
|
+
method: 'POST', signal: abortSignal, redirect: 'error',
|
|
41
|
+
headers: { Authorization: 'Bearer ' + workspace.apiKey, 'Content-Type': 'application/json' },
|
|
42
|
+
body: JSON.stringify({ model: 'qwen-image-3.0', prompt, size, n: 1, response_format: 'b64_json', image: images }),
|
|
43
|
+
});
|
|
44
|
+
if (!response.ok) {
|
|
45
|
+
await response.body?.cancel();
|
|
46
|
+
throw new ImageEditingError('image_edit_provider_rejected', 'Alibaba rejected the image request (HTTP ' + response.status + ').', response.status);
|
|
47
|
+
}
|
|
48
|
+
const result = imageResponse.safeParse(await response.json());
|
|
49
|
+
if (!result.success)
|
|
50
|
+
throw invalid();
|
|
51
|
+
const bytes = await decodeImageOutput(result.data.data[0].b64_json, 'png', invalid);
|
|
52
|
+
abortSignal.throwIfAborted();
|
|
53
|
+
return bytes;
|
|
54
|
+
}
|
|
55
|
+
let QwenImageGenerationProvider = class QwenImageGenerationProvider {
|
|
56
|
+
config;
|
|
57
|
+
id = 'alibaba';
|
|
58
|
+
constructor(config) {
|
|
59
|
+
this.config = config;
|
|
60
|
+
}
|
|
61
|
+
getModels() {
|
|
62
|
+
return alibabaWorkspace(this.config, 'images') ? [{ id: modelId, providerModel: 'qwen-image-3.0', provider: 'Alibaba Cloud',
|
|
63
|
+
displayName: editor.displayName, type: 'image', capabilities }] : [];
|
|
64
|
+
}
|
|
65
|
+
async generateImages(input) {
|
|
66
|
+
if ((input.model ?? modelId) !== modelId || (input.numberOfImages ?? 1) !== 1 || !input.prompt.trim()) {
|
|
67
|
+
throw new Error('Select Qwen Image 3.0 and provide a prompt for one image.');
|
|
68
|
+
}
|
|
69
|
+
validateGenerationOutputOptions(input, capabilities);
|
|
70
|
+
const size = input.size ?? 'auto';
|
|
71
|
+
validateImageSize(size, imageEditSizes, capabilities.customSize);
|
|
72
|
+
const image = await requestImage(this.config, input.prompt, size, input.abortSignal);
|
|
73
|
+
return ['data:image/png;base64,' + image.data.toString('base64')];
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
QwenImageGenerationProvider = __decorate([
|
|
77
|
+
injectable(),
|
|
78
|
+
__param(0, inject(CoreTypes.ConfigService)),
|
|
79
|
+
__metadata("design:paramtypes", [ConfigService])
|
|
80
|
+
], QwenImageGenerationProvider);
|
|
81
|
+
export { QwenImageGenerationProvider };
|
|
82
|
+
let QwenImageEditingProvider = class QwenImageEditingProvider {
|
|
83
|
+
config;
|
|
84
|
+
constructor(config) {
|
|
85
|
+
this.config = config;
|
|
86
|
+
}
|
|
87
|
+
getModels() { return alibabaWorkspace(this.config, 'images') ? [editor] : []; }
|
|
88
|
+
async editImages(input) {
|
|
89
|
+
validateImageEditOptions(input, editor);
|
|
90
|
+
if (input.model !== modelId || input.mask || input.numberOfImages !== 1 || !input.images.length || input.images.length > 3) {
|
|
91
|
+
throw new ImageEditingError('image_edit_invalid_request', 'Qwen Image 3.0 accepts one to three references and returns one unmasked edit.');
|
|
92
|
+
}
|
|
93
|
+
const images = input.images.map(image => {
|
|
94
|
+
if (!editor.inputFormats.includes(image.mimeType) || !image.data.length || image.data.length > 10_000_000) {
|
|
95
|
+
throw new ImageEditingError('image_edit_invalid_request', 'Qwen accepts JPEG, PNG or WebP references up to 10 MB each.');
|
|
96
|
+
}
|
|
97
|
+
return 'data:' + image.mimeType + ';base64,' + image.data.toString('base64');
|
|
98
|
+
});
|
|
99
|
+
return [await requestImage(this.config, input.prompt, input.size, input.abortSignal, images)];
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
QwenImageEditingProvider = __decorate([
|
|
103
|
+
injectable(),
|
|
104
|
+
__param(0, inject(CoreTypes.ConfigService)),
|
|
105
|
+
__metadata("design:paramtypes", [ConfigService])
|
|
106
|
+
], QwenImageEditingProvider);
|
|
107
|
+
export { QwenImageEditingProvider };
|
|
108
|
+
//# sourceMappingURL=QwenImageProviders.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QwenImageProviders.js","sourceRoot":"","sources":["../../../../../../../src/core/infrastructure/ai/images/alibaba/QwenImageProviders.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,SAAS,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAA2B,MAAM,kDAAkD,CAAC;AAC9H,OAAO,EAAE,iBAAiB,EAAE,MAAM,wDAAwD,CAAC;AAC3F,OAAO,EAAE,+BAA+B,EAAE,MAAM,mEAAmE,CAAC;AACpH,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,CAAC,QAAQ,CAAC,CAAC;QAC/E,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,MAAM,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;IAChG,CAAC;CACF,CAAA;AAhBY,wBAAwB;IADpC,UAAU,EAAE;IAEE,WAAA,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,CAAA;qCAA0B,aAAa;GADxE,wBAAwB,CAgBpC"}
|
package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageClient.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const flux31 = "flux-3.1-image";
|
|
2
|
+
export declare const flux31Capabilities: {
|
|
3
|
+
outputFormats: readonly ["jpeg", "png"];
|
|
4
|
+
sizes: readonly ["auto", "1024x1024", "1536x1024", "1024x1536"];
|
|
5
|
+
customSize: {
|
|
6
|
+
multiple: number;
|
|
7
|
+
maxEdge: number;
|
|
8
|
+
minPixels: number;
|
|
9
|
+
maxPixels: number;
|
|
10
|
+
maxAspectRatio: number;
|
|
11
|
+
};
|
|
12
|
+
maxOutputImages: number;
|
|
13
|
+
};
|
|
14
|
+
export declare class BlackForestLabsRequestError extends Error {
|
|
15
|
+
readonly reason: number | 'moderated';
|
|
16
|
+
constructor(reason: number | 'moderated', message: string);
|
|
17
|
+
}
|
|
18
|
+
/** Submit once, then poll the BFL region that accepted the request. */
|
|
19
|
+
export declare function requestBflImage(model: string, apiKey: string, body: object, signal: AbortSignal): Promise<string>;
|
|
20
|
+
//# sourceMappingURL=BlackForestLabsImageClient.d.ts.map
|
package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageClient.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlackForestLabsImageClient.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageClient.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,eAAO,MAAM,kBAAkB;;;;;;;;;;;CAK9B,CAAC;AAEF,qBAAa,2BAA4B,SAAQ,KAAK;IACxC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW;gBAA5B,MAAM,EAAE,MAAM,GAAG,WAAW,EAAE,OAAO,EAAE,MAAM;CACnE;AAED,uEAAuE;AACvE,wBAAsB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CA8BvH"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { setTimeout as delay } from 'node:timers/promises';
|
|
2
|
+
import { imageEditSizes } from '../../../../domain/models/images/ImageEditing.js';
|
|
3
|
+
export const flux31 = 'flux-3.1-image';
|
|
4
|
+
export const flux31Capabilities = {
|
|
5
|
+
outputFormats: ['jpeg', 'png'],
|
|
6
|
+
sizes: imageEditSizes,
|
|
7
|
+
customSize: { multiple: 1, maxEdge: 11600, minPixels: 250000, maxPixels: 16822272, maxAspectRatio: 8 },
|
|
8
|
+
maxOutputImages: 1,
|
|
9
|
+
};
|
|
10
|
+
export class BlackForestLabsRequestError extends Error {
|
|
11
|
+
reason;
|
|
12
|
+
constructor(reason, message) {
|
|
13
|
+
super(message);
|
|
14
|
+
this.reason = reason;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
/** Submit once, then poll the BFL region that accepted the request. */
|
|
18
|
+
export async function requestBflImage(model, apiKey, body, signal) {
|
|
19
|
+
signal.throwIfAborted();
|
|
20
|
+
const response = await fetch(`https://api.bfl.ai/v1/${model}`, {
|
|
21
|
+
method: 'POST', redirect: 'error', signal,
|
|
22
|
+
headers: { 'x-key': apiKey, 'Content-Type': 'application/json' },
|
|
23
|
+
body: JSON.stringify(body),
|
|
24
|
+
});
|
|
25
|
+
if (!response.ok) {
|
|
26
|
+
throw new BlackForestLabsRequestError(response.status, `Black Forest Labs rejected the image request (HTTP ${response.status}).`);
|
|
27
|
+
}
|
|
28
|
+
const task = await response.json();
|
|
29
|
+
if (!task.polling_url)
|
|
30
|
+
throw new Error('Black Forest Labs did not return a polling URL.');
|
|
31
|
+
const url = new URL(task.polling_url);
|
|
32
|
+
if (url.protocol !== 'https:' || url.port || url.username || url.password ||
|
|
33
|
+
!/^api(?:\.[a-z0-9-]+)*\.bfl\.ai$/.test(url.hostname)) {
|
|
34
|
+
throw new Error('Black Forest Labs returned an invalid polling URL.');
|
|
35
|
+
}
|
|
36
|
+
for (;;) {
|
|
37
|
+
const poll = await fetch(url, { headers: { 'x-key': apiKey }, redirect: 'error', signal });
|
|
38
|
+
if (!poll.ok)
|
|
39
|
+
throw new Error(`Black Forest Labs polling failed (HTTP ${poll.status}).`);
|
|
40
|
+
const { status, result } = await poll.json();
|
|
41
|
+
if (status === 'Ready' && typeof result?.sample === 'string' && result.sample)
|
|
42
|
+
return result.sample;
|
|
43
|
+
if (status === 'Request Moderated' || status === 'Content Moderated') {
|
|
44
|
+
throw new BlackForestLabsRequestError('moderated', `Black Forest Labs did not return an image (status: ${status}).`);
|
|
45
|
+
}
|
|
46
|
+
if (!['Pending', 'Reasoning', 'Generating'].includes(status)) {
|
|
47
|
+
throw new Error(`Black Forest Labs did not return an image (status: ${status}).`);
|
|
48
|
+
}
|
|
49
|
+
await delay(2000, undefined, { signal });
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=BlackForestLabsImageClient.js.map
|
package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageClient.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlackForestLabsImageClient.js","sourceRoot":"","sources":["../../../../../../../src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageClient.ts"],"names":[],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D,MAAM,IAAI,KAAK,CAAC,sDAAsD,MAAM,IAAI,CAAC,CAAC;QACpF,CAAC;QACD,MAAM,KAAK,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAC3C,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ConfigService } from '@gaia-framework/config';
|
|
2
|
+
import { type ImageEditModelInfo } from '../../../../domain/models/images/ImageEditing.js';
|
|
3
|
+
import type { ImageEditingProvider, ImageEditBytes } from '../../../../domain/ports/ai/images/ImageEditingProvider.js';
|
|
4
|
+
import type { RemoteMediaFetcher } from '../../../../domain/ports/services/media/RemoteMediaFetcher.js';
|
|
5
|
+
export declare class BlackForestLabsImageEditingProvider implements ImageEditingProvider {
|
|
6
|
+
private readonly config;
|
|
7
|
+
private readonly mediaFetcher;
|
|
8
|
+
constructor(config: ConfigService, mediaFetcher: RemoteMediaFetcher);
|
|
9
|
+
private get apiKey();
|
|
10
|
+
getModels(): ImageEditModelInfo[];
|
|
11
|
+
editImages(input: Parameters<ImageEditingProvider['editImages']>[0]): Promise<ImageEditBytes[]>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=BlackForestLabsImageEditingProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlackForestLabsImageEditingProvider.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageEditingProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAGvD,OAAO,EAAqB,KAAK,kBAAkB,EAAE,MAAM,kDAAkD,CAAC;AAC9G,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,4DAA4D,CAAC;AACvH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+DAA+D,CAAC;AAcxG,qBACa,mCAAoC,YAAW,oBAAoB;IAE3C,OAAO,CAAC,QAAQ,CAAC,MAAM;IAClB,OAAO,CAAC,QAAQ,CAAC,YAAY;gBADjB,MAAM,EAAE,aAAa,EAChB,YAAY,EAAE,kBAAkB;IAGzF,OAAO,KAAK,MAAM,GAGjB;IAED,SAAS,IAAI,kBAAkB,EAAE;IAI3B,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,oBAAoB,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;CAiDtG"}
|