@juspay/neurolink 9.55.1 → 9.55.3

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,7 +1,19 @@
1
1
  import chalk from "chalk";
2
2
  import ora from "ora";
3
3
  import inquirer from "inquirer";
4
- import { SageMakerClient, ListEndpointsCommand, } from "@aws-sdk/client-sagemaker";
4
+ async function loadSageMakerControl() {
5
+ try {
6
+ return await import(/* @vite-ignore */ "@aws-sdk/client-sagemaker");
7
+ }
8
+ catch (err) {
9
+ const e = err instanceof Error ? err : null;
10
+ if (e?.code === "ERR_MODULE_NOT_FOUND" &&
11
+ e.message.includes("client-sagemaker")) {
12
+ throw new Error('SageMaker setup requires "@aws-sdk/client-sagemaker". Install it with:\n pnpm add @aws-sdk/client-sagemaker', { cause: err });
13
+ }
14
+ throw err;
15
+ }
16
+ }
5
17
  import { logger } from "../../lib/utils/logger.js";
6
18
  import { checkSageMakerConfiguration, getSageMakerConfig, getConfigurationSummary, clearConfigurationCache, } from "../../lib/providers/sagemaker/config.js";
7
19
  import { AmazonSageMakerProvider } from "../../lib/providers/sagemaker/index.js";
