@juspay/neurolink 9.55.7 → 9.55.9
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.
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
async function loadBedrockControl() {
|
|
2
|
+
return await import(/* @vite-ignore */ "@aws-sdk/client-bedrock");
|
|
3
|
+
}
|
|
2
4
|
import { BedrockRuntimeClient, ConverseCommand, ConverseStreamCommand, ImageFormat, } from "@aws-sdk/client-bedrock-runtime";
|
|
3
5
|
import path from "path";
|
|
4
6
|
import { createAnalytics } from "../core/analytics.js";
|
|
@@ -62,6 +64,7 @@ export class AmazonBedrockProvider extends BaseProvider {
|
|
|
62
64
|
* This prevents the health check failure we saw in production logs
|
|
63
65
|
*/
|
|
64
66
|
async performInitialHealthCheck() {
|
|
67
|
+
const { BedrockClient, ListFoundationModelsCommand } = await loadBedrockControl();
|
|
65
68
|
const bedrockClient = new BedrockClient({
|
|
66
69
|
region: this.region,
|
|
67
70
|
});
|
|
@@ -1550,6 +1553,7 @@ export class AmazonBedrockProvider extends BaseProvider {
|
|
|
1550
1553
|
const timeoutId = setTimeout(() => controller.abort(), 10000); // 10 second timeout
|
|
1551
1554
|
// Create a separate BedrockClient for health checks (not BedrockRuntimeClient)
|
|
1552
1555
|
// Use simple configuration like working example - no custom proxy handler
|
|
1556
|
+
const { BedrockClient, ListFoundationModelsCommand } = await loadBedrockControl();
|
|
1553
1557
|
const healthCheckClient = new BedrockClient({
|
|
1554
1558
|
region: process.env.AWS_REGION || "us-east-1",
|
|
1555
1559
|
});
|
|
@@ -5,9 +5,20 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { readFile, stat } from "fs/promises";
|
|
7
7
|
import { getGlobalDispatcher, interceptors, request } from "undici";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
// Lazy-loaded processor singletons — avoids loading heavy media deps
|
|
9
|
+
// (mediabunny, fluent-ffmpeg, music-metadata, adm-zip) on every generate() call.
|
|
10
|
+
async function getVideoProcessor() {
|
|
11
|
+
const mod = await import("../processors/media/VideoProcessor.js");
|
|
12
|
+
return mod.videoProcessor;
|
|
13
|
+
}
|
|
14
|
+
async function getAudioProcessor() {
|
|
15
|
+
const mod = await import("../processors/media/AudioProcessor.js");
|
|
16
|
+
return mod.audioProcessor;
|
|
17
|
+
}
|
|
18
|
+
async function getArchiveProcessor() {
|
|
19
|
+
const mod = await import("../processors/archive/ArchiveProcessor.js");
|
|
20
|
+
return mod.archiveProcessor;
|
|
21
|
+
}
|
|
11
22
|
import { tracers, ATTR, withSpan } from "../telemetry/index.js";
|
|
12
23
|
import { CSVProcessor } from "./csvProcessor.js";
|
|
13
24
|
import { ImageProcessor } from "./imageProcessor.js";
|
|
@@ -877,7 +888,7 @@ export class FileDetector {
|
|
|
877
888
|
static async processVideoFile(content, detection) {
|
|
878
889
|
const videoFilename = detection.metadata.filename || "video";
|
|
879
890
|
try {
|
|
880
|
-
const videoResult = await
|
|
891
|
+
const videoResult = await (await getVideoProcessor()).processFile({
|
|
881
892
|
id: videoFilename,
|
|
882
893
|
name: videoFilename,
|
|
883
894
|
mimetype: detection.mimeType || "video/mp4",
|
|
@@ -924,7 +935,7 @@ export class FileDetector {
|
|
|
924
935
|
static async processAudioFile(content, detection) {
|
|
925
936
|
const audioFilename = detection.metadata.filename || "audio";
|
|
926
937
|
try {
|
|
927
|
-
const audioResult = await
|
|
938
|
+
const audioResult = await (await getAudioProcessor()).processFile({
|
|
928
939
|
id: audioFilename,
|
|
929
940
|
name: audioFilename,
|
|
930
941
|
mimetype: detection.mimeType || "audio/mpeg",
|
|
@@ -968,7 +979,7 @@ export class FileDetector {
|
|
|
968
979
|
static async processArchiveFile(content, detection) {
|
|
969
980
|
const archiveFilename = detection.metadata.filename || "archive";
|
|
970
981
|
try {
|
|
971
|
-
const archiveResult = await
|
|
982
|
+
const archiveResult = await (await getArchiveProcessor()).processFile({
|
|
972
983
|
id: archiveFilename,
|
|
973
984
|
name: archiveFilename,
|
|
974
985
|
mimetype: detection.mimeType || "application/zip",
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
async function loadBedrockControl() {
|
|
2
|
+
return await import(/* @vite-ignore */ "@aws-sdk/client-bedrock");
|
|
3
|
+
}
|
|
2
4
|
import { BedrockRuntimeClient, ConverseCommand, ConverseStreamCommand, ImageFormat, } from "@aws-sdk/client-bedrock-runtime";
|
|
3
5
|
import path from "path";
|
|
4
6
|
import { createAnalytics } from "../core/analytics.js";
|
|
@@ -62,6 +64,7 @@ export class AmazonBedrockProvider extends BaseProvider {
|
|
|
62
64
|
* This prevents the health check failure we saw in production logs
|
|
63
65
|
*/
|
|
64
66
|
async performInitialHealthCheck() {
|
|
67
|
+
const { BedrockClient, ListFoundationModelsCommand } = await loadBedrockControl();
|
|
65
68
|
const bedrockClient = new BedrockClient({
|
|
66
69
|
region: this.region,
|
|
67
70
|
});
|
|
@@ -1550,6 +1553,7 @@ export class AmazonBedrockProvider extends BaseProvider {
|
|
|
1550
1553
|
const timeoutId = setTimeout(() => controller.abort(), 10000); // 10 second timeout
|
|
1551
1554
|
// Create a separate BedrockClient for health checks (not BedrockRuntimeClient)
|
|
1552
1555
|
// Use simple configuration like working example - no custom proxy handler
|
|
1556
|
+
const { BedrockClient, ListFoundationModelsCommand } = await loadBedrockControl();
|
|
1553
1557
|
const healthCheckClient = new BedrockClient({
|
|
1554
1558
|
region: process.env.AWS_REGION || "us-east-1",
|
|
1555
1559
|
});
|
|
@@ -5,9 +5,20 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { readFile, stat } from "fs/promises";
|
|
7
7
|
import { getGlobalDispatcher, interceptors, request } from "undici";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
// Lazy-loaded processor singletons — avoids loading heavy media deps
|
|
9
|
+
// (mediabunny, fluent-ffmpeg, music-metadata, adm-zip) on every generate() call.
|
|
10
|
+
async function getVideoProcessor() {
|
|
11
|
+
const mod = await import("../processors/media/VideoProcessor.js");
|
|
12
|
+
return mod.videoProcessor;
|
|
13
|
+
}
|
|
14
|
+
async function getAudioProcessor() {
|
|
15
|
+
const mod = await import("../processors/media/AudioProcessor.js");
|
|
16
|
+
return mod.audioProcessor;
|
|
17
|
+
}
|
|
18
|
+
async function getArchiveProcessor() {
|
|
19
|
+
const mod = await import("../processors/archive/ArchiveProcessor.js");
|
|
20
|
+
return mod.archiveProcessor;
|
|
21
|
+
}
|
|
11
22
|
import { tracers, ATTR, withSpan } from "../telemetry/index.js";
|
|
12
23
|
import { CSVProcessor } from "./csvProcessor.js";
|
|
13
24
|
import { ImageProcessor } from "./imageProcessor.js";
|
|
@@ -877,7 +888,7 @@ export class FileDetector {
|
|
|
877
888
|
static async processVideoFile(content, detection) {
|
|
878
889
|
const videoFilename = detection.metadata.filename || "video";
|
|
879
890
|
try {
|
|
880
|
-
const videoResult = await
|
|
891
|
+
const videoResult = await (await getVideoProcessor()).processFile({
|
|
881
892
|
id: videoFilename,
|
|
882
893
|
name: videoFilename,
|
|
883
894
|
mimetype: detection.mimeType || "video/mp4",
|
|
@@ -924,7 +935,7 @@ export class FileDetector {
|
|
|
924
935
|
static async processAudioFile(content, detection) {
|
|
925
936
|
const audioFilename = detection.metadata.filename || "audio";
|
|
926
937
|
try {
|
|
927
|
-
const audioResult = await
|
|
938
|
+
const audioResult = await (await getAudioProcessor()).processFile({
|
|
928
939
|
id: audioFilename,
|
|
929
940
|
name: audioFilename,
|
|
930
941
|
mimetype: detection.mimeType || "audio/mpeg",
|
|
@@ -968,7 +979,7 @@ export class FileDetector {
|
|
|
968
979
|
static async processArchiveFile(content, detection) {
|
|
969
980
|
const archiveFilename = detection.metadata.filename || "archive";
|
|
970
981
|
try {
|
|
971
|
-
const archiveResult = await
|
|
982
|
+
const archiveResult = await (await getArchiveProcessor()).processFile({
|
|
972
983
|
id: archiveFilename,
|
|
973
984
|
name: archiveFilename,
|
|
974
985
|
mimetype: detection.mimeType || "application/zip",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juspay/neurolink",
|
|
3
|
-
"version": "9.55.
|
|
3
|
+
"version": "9.55.9",
|
|
4
4
|
"packageManager": "pnpm@10.15.1",
|
|
5
5
|
"description": "Universal AI Development Platform with working MCP integration, multi-provider support, and professional CLI. Built-in tools operational, 58+ external MCP servers discoverable. Connect to filesystem, GitHub, database operations, and more. Build, test, and deploy AI applications with 13 providers: OpenAI, Anthropic, Google AI, AWS Bedrock, Azure, Hugging Face, Ollama, and Mistral AI.",
|
|
6
6
|
"author": {
|