@juspay/neurolink 9.64.0 → 9.65.1
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 +12 -0
- package/README.md +18 -17
- package/dist/adapters/providerImageAdapter.js +29 -1
- package/dist/adapters/replicate/auth.d.ts +19 -0
- package/dist/adapters/replicate/auth.js +32 -0
- package/dist/adapters/replicate/predictionLifecycle.d.ts +46 -0
- package/dist/adapters/replicate/predictionLifecycle.js +283 -0
- package/dist/adapters/video/klingVideoHandler.d.ts +37 -0
- package/dist/adapters/video/klingVideoHandler.js +305 -0
- package/dist/adapters/video/replicateVideoHandler.d.ts +29 -0
- package/dist/adapters/video/replicateVideoHandler.js +157 -0
- package/dist/adapters/video/runwayVideoHandler.d.ts +32 -0
- package/dist/adapters/video/runwayVideoHandler.js +316 -0
- package/dist/adapters/video/vertexVideoHandler.d.ts +19 -1
- package/dist/adapters/video/vertexVideoHandler.js +33 -9
- package/dist/agent/directTools.js +11 -3
- package/dist/autoresearch/runner.js +8 -2
- package/dist/avatar/index.d.ts +13 -0
- package/dist/avatar/index.js +13 -0
- package/dist/avatar/providers/DIDAvatar.d.ts +49 -0
- package/dist/avatar/providers/DIDAvatar.js +501 -0
- package/dist/avatar/providers/HeyGenAvatar.d.ts +30 -0
- package/dist/avatar/providers/HeyGenAvatar.js +337 -0
- package/dist/avatar/providers/ReplicateAvatar.d.ts +36 -0
- package/dist/avatar/providers/ReplicateAvatar.js +267 -0
- package/dist/browser/neurolink.min.js +624 -601
- package/dist/cli/commands/mcp.js +29 -0
- package/dist/cli/commands/proxy.js +24 -5
- package/dist/cli/factories/commandFactory.d.ts +11 -1
- package/dist/cli/factories/commandFactory.js +291 -38
- package/dist/constants/contextWindows.js +101 -0
- package/dist/constants/enums.d.ts +273 -2
- package/dist/constants/enums.js +290 -1
- package/dist/constants/videoErrors.d.ts +4 -0
- package/dist/constants/videoErrors.js +4 -0
- package/dist/core/baseProvider.d.ts +22 -2
- package/dist/core/baseProvider.js +217 -11
- package/dist/core/constants.d.ts +12 -0
- package/dist/core/constants.js +72 -1
- package/dist/evaluation/index.d.ts +2 -0
- package/dist/evaluation/index.js +4 -0
- package/dist/factories/providerFactory.js +7 -1
- package/dist/factories/providerRegistry.js +202 -5
- package/dist/features/ppt/contentPlanner.js +42 -14
- package/dist/index.d.ts +9 -1
- package/dist/index.js +16 -1
- package/dist/lib/adapters/providerImageAdapter.js +29 -1
- package/dist/lib/adapters/replicate/auth.d.ts +19 -0
- package/dist/lib/adapters/replicate/auth.js +33 -0
- package/dist/lib/adapters/replicate/predictionLifecycle.d.ts +46 -0
- package/dist/lib/adapters/replicate/predictionLifecycle.js +284 -0
- package/dist/lib/adapters/video/klingVideoHandler.d.ts +37 -0
- package/dist/lib/adapters/video/klingVideoHandler.js +306 -0
- package/dist/lib/adapters/video/replicateVideoHandler.d.ts +29 -0
- package/dist/lib/adapters/video/replicateVideoHandler.js +158 -0
- package/dist/lib/adapters/video/runwayVideoHandler.d.ts +32 -0
- package/dist/lib/adapters/video/runwayVideoHandler.js +317 -0
- package/dist/lib/adapters/video/vertexVideoHandler.d.ts +19 -1
- package/dist/lib/adapters/video/vertexVideoHandler.js +33 -9
- package/dist/lib/agent/directTools.js +11 -3
- package/dist/lib/autoresearch/runner.js +8 -2
- package/dist/lib/avatar/index.d.ts +13 -0
- package/dist/lib/avatar/index.js +14 -0
- package/dist/lib/avatar/providers/DIDAvatar.d.ts +49 -0
- package/dist/lib/avatar/providers/DIDAvatar.js +502 -0
- package/dist/lib/avatar/providers/HeyGenAvatar.d.ts +30 -0
- package/dist/lib/avatar/providers/HeyGenAvatar.js +338 -0
- package/dist/lib/avatar/providers/ReplicateAvatar.d.ts +36 -0
- package/dist/lib/avatar/providers/ReplicateAvatar.js +268 -0
- package/dist/lib/constants/contextWindows.js +101 -0
- package/dist/lib/constants/enums.d.ts +273 -2
- package/dist/lib/constants/enums.js +290 -1
- package/dist/lib/constants/videoErrors.d.ts +4 -0
- package/dist/lib/constants/videoErrors.js +4 -0
- package/dist/lib/core/baseProvider.d.ts +22 -2
- package/dist/lib/core/baseProvider.js +217 -11
- package/dist/lib/core/constants.d.ts +12 -0
- package/dist/lib/core/constants.js +72 -1
- package/dist/lib/evaluation/index.d.ts +2 -0
- package/dist/lib/evaluation/index.js +4 -0
- package/dist/lib/factories/providerFactory.js +7 -1
- package/dist/lib/factories/providerRegistry.js +202 -5
- package/dist/lib/features/ppt/contentPlanner.js +42 -14
- package/dist/lib/index.d.ts +9 -1
- package/dist/lib/index.js +16 -1
- package/dist/lib/middleware/builtin/lifecycle.js +39 -9
- package/dist/lib/music/index.d.ts +13 -0
- package/dist/lib/music/index.js +14 -0
- package/dist/lib/music/providers/BeatovenMusic.d.ts +31 -0
- package/dist/lib/music/providers/BeatovenMusic.js +334 -0
- package/dist/lib/music/providers/ElevenLabsMusic.d.ts +30 -0
- package/dist/lib/music/providers/ElevenLabsMusic.js +169 -0
- package/dist/lib/music/providers/LyriaMusic.d.ts +29 -0
- package/dist/lib/music/providers/LyriaMusic.js +173 -0
- package/dist/lib/music/providers/ReplicateMusic.d.ts +31 -0
- package/dist/lib/music/providers/ReplicateMusic.js +262 -0
- package/dist/lib/neurolink.d.ts +30 -0
- package/dist/lib/neurolink.js +323 -77
- package/dist/lib/providers/amazonBedrock.d.ts +10 -0
- package/dist/lib/providers/amazonBedrock.js +94 -39
- package/dist/lib/providers/anthropic.js +55 -7
- package/dist/lib/providers/anthropicBaseProvider.js +1 -1
- package/dist/lib/providers/azureOpenai.js +66 -17
- package/dist/lib/providers/cloudflare.d.ts +35 -0
- package/dist/lib/providers/cloudflare.js +174 -0
- package/dist/lib/providers/cohere.d.ts +52 -0
- package/dist/lib/providers/cohere.js +253 -0
- package/dist/lib/providers/deepseek.js +72 -17
- package/dist/lib/providers/fireworks.d.ts +33 -0
- package/dist/lib/providers/fireworks.js +164 -0
- package/dist/lib/providers/googleAiStudio.js +126 -10
- package/dist/lib/providers/googleNativeGemini3.d.ts +26 -6
- package/dist/lib/providers/googleNativeGemini3.js +276 -29
- package/dist/lib/providers/googleVertex.js +639 -181
- package/dist/lib/providers/groq.d.ts +33 -0
- package/dist/lib/providers/groq.js +181 -0
- package/dist/lib/providers/huggingFace.js +9 -8
- package/dist/lib/providers/ideogram.d.ts +34 -0
- package/dist/lib/providers/ideogram.js +184 -0
- package/dist/lib/providers/index.d.ts +13 -0
- package/dist/lib/providers/index.js +13 -0
- package/dist/lib/providers/jina.d.ts +59 -0
- package/dist/lib/providers/jina.js +218 -0
- package/dist/lib/providers/llamaCpp.js +14 -46
- package/dist/lib/providers/lmStudio.js +14 -47
- package/dist/lib/providers/mistral.js +7 -7
- package/dist/lib/providers/nvidiaNim.js +160 -19
- package/dist/lib/providers/ollama.js +7 -7
- package/dist/lib/providers/openAI.d.ts +22 -1
- package/dist/lib/providers/openAI.js +181 -0
- package/dist/lib/providers/openRouter.js +35 -23
- package/dist/lib/providers/openaiCompatible.js +9 -8
- package/dist/lib/providers/perplexity.d.ts +33 -0
- package/dist/lib/providers/perplexity.js +179 -0
- package/dist/lib/providers/recraft.d.ts +34 -0
- package/dist/lib/providers/recraft.js +197 -0
- package/dist/lib/providers/replicate.d.ts +75 -0
- package/dist/lib/providers/replicate.js +403 -0
- package/dist/lib/providers/stability.d.ts +37 -0
- package/dist/lib/providers/stability.js +191 -0
- package/dist/lib/providers/togetherAi.d.ts +33 -0
- package/dist/lib/providers/togetherAi.js +176 -0
- package/dist/lib/providers/voyage.d.ts +47 -0
- package/dist/lib/providers/voyage.js +177 -0
- package/dist/lib/providers/xai.d.ts +33 -0
- package/dist/lib/providers/xai.js +172 -0
- package/dist/lib/telemetry/index.d.ts +1 -1
- package/dist/lib/telemetry/index.js +1 -1
- package/dist/lib/telemetry/tracers.d.ts +19 -0
- package/dist/lib/telemetry/tracers.js +19 -0
- package/dist/lib/telemetry/withSpan.d.ts +35 -0
- package/dist/lib/telemetry/withSpan.js +103 -0
- package/dist/lib/types/avatar.d.ts +143 -0
- package/dist/lib/types/avatar.js +20 -0
- package/dist/lib/types/cli.d.ts +6 -0
- package/dist/lib/types/conversation.d.ts +16 -0
- package/dist/lib/types/generate.d.ts +62 -5
- package/dist/lib/types/index.d.ts +5 -0
- package/dist/lib/types/index.js +7 -0
- package/dist/lib/types/middleware.d.ts +27 -0
- package/dist/lib/types/multimodal.d.ts +35 -2
- package/dist/lib/types/music.d.ts +165 -0
- package/dist/lib/types/music.js +21 -0
- package/dist/lib/types/providers.d.ts +144 -1
- package/dist/lib/types/replicate.d.ts +67 -0
- package/dist/lib/types/replicate.js +10 -0
- package/dist/lib/types/safeFetch.d.ts +15 -0
- package/dist/lib/types/safeFetch.js +7 -0
- package/dist/lib/types/stream.d.ts +2 -1
- package/dist/lib/types/tools.d.ts +13 -0
- package/dist/lib/types/video.d.ts +89 -0
- package/dist/lib/types/video.js +15 -0
- package/dist/lib/utils/avatarProcessor.d.ts +68 -0
- package/dist/lib/utils/avatarProcessor.js +172 -0
- package/dist/lib/utils/cloneOptions.d.ts +36 -0
- package/dist/lib/utils/cloneOptions.js +62 -0
- package/dist/lib/utils/lifecycleCallbacks.d.ts +51 -8
- package/dist/lib/utils/lifecycleCallbacks.js +82 -26
- package/dist/lib/utils/lifecycleTimeout.d.ts +25 -0
- package/dist/lib/utils/lifecycleTimeout.js +39 -0
- package/dist/lib/utils/logSanitize.d.ts +49 -0
- package/dist/lib/utils/logSanitize.js +170 -0
- package/dist/lib/utils/loggingFetch.d.ts +29 -0
- package/dist/lib/utils/loggingFetch.js +60 -0
- package/dist/lib/utils/messageBuilder.js +43 -25
- package/dist/lib/utils/modelChoices.js +236 -3
- package/dist/lib/utils/musicProcessor.d.ts +67 -0
- package/dist/lib/utils/musicProcessor.js +189 -0
- package/dist/lib/utils/optionsConversion.js +3 -2
- package/dist/lib/utils/parameterValidation.js +14 -4
- package/dist/lib/utils/pricing.js +193 -0
- package/dist/lib/utils/providerConfig.d.ts +55 -0
- package/dist/lib/utils/providerConfig.js +224 -0
- package/dist/lib/utils/safeFetch.d.ts +26 -0
- package/dist/lib/utils/safeFetch.js +83 -0
- package/dist/lib/utils/sizeGuard.d.ts +34 -0
- package/dist/lib/utils/sizeGuard.js +45 -0
- package/dist/lib/utils/ssrfGuard.d.ts +52 -0
- package/dist/lib/utils/ssrfGuard.js +411 -0
- package/dist/lib/utils/videoProcessor.d.ts +60 -0
- package/dist/lib/utils/videoProcessor.js +201 -0
- package/dist/lib/voice/providers/FishAudioTTS.d.ts +27 -0
- package/dist/lib/voice/providers/FishAudioTTS.js +183 -0
- package/dist/lib/workflow/core/ensembleExecutor.js +26 -9
- package/dist/middleware/builtin/lifecycle.js +39 -9
- package/dist/music/index.d.ts +13 -0
- package/dist/music/index.js +13 -0
- package/dist/music/providers/BeatovenMusic.d.ts +31 -0
- package/dist/music/providers/BeatovenMusic.js +333 -0
- package/dist/music/providers/ElevenLabsMusic.d.ts +30 -0
- package/dist/music/providers/ElevenLabsMusic.js +168 -0
- package/dist/music/providers/LyriaMusic.d.ts +29 -0
- package/dist/music/providers/LyriaMusic.js +172 -0
- package/dist/music/providers/ReplicateMusic.d.ts +31 -0
- package/dist/music/providers/ReplicateMusic.js +261 -0
- package/dist/neurolink.d.ts +30 -0
- package/dist/neurolink.js +323 -77
- package/dist/providers/amazonBedrock.d.ts +10 -0
- package/dist/providers/amazonBedrock.js +94 -39
- package/dist/providers/anthropic.js +55 -7
- package/dist/providers/anthropicBaseProvider.js +1 -1
- package/dist/providers/azureOpenai.js +66 -17
- package/dist/providers/cloudflare.d.ts +35 -0
- package/dist/providers/cloudflare.js +173 -0
- package/dist/providers/cohere.d.ts +52 -0
- package/dist/providers/cohere.js +252 -0
- package/dist/providers/deepseek.js +72 -17
- package/dist/providers/fireworks.d.ts +33 -0
- package/dist/providers/fireworks.js +163 -0
- package/dist/providers/googleAiStudio.js +126 -10
- package/dist/providers/googleNativeGemini3.d.ts +26 -6
- package/dist/providers/googleNativeGemini3.js +276 -29
- package/dist/providers/googleVertex.js +639 -181
- package/dist/providers/groq.d.ts +33 -0
- package/dist/providers/groq.js +180 -0
- package/dist/providers/huggingFace.js +9 -8
- package/dist/providers/ideogram.d.ts +34 -0
- package/dist/providers/ideogram.js +183 -0
- package/dist/providers/index.d.ts +13 -0
- package/dist/providers/index.js +13 -0
- package/dist/providers/jina.d.ts +59 -0
- package/dist/providers/jina.js +217 -0
- package/dist/providers/llamaCpp.js +14 -46
- package/dist/providers/lmStudio.js +14 -47
- package/dist/providers/mistral.js +7 -7
- package/dist/providers/nvidiaNim.js +160 -19
- package/dist/providers/ollama.js +7 -7
- package/dist/providers/openAI.d.ts +22 -1
- package/dist/providers/openAI.js +181 -0
- package/dist/providers/openRouter.js +35 -23
- package/dist/providers/openaiCompatible.js +9 -8
- package/dist/providers/perplexity.d.ts +33 -0
- package/dist/providers/perplexity.js +178 -0
- package/dist/providers/recraft.d.ts +34 -0
- package/dist/providers/recraft.js +196 -0
- package/dist/providers/replicate.d.ts +75 -0
- package/dist/providers/replicate.js +402 -0
- package/dist/providers/stability.d.ts +37 -0
- package/dist/providers/stability.js +190 -0
- package/dist/providers/togetherAi.d.ts +33 -0
- package/dist/providers/togetherAi.js +175 -0
- package/dist/providers/voyage.d.ts +47 -0
- package/dist/providers/voyage.js +176 -0
- package/dist/providers/xai.d.ts +33 -0
- package/dist/providers/xai.js +171 -0
- package/dist/telemetry/index.d.ts +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/telemetry/tracers.d.ts +19 -0
- package/dist/telemetry/tracers.js +19 -0
- package/dist/telemetry/withSpan.d.ts +35 -0
- package/dist/telemetry/withSpan.js +103 -0
- package/dist/types/avatar.d.ts +143 -0
- package/dist/types/avatar.js +19 -0
- package/dist/types/cli.d.ts +6 -0
- package/dist/types/conversation.d.ts +16 -0
- package/dist/types/generate.d.ts +62 -5
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.js +7 -0
- package/dist/types/middleware.d.ts +27 -0
- package/dist/types/multimodal.d.ts +35 -2
- package/dist/types/music.d.ts +165 -0
- package/dist/types/music.js +20 -0
- package/dist/types/providers.d.ts +144 -1
- package/dist/types/replicate.d.ts +67 -0
- package/dist/types/replicate.js +9 -0
- package/dist/types/safeFetch.d.ts +15 -0
- package/dist/types/safeFetch.js +6 -0
- package/dist/types/stream.d.ts +2 -1
- package/dist/types/tools.d.ts +13 -0
- package/dist/types/video.d.ts +89 -0
- package/dist/types/video.js +14 -0
- package/dist/utils/avatarProcessor.d.ts +68 -0
- package/dist/utils/avatarProcessor.js +171 -0
- package/dist/utils/cloneOptions.d.ts +36 -0
- package/dist/utils/cloneOptions.js +61 -0
- package/dist/utils/lifecycleCallbacks.d.ts +51 -8
- package/dist/utils/lifecycleCallbacks.js +82 -26
- package/dist/utils/lifecycleTimeout.d.ts +25 -0
- package/dist/utils/lifecycleTimeout.js +38 -0
- package/dist/utils/logSanitize.d.ts +49 -0
- package/dist/utils/logSanitize.js +169 -0
- package/dist/utils/loggingFetch.d.ts +29 -0
- package/dist/utils/loggingFetch.js +59 -0
- package/dist/utils/messageBuilder.js +43 -25
- package/dist/utils/modelChoices.js +236 -3
- package/dist/utils/musicProcessor.d.ts +67 -0
- package/dist/utils/musicProcessor.js +188 -0
- package/dist/utils/optionsConversion.js +3 -2
- package/dist/utils/parameterValidation.js +14 -4
- package/dist/utils/pricing.js +193 -0
- package/dist/utils/providerConfig.d.ts +55 -0
- package/dist/utils/providerConfig.js +224 -0
- package/dist/utils/safeFetch.d.ts +26 -0
- package/dist/utils/safeFetch.js +82 -0
- package/dist/utils/sizeGuard.d.ts +34 -0
- package/dist/utils/sizeGuard.js +44 -0
- package/dist/utils/ssrfGuard.d.ts +52 -0
- package/dist/utils/ssrfGuard.js +410 -0
- package/dist/utils/videoProcessor.d.ts +60 -0
- package/dist/utils/videoProcessor.js +200 -0
- package/dist/voice/providers/FishAudioTTS.d.ts +27 -0
- package/dist/voice/providers/FishAudioTTS.js +182 -0
- package/dist/workflow/core/ensembleExecutor.js +26 -9
- package/package.json +32 -5
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Video Generation Processing Utility
|
|
3
|
+
*
|
|
4
|
+
* Central registry + dispatch for video-generation handlers across
|
|
5
|
+
* providers (Vertex Veo, Kling, Runway, Replicate-hosted models, etc.).
|
|
6
|
+
*
|
|
7
|
+
* Mirrors the static-handler-registry pattern established by
|
|
8
|
+
* `TTSProcessor` (`utils/ttsProcessor.ts`) and `STTProcessor`
|
|
9
|
+
* (`utils/sttProcessor.ts`).
|
|
10
|
+
*
|
|
11
|
+
* @module utils/videoProcessor
|
|
12
|
+
*/
|
|
13
|
+
import { ErrorCategory, ErrorSeverity } from "../constants/enums.js";
|
|
14
|
+
import { VIDEO_ERROR_CODES } from "../constants/videoErrors.js";
|
|
15
|
+
import { SpanSerializer, SpanStatus, SpanType, getMetricsAggregator, } from "../observability/index.js";
|
|
16
|
+
import { logger } from "./logger.js";
|
|
17
|
+
// VideoError is canonical in vertexVideoHandler.ts (existing). Re-export
|
|
18
|
+
// here so consumers of `VideoProcessor` can import the typed error from
|
|
19
|
+
// the same module. Both throws and instanceof checks resolve to the same
|
|
20
|
+
// class.
|
|
21
|
+
import { VideoError } from "../adapters/video/vertexVideoHandler.js";
|
|
22
|
+
export { VideoError, VIDEO_ERROR_CODES };
|
|
23
|
+
/**
|
|
24
|
+
* Static processor managing the video handler registry.
|
|
25
|
+
*
|
|
26
|
+
* Handlers register themselves during `ProviderRegistry._doRegister()`
|
|
27
|
+
* via `VideoProcessor.registerHandler(name, instance)`. Lookups are
|
|
28
|
+
* O(1) on a normalised lower-case provider key.
|
|
29
|
+
*/
|
|
30
|
+
export class VideoProcessor {
|
|
31
|
+
static handlers = new Map();
|
|
32
|
+
/**
|
|
33
|
+
* Register a video handler for a specific provider.
|
|
34
|
+
*/
|
|
35
|
+
static registerHandler(providerName, handler) {
|
|
36
|
+
if (!providerName) {
|
|
37
|
+
throw new Error("Provider name is required");
|
|
38
|
+
}
|
|
39
|
+
if (!handler) {
|
|
40
|
+
throw new Error("Handler is required");
|
|
41
|
+
}
|
|
42
|
+
const key = providerName.toLowerCase();
|
|
43
|
+
if (this.handlers.has(key)) {
|
|
44
|
+
logger.warn(`[VideoProcessor] Overwriting existing handler for provider: ${key}`);
|
|
45
|
+
}
|
|
46
|
+
this.handlers.set(key, handler);
|
|
47
|
+
logger.debug(`[VideoProcessor] Registered video handler: ${key}`);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Check if a provider has a registered video handler.
|
|
51
|
+
*/
|
|
52
|
+
static supports(providerName) {
|
|
53
|
+
if (!providerName) {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
return this.handlers.has(providerName.toLowerCase());
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* List the names of all registered providers.
|
|
60
|
+
*/
|
|
61
|
+
static listProviders() {
|
|
62
|
+
return Array.from(this.handlers.keys());
|
|
63
|
+
}
|
|
64
|
+
static getHandler(providerName) {
|
|
65
|
+
return this.handlers.get(providerName.toLowerCase());
|
|
66
|
+
}
|
|
67
|
+
static buildSpanAttributes(provider, options) {
|
|
68
|
+
return {
|
|
69
|
+
"video.operation": "generate",
|
|
70
|
+
"video.provider": provider,
|
|
71
|
+
"video.resolution": options.resolution,
|
|
72
|
+
"video.duration": options.length,
|
|
73
|
+
"video.aspect_ratio": options.aspectRatio,
|
|
74
|
+
"video.audio": options.audio,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Generate a single video clip via the registered handler.
|
|
79
|
+
*
|
|
80
|
+
* @param provider - Registered provider name (e.g. "vertex", "kling")
|
|
81
|
+
* @param image - Source image buffer
|
|
82
|
+
* @param prompt - Text prompt describing the desired motion / content
|
|
83
|
+
* @param options - Resolution / length / aspect-ratio / audio options
|
|
84
|
+
* @param region - Optional region override (Vertex location, etc.)
|
|
85
|
+
* @throws VideoError on registry miss, handler-not-configured, or
|
|
86
|
+
* generation failure
|
|
87
|
+
*/
|
|
88
|
+
static async generate(provider, image, prompt, options, region) {
|
|
89
|
+
const span = SpanSerializer.createSpan(SpanType.MEDIA_GENERATION, "video.generate", this.buildSpanAttributes(provider, options));
|
|
90
|
+
try {
|
|
91
|
+
const handler = this.getHandler(provider);
|
|
92
|
+
if (!handler) {
|
|
93
|
+
throw new VideoError({
|
|
94
|
+
code: VIDEO_ERROR_CODES.PROVIDER_NOT_SUPPORTED,
|
|
95
|
+
message: `Video provider "${provider}" is not registered. Available: ${this.listProviders().join(", ")}`,
|
|
96
|
+
category: ErrorCategory.CONFIGURATION,
|
|
97
|
+
severity: ErrorSeverity.HIGH,
|
|
98
|
+
retriable: false,
|
|
99
|
+
context: { provider, available: this.listProviders() },
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
if (!handler.isConfigured()) {
|
|
103
|
+
throw new VideoError({
|
|
104
|
+
code: VIDEO_ERROR_CODES.PROVIDER_NOT_CONFIGURED,
|
|
105
|
+
message: `Video provider "${provider}" is not configured. Set the required credentials.`,
|
|
106
|
+
category: ErrorCategory.CONFIGURATION,
|
|
107
|
+
severity: ErrorSeverity.HIGH,
|
|
108
|
+
retriable: false,
|
|
109
|
+
context: { provider },
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
logger.debug(`[VideoProcessor] Starting video generation with provider: ${provider}`);
|
|
113
|
+
const result = await handler.generate(image, prompt, options, region);
|
|
114
|
+
const ended = SpanSerializer.endSpan(span, SpanStatus.OK);
|
|
115
|
+
getMetricsAggregator().recordSpan(ended);
|
|
116
|
+
logger.info(`[VideoProcessor] Generated ${result.data.length} bytes (${provider})`);
|
|
117
|
+
return result;
|
|
118
|
+
}
|
|
119
|
+
catch (err) {
|
|
120
|
+
const ended = SpanSerializer.endSpan(span, SpanStatus.ERROR, err instanceof Error ? err.message : String(err));
|
|
121
|
+
getMetricsAggregator().recordSpan(ended);
|
|
122
|
+
if (err instanceof VideoError) {
|
|
123
|
+
throw err;
|
|
124
|
+
}
|
|
125
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
126
|
+
throw new VideoError({
|
|
127
|
+
code: VIDEO_ERROR_CODES.GENERATION_FAILED,
|
|
128
|
+
message: `Video generation failed for provider "${provider}": ${message}`,
|
|
129
|
+
category: ErrorCategory.EXECUTION,
|
|
130
|
+
severity: ErrorSeverity.HIGH,
|
|
131
|
+
retriable: true,
|
|
132
|
+
context: { provider, options, region },
|
|
133
|
+
originalError: err instanceof Error ? err : undefined,
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Generate a transition clip via the registered handler (Director Mode).
|
|
139
|
+
*
|
|
140
|
+
* Providers without first-and-last-frame interpolation surface a typed
|
|
141
|
+
* `TRANSITION_NOT_SUPPORTED` error here; callers should fall back to
|
|
142
|
+
* generating a regular clip with a transition prompt.
|
|
143
|
+
*/
|
|
144
|
+
static async generateTransition(provider, firstFrame, lastFrame, prompt, options, region) {
|
|
145
|
+
const handler = this.getHandler(provider);
|
|
146
|
+
if (!handler) {
|
|
147
|
+
throw new VideoError({
|
|
148
|
+
code: VIDEO_ERROR_CODES.PROVIDER_NOT_SUPPORTED,
|
|
149
|
+
message: `Video provider "${provider}" is not registered for transitions`,
|
|
150
|
+
category: ErrorCategory.CONFIGURATION,
|
|
151
|
+
severity: ErrorSeverity.HIGH,
|
|
152
|
+
retriable: false,
|
|
153
|
+
context: { provider, available: this.listProviders() },
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
if (!handler.generateTransition) {
|
|
157
|
+
throw new VideoError({
|
|
158
|
+
code: VIDEO_ERROR_CODES.TRANSITION_NOT_SUPPORTED,
|
|
159
|
+
message: `Video provider "${provider}" does not support transition clips`,
|
|
160
|
+
category: ErrorCategory.VALIDATION,
|
|
161
|
+
severity: ErrorSeverity.MEDIUM,
|
|
162
|
+
retriable: false,
|
|
163
|
+
context: { provider },
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
if (!handler.isConfigured()) {
|
|
167
|
+
throw new VideoError({
|
|
168
|
+
code: VIDEO_ERROR_CODES.PROVIDER_NOT_CONFIGURED,
|
|
169
|
+
message: `Video provider "${provider}" is not configured`,
|
|
170
|
+
category: ErrorCategory.CONFIGURATION,
|
|
171
|
+
severity: ErrorSeverity.HIGH,
|
|
172
|
+
retriable: false,
|
|
173
|
+
context: { provider },
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
try {
|
|
177
|
+
return await handler.generateTransition(firstFrame, lastFrame, prompt, options, region);
|
|
178
|
+
}
|
|
179
|
+
catch (err) {
|
|
180
|
+
if (err instanceof VideoError) {
|
|
181
|
+
throw err;
|
|
182
|
+
}
|
|
183
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
184
|
+
throw new VideoError({
|
|
185
|
+
code: VIDEO_ERROR_CODES.DIRECTOR_TRANSITION_FAILED,
|
|
186
|
+
message: `Video transition generation failed for provider "${provider}": ${message}`,
|
|
187
|
+
category: ErrorCategory.EXECUTION,
|
|
188
|
+
severity: ErrorSeverity.MEDIUM,
|
|
189
|
+
retriable: true,
|
|
190
|
+
context: {
|
|
191
|
+
provider,
|
|
192
|
+
firstFrameSize: firstFrame.length,
|
|
193
|
+
lastFrameSize: lastFrame.length,
|
|
194
|
+
durationSeconds: options?.durationSeconds,
|
|
195
|
+
},
|
|
196
|
+
originalError: err instanceof Error ? err : undefined,
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fish Audio TTS Handler
|
|
3
|
+
*
|
|
4
|
+
* Implementation of TTS using Fish Audio API. Lower-cost alternative to
|
|
5
|
+
* ElevenLabs with strong multilingual support and 15s voice cloning.
|
|
6
|
+
*
|
|
7
|
+
* @module voice/providers/FishAudioTTS
|
|
8
|
+
* @see https://docs.fish.audio/text-to-speech/text-to-speech
|
|
9
|
+
*/
|
|
10
|
+
import type { TTSHandler, TTSOptions, TTSResult } from "../../types/index.js";
|
|
11
|
+
/**
|
|
12
|
+
* Fish Audio Text-to-Speech Handler.
|
|
13
|
+
*
|
|
14
|
+
* Auth: `Authorization: Bearer ${FISH_AUDIO_API_KEY}`.
|
|
15
|
+
* Models: speech-1.5 (standard), speech-1.6, s1 (default; latest).
|
|
16
|
+
*/
|
|
17
|
+
export declare class FishAudioTTS implements TTSHandler {
|
|
18
|
+
readonly maxTextLength = 5000;
|
|
19
|
+
private readonly apiKey;
|
|
20
|
+
private readonly baseUrl;
|
|
21
|
+
constructor(apiKey?: string);
|
|
22
|
+
isConfigured(): boolean;
|
|
23
|
+
synthesize(text: string, options?: TTSOptions): Promise<TTSResult>;
|
|
24
|
+
private mapFormat;
|
|
25
|
+
private effectiveFormat;
|
|
26
|
+
private getSampleRate;
|
|
27
|
+
}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fish Audio TTS Handler
|
|
3
|
+
*
|
|
4
|
+
* Implementation of TTS using Fish Audio API. Lower-cost alternative to
|
|
5
|
+
* ElevenLabs with strong multilingual support and 15s voice cloning.
|
|
6
|
+
*
|
|
7
|
+
* @module voice/providers/FishAudioTTS
|
|
8
|
+
* @see https://docs.fish.audio/text-to-speech/text-to-speech
|
|
9
|
+
*/
|
|
10
|
+
import { ErrorCategory, ErrorSeverity } from "../../constants/enums.js";
|
|
11
|
+
import { logger } from "../../utils/logger.js";
|
|
12
|
+
import { TTS_ERROR_CODES, TTSError } from "../../utils/ttsProcessor.js";
|
|
13
|
+
const DEFAULT_BASE_URL = "https://api.fish.audio";
|
|
14
|
+
const REQUEST_TIMEOUT_MS = 30_000;
|
|
15
|
+
/**
|
|
16
|
+
* Default reference voice — "Energetic Male" by official author `lengyue`,
|
|
17
|
+
* a long-standing public English voice on Fish Audio.
|
|
18
|
+
*
|
|
19
|
+
* @see https://fish.audio (model id 802e3bc2b27e49c2995d23ef70e6ac89)
|
|
20
|
+
*
|
|
21
|
+
* Note: the previous default `fb6c0e1ea91e427fb9a93b9bbf0a1e4d` was
|
|
22
|
+
* removed upstream and started returning 400 "Reference not found".
|
|
23
|
+
*/
|
|
24
|
+
const DEFAULT_REFERENCE_ID = "802e3bc2b27e49c2995d23ef70e6ac89";
|
|
25
|
+
/**
|
|
26
|
+
* Fish Audio Text-to-Speech Handler.
|
|
27
|
+
*
|
|
28
|
+
* Auth: `Authorization: Bearer ${FISH_AUDIO_API_KEY}`.
|
|
29
|
+
* Models: speech-1.5 (standard), speech-1.6, s1 (default; latest).
|
|
30
|
+
*/
|
|
31
|
+
export class FishAudioTTS {
|
|
32
|
+
maxTextLength = 5000;
|
|
33
|
+
apiKey;
|
|
34
|
+
baseUrl;
|
|
35
|
+
constructor(apiKey) {
|
|
36
|
+
const resolved = (apiKey ?? process.env.FISH_AUDIO_API_KEY ?? "").trim();
|
|
37
|
+
this.apiKey = resolved.length > 0 ? resolved : null;
|
|
38
|
+
this.baseUrl = (process.env.FISH_AUDIO_BASE_URL ?? DEFAULT_BASE_URL).replace(/\/$/, "");
|
|
39
|
+
}
|
|
40
|
+
isConfigured() {
|
|
41
|
+
return this.apiKey !== null;
|
|
42
|
+
}
|
|
43
|
+
async synthesize(text, options = {}) {
|
|
44
|
+
if (!this.apiKey) {
|
|
45
|
+
throw new TTSError({
|
|
46
|
+
code: TTS_ERROR_CODES.PROVIDER_NOT_CONFIGURED,
|
|
47
|
+
message: "FISH_AUDIO_API_KEY not configured",
|
|
48
|
+
category: ErrorCategory.CONFIGURATION,
|
|
49
|
+
severity: ErrorSeverity.HIGH,
|
|
50
|
+
retriable: false,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
const startTime = Date.now();
|
|
54
|
+
const referenceId = options.voice ?? DEFAULT_REFERENCE_ID;
|
|
55
|
+
const requestedFormat = options.format ?? "mp3";
|
|
56
|
+
const upstreamFormat = this.mapFormat(requestedFormat);
|
|
57
|
+
const body = {
|
|
58
|
+
text,
|
|
59
|
+
reference_id: referenceId,
|
|
60
|
+
format: upstreamFormat,
|
|
61
|
+
mp3_bitrate: 128,
|
|
62
|
+
chunk_length: 200,
|
|
63
|
+
normalize: true,
|
|
64
|
+
latency: "normal",
|
|
65
|
+
};
|
|
66
|
+
const fishOpts = options;
|
|
67
|
+
if (fishOpts.model) {
|
|
68
|
+
body.model = fishOpts.model;
|
|
69
|
+
}
|
|
70
|
+
if (fishOpts.latency) {
|
|
71
|
+
body.latency = fishOpts.latency;
|
|
72
|
+
}
|
|
73
|
+
if (fishOpts.mp3Bitrate !== undefined) {
|
|
74
|
+
body.mp3_bitrate = fishOpts.mp3Bitrate;
|
|
75
|
+
}
|
|
76
|
+
const controller = new AbortController();
|
|
77
|
+
const timeoutId = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS);
|
|
78
|
+
let response;
|
|
79
|
+
try {
|
|
80
|
+
response = await fetch(`${this.baseUrl}/v1/tts`, {
|
|
81
|
+
method: "POST",
|
|
82
|
+
headers: {
|
|
83
|
+
Authorization: `Bearer ${this.apiKey}`,
|
|
84
|
+
"Content-Type": "application/json",
|
|
85
|
+
},
|
|
86
|
+
body: JSON.stringify(body),
|
|
87
|
+
signal: controller.signal,
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
catch (err) {
|
|
91
|
+
if (err instanceof Error && err.name === "AbortError") {
|
|
92
|
+
throw new TTSError({
|
|
93
|
+
code: TTS_ERROR_CODES.SYNTHESIS_FAILED,
|
|
94
|
+
message: `Fish Audio request timed out after ${REQUEST_TIMEOUT_MS / 1000}s`,
|
|
95
|
+
category: ErrorCategory.NETWORK,
|
|
96
|
+
severity: ErrorSeverity.HIGH,
|
|
97
|
+
retriable: true,
|
|
98
|
+
originalError: err,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
throw new TTSError({
|
|
102
|
+
code: TTS_ERROR_CODES.SYNTHESIS_FAILED,
|
|
103
|
+
message: `Fish Audio network error: ${err instanceof Error ? err.message : String(err)}`,
|
|
104
|
+
category: ErrorCategory.NETWORK,
|
|
105
|
+
severity: ErrorSeverity.HIGH,
|
|
106
|
+
retriable: true,
|
|
107
|
+
originalError: err instanceof Error ? err : undefined,
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
finally {
|
|
111
|
+
clearTimeout(timeoutId);
|
|
112
|
+
}
|
|
113
|
+
if (!response.ok) {
|
|
114
|
+
const text = await response.text();
|
|
115
|
+
const retriable = response.status === 408 ||
|
|
116
|
+
response.status === 429 ||
|
|
117
|
+
response.status >= 500;
|
|
118
|
+
throw new TTSError({
|
|
119
|
+
code: TTS_ERROR_CODES.SYNTHESIS_FAILED,
|
|
120
|
+
message: `Fish Audio synthesis failed: ${response.status} — ${text}`,
|
|
121
|
+
category: retriable ? ErrorCategory.NETWORK : ErrorCategory.EXECUTION,
|
|
122
|
+
severity: ErrorSeverity.HIGH,
|
|
123
|
+
retriable,
|
|
124
|
+
context: { status: response.status, referenceId, upstreamFormat },
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
const arrayBuffer = await response.arrayBuffer();
|
|
128
|
+
const audioBuffer = Buffer.from(arrayBuffer);
|
|
129
|
+
const latency = Date.now() - startTime;
|
|
130
|
+
const effectiveFormat = this.effectiveFormat(upstreamFormat);
|
|
131
|
+
const result = {
|
|
132
|
+
buffer: audioBuffer,
|
|
133
|
+
format: effectiveFormat,
|
|
134
|
+
size: audioBuffer.length,
|
|
135
|
+
voice: referenceId,
|
|
136
|
+
sampleRate: this.getSampleRate(effectiveFormat),
|
|
137
|
+
metadata: {
|
|
138
|
+
latency,
|
|
139
|
+
provider: "fish-audio",
|
|
140
|
+
model: fishOpts.model ?? "s1",
|
|
141
|
+
requestedFormat: options.format,
|
|
142
|
+
upstreamFormat,
|
|
143
|
+
},
|
|
144
|
+
};
|
|
145
|
+
logger.info(`[FishAudioTTS] Synthesized ${audioBuffer.length} bytes in ${latency}ms`);
|
|
146
|
+
return result;
|
|
147
|
+
}
|
|
148
|
+
mapFormat(format) {
|
|
149
|
+
const supported = {
|
|
150
|
+
mp3: "mp3",
|
|
151
|
+
wav: "wav",
|
|
152
|
+
pcm16: "pcm",
|
|
153
|
+
};
|
|
154
|
+
const mapped = supported[format];
|
|
155
|
+
if (!mapped) {
|
|
156
|
+
logger.warn(`[FishAudioTTS] Unsupported format "${format}" — falling back to "mp3"`);
|
|
157
|
+
return "mp3";
|
|
158
|
+
}
|
|
159
|
+
return mapped;
|
|
160
|
+
}
|
|
161
|
+
effectiveFormat(upstreamFormat) {
|
|
162
|
+
if (upstreamFormat === "mp3") {
|
|
163
|
+
return "mp3";
|
|
164
|
+
}
|
|
165
|
+
if (upstreamFormat === "wav") {
|
|
166
|
+
return "wav";
|
|
167
|
+
}
|
|
168
|
+
if (upstreamFormat === "pcm") {
|
|
169
|
+
return "pcm16";
|
|
170
|
+
}
|
|
171
|
+
return "mp3";
|
|
172
|
+
}
|
|
173
|
+
getSampleRate(format) {
|
|
174
|
+
if (format === "wav") {
|
|
175
|
+
return 44_100;
|
|
176
|
+
}
|
|
177
|
+
if (format === "pcm16") {
|
|
178
|
+
return 44_100;
|
|
179
|
+
}
|
|
180
|
+
return 44_100;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
@@ -120,15 +120,32 @@ async function executeModel(options, workflowDefaultSystemPrompt) {
|
|
|
120
120
|
// 3. Workflow-level default
|
|
121
121
|
// 4. undefined (provider default)
|
|
122
122
|
const resolvedSystemPrompt = systemPrompt || model.systemPrompt || workflowDefaultSystemPrompt;
|
|
123
|
-
// Execute with timeout
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
123
|
+
// Execute with timeout. Some upstream LLM endpoints (notably Vertex
|
|
124
|
+
// under high parallel load) occasionally respond with an empty
|
|
125
|
+
// assistant message instead of content; retry once before giving up so
|
|
126
|
+
// a transient empty response doesn't cascade into an empty ensemble
|
|
127
|
+
// result that downstream tests + judges have no way to evaluate.
|
|
128
|
+
let result;
|
|
129
|
+
let attempts = 0;
|
|
130
|
+
const MAX_ATTEMPTS = 2;
|
|
131
|
+
/* eslint-disable no-constant-condition */
|
|
132
|
+
while (true) {
|
|
133
|
+
attempts++;
|
|
134
|
+
result = await executeWithTimeout(async () => {
|
|
135
|
+
return await provider.generate({
|
|
136
|
+
prompt,
|
|
137
|
+
systemPrompt: resolvedSystemPrompt,
|
|
138
|
+
temperature: model.temperature,
|
|
139
|
+
maxTokens: model.maxTokens,
|
|
140
|
+
});
|
|
141
|
+
}, timeout, `Model ${model.provider}/${model.model} timed out after ${timeout}ms`);
|
|
142
|
+
const contentLen = result?.content?.length ?? 0;
|
|
143
|
+
if (contentLen > 0 || attempts >= MAX_ATTEMPTS) {
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
logger.warn(`[${functionTag}] Model returned empty content — retrying once`, { provider: model.provider, model: model.model, attempt: attempts });
|
|
147
|
+
}
|
|
148
|
+
/* eslint-enable no-constant-condition */
|
|
132
149
|
const responseTime = Date.now() - startTime;
|
|
133
150
|
logger.debug(`[${functionTag}] Model execution successful`, {
|
|
134
151
|
provider: model.provider,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juspay/neurolink",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.65.1",
|
|
4
4
|
"packageManager": "pnpm@10.15.1",
|
|
5
5
|
"description": "Universal AI Development Platform with working MCP integration, multi-provider support, voice (TTS/STT/realtime), and professional CLI. 58+ external MCP servers discoverable, multimodal file processing, RAG pipelines. Build, test, and deploy AI applications with 21+ providers: OpenAI, Anthropic, Google AI Studio, Google Vertex, AWS Bedrock, Azure OpenAI, Mistral, LiteLLM, SageMaker, Hugging Face, Ollama, OpenAI-compatible, OpenRouter, DeepSeek, NVIDIA NIM, LM Studio, llama.cpp, plus voice (OpenAI TTS, ElevenLabs, Deepgram, Azure Speech).",
|
|
6
6
|
"author": {
|
|
@@ -71,30 +71,56 @@
|
|
|
71
71
|
"test:client": "npx tsx test/continuous-test-suite-client.ts",
|
|
72
72
|
"test:context": "npx tsx test/continuous-test-suite-context.ts",
|
|
73
73
|
"test:evaluation": "npx tsx test/continuous-test-suite-evaluation.ts",
|
|
74
|
-
"test:mcp": "npx tsx test/continuous-test-suite-mcp-
|
|
74
|
+
"test:mcp": "npx tsx test/continuous-test-suite-mcp-infra.ts",
|
|
75
|
+
"test:mcp:http": "npx tsx test/continuous-test-suite-mcp-http.ts",
|
|
76
|
+
"test:mcp:sdk": "npx tsx test/continuous-test-suite-mcp-sdk.ts",
|
|
77
|
+
"test:mcp:cli": "npx tsx test/continuous-test-suite-mcp-cli.ts",
|
|
78
|
+
"test:mcp:full": "pnpm run test:mcp:infra && pnpm run test:mcp:bash && pnpm run test:mcp:limits && pnpm run test:mcp:spans && pnpm run test:mcp:sdk && pnpm run test:mcp:cli && pnpm run test:mcp:http",
|
|
75
79
|
"test:media": "npx tsx test/continuous-test-suite-media-gen.ts",
|
|
76
80
|
"test:memory": "npx tsx test/continuous-test-suite-memory.ts",
|
|
77
|
-
"test:session-memory-bugs": "npx tsx test/continuous-test-suite-session-memory-bugs.ts",
|
|
78
81
|
"test:middleware": "npx tsx test/continuous-test-suite-middleware.ts",
|
|
79
82
|
"test:observability": "npx tsx test/continuous-test-suite-observability.ts",
|
|
80
83
|
"test:ppt": "npx tsx test/continuous-test-suite-ppt.ts",
|
|
81
84
|
"test:providers": "npx tsx test/continuous-test-suite-providers.ts",
|
|
82
85
|
"test:new-providers": "npx tsx test/continuous-test-suite-new-providers.ts",
|
|
86
|
+
"test:matrix": "npx tsx test/continuous-test-suite-provider-matrix.ts",
|
|
87
|
+
"test:matrix:cli": "npx tsx test/continuous-test-suite-provider-matrix-cli.ts",
|
|
88
|
+
"test:mcp:spans": "npx tsx test/continuous-test-suite-mcp-spans.ts",
|
|
89
|
+
"test:mcp:bash": "npx tsx test/continuous-test-suite-mcp-bash.ts",
|
|
90
|
+
"test:mcp:limits": "npx tsx test/continuous-test-suite-mcp-output-limits.ts",
|
|
91
|
+
"test:mcp:infra": "npx tsx test/continuous-test-suite-mcp-infra.ts",
|
|
92
|
+
"test:providers-mocked": "npx tsx test/continuous-test-suite-providers-mocked.ts",
|
|
83
93
|
"test:rag": "npx tsx test/continuous-test-suite-rag.ts",
|
|
84
94
|
"test:servers": "npx tsx test/continuous-test-suite-servers.ts",
|
|
85
95
|
"test:tool-reliability": "npx tsx test/continuous-test-suite-tool-reliability.ts",
|
|
86
96
|
"test:google-native": "npx tsx test/continuous-test-suite-google-native.ts",
|
|
87
|
-
"test:tracing": "npx tsx test/continuous-test-suite-tracing.ts",
|
|
88
97
|
"test:tts": "npx tsx test/continuous-test-suite-tts.ts",
|
|
89
98
|
"test:voice": "npx tsx test/continuous-test-suite-voice.ts",
|
|
90
99
|
"test:voice-server": "npx tsx test/continuous-test-suite-voice-server.ts",
|
|
91
|
-
"test:
|
|
100
|
+
"test:avatar": "npx tsx test/continuous-test-suite-avatar.ts",
|
|
101
|
+
"test:music": "npx tsx test/continuous-test-suite-music.ts",
|
|
102
|
+
"test:image-gen": "npx tsx test/continuous-test-suite-image-gen-extras.ts",
|
|
103
|
+
"test:ssrf": "npx tsx test/continuous-test-suite-ssrf.ts",
|
|
104
|
+
"test:log-sanitize": "npx tsx test/continuous-test-suite-log-sanitize.ts",
|
|
105
|
+
"test:stream-span": "npx tsx test/continuous-test-suite-stream-span.ts",
|
|
106
|
+
"test:credentials": "npx tsx test/continuous-test-suite-credentials.ts",
|
|
92
107
|
"test:dynamic": "npx tsx test/continuous-test-suite-dynamic.ts",
|
|
93
108
|
"test:proxy": "npx tsx test/continuous-test-suite-proxy.ts",
|
|
94
109
|
"test:bugfixes": "npx tsx test/continuous-test-suite-bugfixes.ts",
|
|
95
110
|
"test:workflow": "npx tsx test/continuous-test-suite-workflow.ts",
|
|
96
111
|
"test:hitl": "npx tsx test/continuous-test-suite-hitl.ts",
|
|
112
|
+
"test:tasks": "npx tsx test/continuous-test-suite-tasks.ts",
|
|
113
|
+
"test:auth": "npx tsx test/continuous-test-suite-auth.ts",
|
|
114
|
+
"test:autoresearch": "npx tsx test/continuous-test-suite-autoresearch.ts",
|
|
115
|
+
"test:autoresearch:redis": "npx tsx test/continuous-test-suite-autoresearch-redis.ts",
|
|
116
|
+
"test:envguard": "npx tsx test/helpers/envGuard.test.ts",
|
|
97
117
|
"test:ci": "pnpm run test && pnpm run test:client && pnpm run test:hitl",
|
|
118
|
+
"// CI tier — fast, no live AI calls, safe for every commit": "",
|
|
119
|
+
"test:unit": "pnpm run test:envguard && pnpm run test:bugfixes && pnpm run test:mcp:infra && pnpm run test:mcp:bash && pnpm run test:mcp:limits && pnpm run test:mcp:spans && pnpm run test:autoresearch:redis",
|
|
120
|
+
"// CI tier — live providers, runs only when API keys are present (test:credentials and test:dynamic make real provider calls when keys are set, so they live here, not in test:unit)": "",
|
|
121
|
+
"test:live": "pnpm run test:providers && pnpm run test:mcp:http && pnpm run test:mcp:sdk && pnpm run test:mcp:cli && pnpm run test:observability && pnpm run test:context && pnpm run test:memory && pnpm run test:tool-reliability && pnpm run test:evaluation && pnpm run test:autoresearch && pnpm run test:credentials && pnpm run test:dynamic",
|
|
122
|
+
"// CI tier — product output (image/video/TTS/PPT) — costs $$ per run": "",
|
|
123
|
+
"test:product": "pnpm run test:media && pnpm run test:tts && pnpm run test:ppt && pnpm run test:proxy",
|
|
98
124
|
"test:performance": "tsx tools/testing/performanceMonitor.ts",
|
|
99
125
|
"// Content Generation (Cross-platform JS)": "",
|
|
100
126
|
"content:videos": "tsx tools/converted-scripts/generateAllVideos.ts",
|
|
@@ -211,6 +237,7 @@
|
|
|
211
237
|
"@ai-sdk/azure": "^3.0.38",
|
|
212
238
|
"@ai-sdk/mistral": "^3.0.21",
|
|
213
239
|
"@ai-sdk/openai": "^3.0.37",
|
|
240
|
+
"@ai-sdk/openai-compatible": "^2.0.41",
|
|
214
241
|
"@ai-sdk/provider": "^3.0.8",
|
|
215
242
|
"@anthropic-ai/vertex-sdk": "^0.16.0",
|
|
216
243
|
"@aws-sdk/client-bedrock": "^3.1000.0",
|