@@ -148,8 +160,9 @@ export class SageMakerCommandFactory {
148
160
  /**
149
161
  * Validate secure configuration without exposing credentials
150
162
  */
151
- static validateSecureConfiguration(secureConfig) {
163
+ static async validateSecureConfiguration(secureConfig) {
152
164
  // Create temporary AWS SDK client with secure credentials
165
+ const { SageMakerClient } = await loadSageMakerControl();
153
166
  const tempClient = new SageMakerClient({
154
167
  region: secureConfig.region,
155
168
  credentials: {
@@ -293,6 +306,7 @@ export class SageMakerCommandFactory {
293
306
  // Use AWS SDK directly for better security and error handling
294
307
  try {
295
308
  const config = await getSageMakerConfig();
309
+ const { SageMakerClient, ListEndpointsCommand } = await loadSageMakerControl();
296
310
  const sagemakerClient = new SageMakerClient({
297
311
  region: config.region,
298
312
  credentials: {
@@ -511,7 +525,7 @@ export class SageMakerCommandFactory {
511
525
  // Clear cache and test configuration with secure config
512
526
  clearConfigurationCache();
513
527
  try {
514
- this.validateSecureConfiguration(secureConfig); // Validate configuration is loadable
528
+ await this.validateSecureConfiguration(secureConfig); // Validate configuration is loadable
515
529
  spinner.succeed("āœ… Configuration validated successfully");
516
530
  logger.always(chalk.green("\nšŸŽ‰ SageMaker setup complete!"));
517
531
  logger.always(chalk.yellow("\nšŸ’” Next steps:"));
@@ -6,10 +6,21 @@
6
6
  * - One-shot tasks → BullMQ delayed jobs
7
7
  * - Survives process restarts (Redis-persisted)
8
8
  */
9
- import { Queue, Worker } from "bullmq";
10
9
  import { logger } from "../../utils/logger.js";
11
10
  import { TaskError } from "../errors.js";
12
11
  import { TASK_DEFAULTS, } from "../../types/index.js";
12
+ async function loadBullMQ() {
13
+ try {
14
+ return await import(/* @vite-ignore */ "bullmq");
15
+ }
16
+ catch (err) {
17
+ const e = err instanceof Error ? err : null;
18
+ if (e?.code === "ERR_MODULE_NOT_FOUND" && e.message.includes("bullmq")) {
19
+ throw new Error('BullMQ task backend requires the "bullmq" package. Install it with:\n pnpm add bullmq', { cause: err });
20
+ }
21
+ throw err;
22
+ }
23
+ }
13
24
  const QUEUE_NAME = "neurolink-tasks";
14
25
  export class BullMQBackend {
15
26
  name = "bullmq";
@@ -21,9 +32,10 @@ export class BullMQBackend {
21
32
  this.config = config;
22
33
  }
23
34
  async initialize() {
35
+ const { Queue: BullQueue, Worker: BullWorker } = await loadBullMQ();
24
36
  const connection = this.getConnectionConfig();
25
- this.queue = new Queue(QUEUE_NAME, { connection });
26
- this.worker = new Worker(QUEUE_NAME, async (job) => {
37
+ this.queue = new BullQueue(QUEUE_NAME, { connection });
38
+ this.worker = new BullWorker(QUEUE_NAME, async (job) => {
27
39
  const taskId = job.data.taskId;
28
40
  const task = job.data.task;
29
41
  const executor = this.executors.get(taskId);
@@ -6,10 +6,21 @@
6
6
  * - One-shot tasks → BullMQ delayed jobs
7
7
  * - Survives process restarts (Redis-persisted)
8
8
  */
9
- import { Queue, Worker } from "bullmq";
10
9
  import { logger } from "../../utils/logger.js";
11
10
  import { TaskError } from "../errors.js";
12
11
  import { TASK_DEFAULTS, } from "../../types/index.js";
12
+ async function loadBullMQ() {
13
+ try {
14
+ return await import(/* @vite-ignore */ "bullmq");
15
+ }
16
+ catch (err) {
17
+ const e = err instanceof Error ? err : null;
18
+ if (e?.code === "ERR_MODULE_NOT_FOUND" && e.message.includes("bullmq")) {
19
+ throw new Error('BullMQ task backend requires the "bullmq" package. Install it with:\n pnpm add bullmq', { cause: err });
20
+ }
21
+ throw err;
22
+ }
23
+ }
13
24
  const QUEUE_NAME = "neurolink-tasks";
14
25
  export class BullMQBackend {
15
26
  name = "bullmq";
@@ -21,9 +32,10 @@ export class BullMQBackend {
21
32
  this.config = config;
22
33
  }
23
34
  async initialize() {
35
+ const { Queue: BullQueue, Worker: BullWorker } = await loadBullMQ();
24
36
  const connection = this.getConnectionConfig();
25
- this.queue = new Queue(QUEUE_NAME, { connection });
26
- this.worker = new Worker(QUEUE_NAME, async (job) => {
37
+ this.queue = new BullQueue(QUEUE_NAME, { connection });
38
+ this.worker = new BullWorker(QUEUE_NAME, async (job) => {
27
39
  const taskId = job.data.taskId;
28
40
  const task = job.data.task;
29
41
  const executor = this.executors.get(taskId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/neurolink",
3
- "version": "9.55.1",
3
+ "version": "9.55.3",
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": {
@@ -205,7 +205,6 @@
205
205
  "@ai-sdk/provider": "^3.0.8",
206
206
  "@aws-sdk/client-bedrock": "^3.1000.0",
207
207
  "@aws-sdk/client-bedrock-runtime": "^3.1000.0",
208
- "@aws-sdk/client-sagemaker": "^3.1000.0",
209
208
  "@aws-sdk/client-sagemaker-runtime": "^3.1000.0",
210
209
  "@google-cloud/text-to-speech": "^6.4.0",
211
210
  "@google-cloud/vertexai": "^1.10.0",
@@ -228,7 +227,6 @@
228
227
  "@picovoice/cobra-node": "^3.0.2",
229
228
  "adm-zip": "^0.5.16",
230
229
  "ai": "^6.0.134",
231
- "bullmq": "^5.52.2",
232
230
  "chalk": "^5.6.2",
233
231
  "croner": "^9.1.0",
234
232
  "csv-parser": "^3.2.0",
@@ -248,8 +246,6 @@
248
246
  "open": "^11.0.0",
249
247
  "ora": "^9.3.0",
250
248
  "p-limit": "^7.3.0",
251
- "pdf-parse": "^2.4.5",
252
- "pdf-to-img": "^5.0.0",
253
249
  "pptxgenjs": "^4.0.1",
254
250
  "redis": "^5.11.0",
255
251
  "tar-stream": "^3.1.8",
@@ -274,7 +270,11 @@
274
270
  }
275
271
  },
276
272
  "optionalDependencies": {
273
+ "@aws-sdk/client-sagemaker": "^3.1000.0",
277
274
  "@langfuse/otel": "^5.0.1",
275
+ "bullmq": "^5.52.2",
276
+ "pdf-parse": "^2.4.5",
277
+ "pdf-to-img": "^5.0.0",
278
278
  "@fastify/cors": "^11.2.0",
279
279
  "@fastify/rate-limit": "^10.3.0",
280
280
  "@hono/node-server": "^1.19.9",