@juspay/neurolink 7.41.1 → 7.41.2

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 CHANGED
@@ -1,3 +1,5 @@
1
+ ## [7.41.2](https://github.com/juspay/neurolink/compare/v7.41.1...v7.41.2) (2025-09-20)
2
+
1
3
  ## [7.41.1](https://github.com/juspay/neurolink/compare/v7.41.0...v7.41.1) (2025-09-20)
2
4
 
3
5
  ## [7.41.0](https://github.com/juspay/neurolink/compare/v7.40.1...v7.41.0) (2025-09-20)
@@ -3,6 +3,7 @@ import { BedrockClient, ListFoundationModelsCommand, } from "@aws-sdk/client-bed
3
3
  import { BaseProvider } from "../core/baseProvider.js";
4
4
  import { logger } from "../utils/logger.js";
5
5
  import { convertZodToJsonSchema } from "../utils/schemaConversion.js";
6
+ // Bedrock-specific types now imported from ../types/providerSpecific.js
6
7
  export class AmazonBedrockProvider extends BaseProvider {
7
8
  bedrockClient;
8
9
  conversationHistory = [];
@@ -8,6 +8,7 @@ import { AuthenticationError, NetworkError, ProviderError, RateLimitError, } fro
8
8
  import { DEFAULT_MAX_STEPS } from "../core/constants.js";
9
9
  import { streamAnalyticsCollector } from "../core/streamAnalytics.js";
10
10
  import { buildMessagesArray } from "../utils/messageBuilder.js";
11
+ // Google AI Live API types now imported from ../types/providerSpecific.js
11
12
  // Create Google GenAI client
12
13
  async function createGoogleGenAIClient(apiKey) {
13
14
  const mod = await import("@google/genai");
@@ -15,28 +15,3 @@ export { OllamaProvider as Ollama } from "./ollama.js";
15
15
  export { MistralProvider as MistralAI } from "./mistral.js";
16
16
  export { LiteLLMProvider as LiteLLM } from "./litellm.js";
17
17
  export type { AIProvider } from "../types/index.js";
18
- /**
19
- * Provider registry for dynamic provider instantiation
20
- */
21
- export declare const PROVIDERS: {
22
- readonly vertex: "GoogleVertexAI";
23
- readonly bedrock: "AmazonBedrock";
24
- readonly sagemaker: "AmazonSageMaker";
25
- readonly openai: "OpenAI";
26
- readonly "openai-compatible": "OpenAICompatible";
27
- readonly anthropic: "AnthropicProvider";
28
- readonly azure: "AzureOpenAIProvider";
29
- readonly "google-ai": "GoogleAIStudio";
30
- readonly huggingface: "HuggingFace";
31
- readonly ollama: "Ollama";
32
- readonly mistral: "MistralAI";
33
- readonly litellm: "LiteLLM";
34
- };
35
- /**
36
- * Type for valid provider names
37
- */
38
- export type ProviderName = keyof typeof PROVIDERS;
39
- /**
40
- * List of all available provider names
41
- */
42
- export declare const AVAILABLE_PROVIDERS: ProviderName[];
@@ -14,24 +14,3 @@ export { HuggingFaceProvider as HuggingFace } from "./huggingFace.js";
14
14
  export { OllamaProvider as Ollama } from "./ollama.js";
15
15
  export { MistralProvider as MistralAI } from "./mistral.js";
16
16
  export { LiteLLMProvider as LiteLLM } from "./litellm.js";
17
- /**
18
- * Provider registry for dynamic provider instantiation
19
- */
20
- export const PROVIDERS = {
21
- vertex: "GoogleVertexAI",
22
- bedrock: "AmazonBedrock",
23
- sagemaker: "AmazonSageMaker",
24
- openai: "OpenAI",
25
- "openai-compatible": "OpenAICompatible",
26
- anthropic: "AnthropicProvider",
27
- azure: "AzureOpenAIProvider",
28
- "google-ai": "GoogleAIStudio",
29
- huggingface: "HuggingFace",
30
- ollama: "Ollama",
31
- mistral: "MistralAI",
32
- litellm: "LiteLLM",
33
- };
34
- /**
35
- * List of all available provider names
36
- */
37
- export const AVAILABLE_PROVIDERS = Object.keys(PROVIDERS);
@@ -33,6 +33,7 @@ const getOpenAICompatibleConfig = () => {
33
33
  const getDefaultOpenAICompatibleModel = () => {
34
34
  return process.env.OPENAI_COMPATIBLE_MODEL || undefined;
35
35
  };
36
+ // ModelsResponse type now imported from ../types/providerSpecific.js
36
37
  /**
37
38
  * OpenAI Compatible Provider - BaseProvider Implementation
38
39
  * Provides access to one of the OpenAI-compatible endpoint (OpenRouter, vLLM, LiteLLM, etc.)
@@ -6,9 +6,9 @@ import type { AnalyticsData, TokenUsage } from "./analytics.js";
6
6
  import type { EvaluationData } from "../index.js";
7
7
  import type { ToolCall, ToolResult } from "./tools.js";
8
8
  /**
9
- * Base command arguments interface
9
+ * Base command arguments type
10
10
  */
11
- export interface BaseCommandArgs {
11
+ export type BaseCommandArgs = {
12
12
  /** Enable debug output */
13
13
  debug?: boolean;
14
14
  /** Output format */
@@ -19,11 +19,11 @@ export interface BaseCommandArgs {
19
19
  quiet?: boolean;
20
20
  /** Index signature to allow additional properties */
21
21
  [key: string]: unknown;
22
- }
22
+ };
23
23
  /**
24
24
  * Generate command arguments
25
25
  */
26
- export interface GenerateCommandArgs extends BaseCommandArgs {
26
+ export type GenerateCommandArgs = BaseCommandArgs & {
27
27
  /** Input text or prompt */
28
28
  input?: string;
29
29
  /** AI provider to use */
@@ -48,11 +48,11 @@ export interface GenerateCommandArgs extends BaseCommandArgs {
48
48
  maxSteps?: number;
49
49
  /** Output file */
50
50
  output?: string;
51
- }
51
+ };
52
52
  /**
53
53
  * Stream command arguments
54
54
  */
55
- export interface StreamCommandArgs extends BaseCommandArgs {
55
+ export type StreamCommandArgs = BaseCommandArgs & {
56
56
  /** Input text or prompt */
57
57
  input?: string;
58
58
  /** AI provider to use */
@@ -67,11 +67,11 @@ export interface StreamCommandArgs extends BaseCommandArgs {
67
67
  maxTokens?: number;
68
68
  /** Disable tools */
69
69
  disableTools?: boolean;
70
- }
70
+ };
71
71
  /**
72
72
  * Batch command arguments
73
73
  */
74
- export interface BatchCommandArgs extends BaseCommandArgs {
74
+ export type BatchCommandArgs = BaseCommandArgs & {
75
75
  /** Input file path */
76
76
  file?: string;
77
77
  /** AI provider to use */
@@ -90,11 +90,11 @@ export interface BatchCommandArgs extends BaseCommandArgs {
90
90
  output?: string;
91
91
  /** Disable tools */
92
92
  disableTools?: boolean;
93
- }
93
+ };
94
94
  /**
95
95
  * MCP command arguments - Enhanced with transport and server management
96
96
  */
97
- export interface MCPCommandArgs extends BaseCommandArgs {
97
+ export type MCPCommandArgs = BaseCommandArgs & {
98
98
  /** MCP server name */
99
99
  server?: string;
100
100
  /** MCP server name (alias for server) */
@@ -135,11 +135,11 @@ export interface MCPCommandArgs extends BaseCommandArgs {
135
135
  source?: string;
136
136
  /** Connection timeout */
137
137
  timeout?: number;
138
- }
138
+ };
139
139
  /**
140
140
  * Models command arguments - Enhanced for model management
141
141
  */
142
- export interface ModelsCommandArgs extends Omit<BaseCommandArgs, "format"> {
142
+ export type ModelsCommandArgs = Omit<BaseCommandArgs, "format"> & {
143
143
  /** AI provider to query (single or array) */
144
144
  provider?: string | string[];
145
145
  /** Model category filter */
@@ -208,11 +208,11 @@ export interface ModelsCommandArgs extends Omit<BaseCommandArgs, "format"> {
208
208
  resolve?: boolean;
209
209
  /** Maximum tokens filter */
210
210
  maxTokens?: number;
211
- }
211
+ };
212
212
  /**
213
213
  * Ollama command arguments
214
214
  */
215
- export interface OllamaCommandArgs extends BaseCommandArgs {
215
+ export type OllamaCommandArgs = BaseCommandArgs & {
216
216
  /** Ollama model name */
217
217
  model?: string;
218
218
  /** List available models */
@@ -223,11 +223,11 @@ export interface OllamaCommandArgs extends BaseCommandArgs {
223
223
  remove?: boolean;
224
224
  /** Show model information */
225
225
  show?: boolean;
226
- }
226
+ };
227
227
  /**
228
228
  * SageMaker command arguments
229
229
  */
230
- export interface SageMakerCommandArgs extends BaseCommandArgs {
230
+ export type SageMakerCommandArgs = BaseCommandArgs & {
231
231
  /** SageMaker endpoint name */
232
232
  endpoint?: string;
233
233
  /** Model name for the endpoint */
@@ -258,20 +258,33 @@ export interface SageMakerCommandArgs extends BaseCommandArgs {
258
258
  region?: string;
259
259
  /** Force operation without confirmation */
260
260
  force?: boolean;
261
- }
261
+ };
262
+ /**
263
+ * Secure configuration container that avoids process.env exposure
264
+ */
265
+ export type SecureConfiguration = {
266
+ accessKeyId: string;
267
+ secretAccessKey: string;
268
+ region: string;
269
+ endpointName: string;
270
+ timeout: number;
271
+ maxRetries: number;
272
+ sessionId: string;
273
+ createdAt: number;
274
+ };
262
275
  /**
263
276
  * Provider status command arguments
264
277
  */
265
- export interface ProviderStatusArgs extends BaseCommandArgs {
278
+ export type ProviderStatusArgs = BaseCommandArgs & {
266
279
  /** Specific provider to check */
267
280
  provider?: string;
268
281
  /** Check all providers */
269
282
  all?: boolean;
270
- }
283
+ };
271
284
  /**
272
285
  * CLI command result
273
286
  */
274
- export interface CommandResult {
287
+ export type CommandResult = {
275
288
  /** Command success status */
276
289
  success: boolean;
277
290
  /** Result data */
@@ -286,11 +299,11 @@ export interface CommandResult {
286
299
  timestamp?: number;
287
300
  command?: string;
288
301
  };
289
- }
302
+ };
290
303
  /**
291
304
  * Generate command result
292
305
  */
293
- export interface GenerateResult extends CommandResult {
306
+ export type GenerateResult = CommandResult & {
294
307
  content: string;
295
308
  provider?: string;
296
309
  model?: string;
@@ -312,25 +325,25 @@ export interface GenerateResult extends CommandResult {
312
325
  name: string;
313
326
  description: string;
314
327
  }>;
315
- }
328
+ };
316
329
  /**
317
330
  * Stream result chunk
318
331
  */
319
- export interface StreamChunk {
332
+ export type StreamChunk = {
320
333
  content?: string;
321
334
  delta?: string;
322
335
  done?: boolean;
323
336
  metadata?: UnknownRecord;
324
- }
337
+ };
325
338
  /**
326
339
  * CLI output formatting options
327
340
  */
328
- export interface OutputOptions {
329
- format: "text" | "json" | "table";
341
+ export type OutputOptions = {
342
+ format: "text" | "json" | "table" | "yaml";
330
343
  pretty?: boolean;
331
344
  color?: boolean;
332
345
  compact?: boolean;
333
- }
346
+ };
334
347
  /**
335
348
  * Command handler function type
336
349
  */
@@ -338,7 +351,7 @@ export type CommandHandler<TArgs = BaseCommandArgs, TResult = CommandResult> = (
338
351
  /**
339
352
  * Command definition
340
353
  */
341
- export interface CommandDefinition<TArgs = BaseCommandArgs> {
354
+ export type CommandDefinition<TArgs = BaseCommandArgs> = {
342
355
  name: string;
343
356
  description: string;
344
357
  aliases?: string[];
@@ -351,38 +364,38 @@ export interface CommandDefinition<TArgs = BaseCommandArgs> {
351
364
  };
352
365
  };
353
366
  handler: CommandHandler<TArgs>;
354
- }
367
+ };
355
368
  /**
356
369
  * CLI context
357
370
  */
358
- export interface CLIContext {
371
+ export type CLIContext = {
359
372
  cwd: string;
360
373
  args: string[];
361
374
  env: NodeJS.ProcessEnv;
362
375
  exitCode?: number;
363
- }
376
+ };
364
377
  /**
365
378
  * Color mapping for CLI output
366
379
  */
367
- export interface ColorMap {
380
+ export type ColorMap = {
368
381
  [severity: string]: {
369
382
  color: string;
370
383
  symbol?: string;
371
384
  };
372
- }
385
+ };
373
386
  /**
374
387
  * Display severity colors (for evaluation display)
375
388
  */
376
- export interface SeverityColors {
389
+ export type SeverityColors = {
377
390
  [key: string]: {
378
391
  color: string;
379
392
  symbol: string;
380
393
  };
381
- }
394
+ };
382
395
  /**
383
396
  * JSON output structure
384
397
  */
385
- export interface JSONOutput {
398
+ export type JSONOutput = {
386
399
  success: boolean;
387
400
  data?: JsonValue;
388
401
  error?: string;
@@ -391,13 +404,13 @@ export interface JSONOutput {
391
404
  command: string;
392
405
  version?: string;
393
406
  };
394
- }
407
+ };
395
408
  /**
396
409
  * Console override for quiet mode
397
410
  */
398
- export interface ConsoleOverride {
411
+ export type ConsoleOverride = {
399
412
  [method: string]: (() => void) | undefined;
400
- }
413
+ };
401
414
  /**
402
415
  * Type guard for generate result
403
416
  */
@@ -418,6 +418,143 @@ export type AISDKGenerateResult = GenerateResult & {
418
418
  }>;
419
419
  [key: string]: unknown;
420
420
  };
421
+ /**
422
+ * Bedrock tool usage structure
423
+ */
424
+ export type BedrockToolUse = {
425
+ toolUseId: string;
426
+ name: string;
427
+ input: Record<string, unknown>;
428
+ };
429
+ /**
430
+ * Bedrock tool result structure
431
+ */
432
+ export type BedrockToolResult = {
433
+ toolUseId: string;
434
+ content: Array<{
435
+ text: string;
436
+ }>;
437
+ status: string;
438
+ };
439
+ /**
440
+ * Bedrock content block structure
441
+ */
442
+ export type BedrockContentBlock = {
443
+ text?: string;
444
+ toolUse?: BedrockToolUse;
445
+ toolResult?: BedrockToolResult;
446
+ };
447
+ /**
448
+ * Bedrock message structure
449
+ */
450
+ export type BedrockMessage = {
451
+ role: "user" | "assistant";
452
+ content: BedrockContentBlock[];
453
+ };
454
+ /**
455
+ * Google AI Live media configuration
456
+ */
457
+ export type GenAILiveMedia = {
458
+ data: string;
459
+ mimeType: string;
460
+ };
461
+ /**
462
+ * Live server message inline data
463
+ */
464
+ export type LiveServerMessagePartInlineData = {
465
+ data?: string;
466
+ };
467
+ /**
468
+ * Live server message model turn
469
+ */
470
+ export type LiveServerMessageModelTurn = {
471
+ parts?: Array<{
472
+ inlineData?: LiveServerMessagePartInlineData;
473
+ }>;
474
+ };
475
+ /**
476
+ * Live server content structure
477
+ */
478
+ export type LiveServerContent = {
479
+ modelTurn?: LiveServerMessageModelTurn;
480
+ interrupted?: boolean;
481
+ };
482
+ /**
483
+ * Live server message structure
484
+ */
485
+ export type LiveServerMessage = {
486
+ serverContent?: LiveServerContent;
487
+ };
488
+ /**
489
+ * Live connection callbacks
490
+ */
491
+ export type LiveConnectCallbacks = {
492
+ onopen?: () => void;
493
+ onmessage?: (message: LiveServerMessage) => void;
494
+ onerror?: (e: {
495
+ message?: string;
496
+ }) => void;
497
+ onclose?: (e: {
498
+ code?: number;
499
+ reason?: string;
500
+ }) => void;
501
+ };
502
+ /**
503
+ * Live connection configuration
504
+ */
505
+ export type LiveConnectConfig = {
506
+ model: string;
507
+ callbacks: LiveConnectCallbacks;
508
+ config: {
509
+ responseModalities: string[];
510
+ speechConfig: {
511
+ voiceConfig: {
512
+ prebuiltVoiceConfig: {
513
+ voiceName: string;
514
+ };
515
+ };
516
+ };
517
+ };
518
+ };
519
+ /**
520
+ * Google AI Live session interface
521
+ */
522
+ export type GenAILiveSession = {
523
+ sendRealtimeInput?: (payload: {
524
+ media?: GenAILiveMedia;
525
+ event?: string;
526
+ }) => Promise<void> | void;
527
+ sendInput?: (payload: {
528
+ event?: string;
529
+ media?: GenAILiveMedia;
530
+ }) => Promise<void> | void;
531
+ close?: (code?: number, reason?: string) => Promise<void> | void;
532
+ };
533
+ /**
534
+ * Google AI client interface
535
+ */
536
+ export type GenAIClient = {
537
+ live: {
538
+ connect: (config: LiveConnectConfig) => Promise<GenAILiveSession>;
539
+ };
540
+ };
541
+ /**
542
+ * Google GenAI constructor type
543
+ */
544
+ export type GoogleGenAIClass = new (cfg: {
545
+ apiKey: string;
546
+ }) => GenAIClient;
547
+ /**
548
+ * OpenAI-compatible models endpoint response structure
549
+ */
550
+ export type ModelsResponse = {
551
+ data: Array<{
552
+ id: string;
553
+ object: string;
554
+ created?: number;
555
+ owned_by?: string;
556
+ }>;
557
+ };
421
558
  /**
422
559
  * Default model aliases for easy reference
423
560
  */
@@ -3,6 +3,7 @@ import { BedrockClient, ListFoundationModelsCommand, } from "@aws-sdk/client-bed
3
3
  import { BaseProvider } from "../core/baseProvider.js";
4
4
  import { logger } from "../utils/logger.js";
5
5
  import { convertZodToJsonSchema } from "../utils/schemaConversion.js";
6
+ // Bedrock-specific types now imported from ../types/providerSpecific.js
6
7
  export class AmazonBedrockProvider extends BaseProvider {
7
8
  bedrockClient;
8
9
  conversationHistory = [];
@@ -8,6 +8,7 @@ import { AuthenticationError, NetworkError, ProviderError, RateLimitError, } fro
8
8
  import { DEFAULT_MAX_STEPS } from "../core/constants.js";
9
9
  import { streamAnalyticsCollector } from "../core/streamAnalytics.js";
10
10
  import { buildMessagesArray } from "../utils/messageBuilder.js";
11
+ // Google AI Live API types now imported from ../types/providerSpecific.js
11
12
  // Create Google GenAI client
12
13
  async function createGoogleGenAIClient(apiKey) {
13
14
  const mod = await import("@google/genai");
@@ -15,28 +15,3 @@ export { OllamaProvider as Ollama } from "./ollama.js";
15
15
  export { MistralProvider as MistralAI } from "./mistral.js";
16
16
  export { LiteLLMProvider as LiteLLM } from "./litellm.js";
17
17
  export type { AIProvider } from "../types/index.js";
18
- /**
19
- * Provider registry for dynamic provider instantiation
20
- */
21
- export declare const PROVIDERS: {
22
- readonly vertex: "GoogleVertexAI";
23
- readonly bedrock: "AmazonBedrock";
24
- readonly sagemaker: "AmazonSageMaker";
25
- readonly openai: "OpenAI";
26
- readonly "openai-compatible": "OpenAICompatible";
27
- readonly anthropic: "AnthropicProvider";
28
- readonly azure: "AzureOpenAIProvider";
29
- readonly "google-ai": "GoogleAIStudio";
30
- readonly huggingface: "HuggingFace";
31
- readonly ollama: "Ollama";
32
- readonly mistral: "MistralAI";
33
- readonly litellm: "LiteLLM";
34
- };
35
- /**
36
- * Type for valid provider names
37
- */
38
- export type ProviderName = keyof typeof PROVIDERS;
39
- /**
40
- * List of all available provider names
41
- */
42
- export declare const AVAILABLE_PROVIDERS: ProviderName[];
@@ -14,24 +14,3 @@ export { HuggingFaceProvider as HuggingFace } from "./huggingFace.js";
14
14
  export { OllamaProvider as Ollama } from "./ollama.js";
15
15
  export { MistralProvider as MistralAI } from "./mistral.js";
16
16
  export { LiteLLMProvider as LiteLLM } from "./litellm.js";
17
- /**
18
- * Provider registry for dynamic provider instantiation
19
- */
20
- export const PROVIDERS = {
21
- vertex: "GoogleVertexAI",
22
- bedrock: "AmazonBedrock",
23
- sagemaker: "AmazonSageMaker",
24
- openai: "OpenAI",
25
- "openai-compatible": "OpenAICompatible",
26
- anthropic: "AnthropicProvider",
27
- azure: "AzureOpenAIProvider",
28
- "google-ai": "GoogleAIStudio",
29
- huggingface: "HuggingFace",
30
- ollama: "Ollama",
31
- mistral: "MistralAI",
32
- litellm: "LiteLLM",
33
- };
34
- /**
35
- * List of all available provider names
36
- */
37
- export const AVAILABLE_PROVIDERS = Object.keys(PROVIDERS);
@@ -33,6 +33,7 @@ const getOpenAICompatibleConfig = () => {
33
33
  const getDefaultOpenAICompatibleModel = () => {
34
34
  return process.env.OPENAI_COMPATIBLE_MODEL || undefined;
35
35
  };
36
+ // ModelsResponse type now imported from ../types/providerSpecific.js
36
37
  /**
37
38
  * OpenAI Compatible Provider - BaseProvider Implementation
38
39
  * Provides access to one of the OpenAI-compatible endpoint (OpenRouter, vLLM, LiteLLM, etc.)
@@ -6,9 +6,9 @@ import type { AnalyticsData, TokenUsage } from "./analytics.js";
6
6
  import type { EvaluationData } from "../index.js";
7
7
  import type { ToolCall, ToolResult } from "./tools.js";
8
8
  /**
9
- * Base command arguments interface
9
+ * Base command arguments type
10
10
  */
11
- export interface BaseCommandArgs {
11
+ export type BaseCommandArgs = {
12
12
  /** Enable debug output */
13
13
  debug?: boolean;
14
14
  /** Output format */
@@ -19,11 +19,11 @@ export interface BaseCommandArgs {
19
19
  quiet?: boolean;
20
20
  /** Index signature to allow additional properties */
21
21
  [key: string]: unknown;
22
- }
22
+ };
23
23
  /**
24
24
  * Generate command arguments
25
25
  */
26
- export interface GenerateCommandArgs extends BaseCommandArgs {
26
+ export type GenerateCommandArgs = BaseCommandArgs & {
27
27
  /** Input text or prompt */
28
28
  input?: string;
29
29
  /** AI provider to use */
@@ -48,11 +48,11 @@ export interface GenerateCommandArgs extends BaseCommandArgs {
48
48
  maxSteps?: number;
49
49
  /** Output file */
50
50
  output?: string;
51
- }
51
+ };
52
52
  /**
53
53
  * Stream command arguments
54
54
  */
55
- export interface StreamCommandArgs extends BaseCommandArgs {
55
+ export type StreamCommandArgs = BaseCommandArgs & {
56
56
  /** Input text or prompt */
57
57
  input?: string;
58
58
  /** AI provider to use */
@@ -67,11 +67,11 @@ export interface StreamCommandArgs extends BaseCommandArgs {
67
67
  maxTokens?: number;
68
68
  /** Disable tools */
69
69
  disableTools?: boolean;
70
- }
70
+ };
71
71
  /**
72
72
  * Batch command arguments
73
73
  */
74
- export interface BatchCommandArgs extends BaseCommandArgs {
74
+ export type BatchCommandArgs = BaseCommandArgs & {
75
75
  /** Input file path */
76
76
  file?: string;
77
77
  /** AI provider to use */
@@ -90,11 +90,11 @@ export interface BatchCommandArgs extends BaseCommandArgs {
90
90
  output?: string;
91
91
  /** Disable tools */
92
92
  disableTools?: boolean;
93
- }
93
+ };
94
94
  /**
95
95
  * MCP command arguments - Enhanced with transport and server management
96
96
  */
97
- export interface MCPCommandArgs extends BaseCommandArgs {
97
+ export type MCPCommandArgs = BaseCommandArgs & {
98
98
  /** MCP server name */
99
99
  server?: string;
100
100
  /** MCP server name (alias for server) */
@@ -135,11 +135,11 @@ export interface MCPCommandArgs extends BaseCommandArgs {
135
135
  source?: string;
136
136
  /** Connection timeout */
137
137
  timeout?: number;
138
- }
138
+ };
139
139
  /**
140
140
  * Models command arguments - Enhanced for model management
141
141
  */
142
- export interface ModelsCommandArgs extends Omit<BaseCommandArgs, "format"> {
142
+ export type ModelsCommandArgs = Omit<BaseCommandArgs, "format"> & {
143
143
  /** AI provider to query (single or array) */
144
144
  provider?: string | string[];
145
145
  /** Model category filter */
@@ -208,11 +208,11 @@ export interface ModelsCommandArgs extends Omit<BaseCommandArgs, "format"> {
208
208
  resolve?: boolean;
209
209
  /** Maximum tokens filter */
210
210
  maxTokens?: number;
211
- }
211
+ };
212
212
  /**
213
213
  * Ollama command arguments
214
214
  */
215
- export interface OllamaCommandArgs extends BaseCommandArgs {
215
+ export type OllamaCommandArgs = BaseCommandArgs & {
216
216
  /** Ollama model name */
217
217
  model?: string;
218
218
  /** List available models */
@@ -223,11 +223,11 @@ export interface OllamaCommandArgs extends BaseCommandArgs {
223
223
  remove?: boolean;
224
224
  /** Show model information */
225
225
  show?: boolean;
226
- }
226
+ };
227
227
  /**
228
228
  * SageMaker command arguments
229
229
  */
230
- export interface SageMakerCommandArgs extends BaseCommandArgs {
230
+ export type SageMakerCommandArgs = BaseCommandArgs & {
231
231
  /** SageMaker endpoint name */
232
232
  endpoint?: string;
233
233
  /** Model name for the endpoint */
@@ -258,20 +258,33 @@ export interface SageMakerCommandArgs extends BaseCommandArgs {
258
258
  region?: string;
259
259
  /** Force operation without confirmation */
260
260
  force?: boolean;
261
- }
261
+ };
262
+ /**
263
+ * Secure configuration container that avoids process.env exposure
264
+ */
265
+ export type SecureConfiguration = {
266
+ accessKeyId: string;
267
+ secretAccessKey: string;
268
+ region: string;
269
+ endpointName: string;
270
+ timeout: number;
271
+ maxRetries: number;
272
+ sessionId: string;
273
+ createdAt: number;
274
+ };
262
275
  /**
263
276
  * Provider status command arguments
264
277
  */
265
- export interface ProviderStatusArgs extends BaseCommandArgs {
278
+ export type ProviderStatusArgs = BaseCommandArgs & {
266
279
  /** Specific provider to check */
267
280
  provider?: string;
268
281
  /** Check all providers */
269
282
  all?: boolean;
270
- }
283
+ };
271
284
  /**
272
285
  * CLI command result
273
286
  */
274
- export interface CommandResult {
287
+ export type CommandResult = {
275
288
  /** Command success status */
276
289
  success: boolean;
277
290
  /** Result data */
@@ -286,11 +299,11 @@ export interface CommandResult {
286
299
  timestamp?: number;
287
300
  command?: string;
288
301
  };
289
- }
302
+ };
290
303
  /**
291
304
  * Generate command result
292
305
  */
293
- export interface GenerateResult extends CommandResult {
306
+ export type GenerateResult = CommandResult & {
294
307
  content: string;
295
308
  provider?: string;
296
309
  model?: string;
@@ -312,25 +325,25 @@ export interface GenerateResult extends CommandResult {
312
325
  name: string;
313
326
  description: string;
314
327
  }>;
315
- }
328
+ };
316
329
  /**
317
330
  * Stream result chunk
318
331
  */
319
- export interface StreamChunk {
332
+ export type StreamChunk = {
320
333
  content?: string;
321
334
  delta?: string;
322
335
  done?: boolean;
323
336
  metadata?: UnknownRecord;
324
- }
337
+ };
325
338
  /**
326
339
  * CLI output formatting options
327
340
  */
328
- export interface OutputOptions {
329
- format: "text" | "json" | "table";
341
+ export type OutputOptions = {
342
+ format: "text" | "json" | "table" | "yaml";
330
343
  pretty?: boolean;
331
344
  color?: boolean;
332
345
  compact?: boolean;
333
- }
346
+ };
334
347
  /**
335
348
  * Command handler function type
336
349
  */
@@ -338,7 +351,7 @@ export type CommandHandler<TArgs = BaseCommandArgs, TResult = CommandResult> = (
338
351
  /**
339
352
  * Command definition
340
353
  */
341
- export interface CommandDefinition<TArgs = BaseCommandArgs> {
354
+ export type CommandDefinition<TArgs = BaseCommandArgs> = {
342
355
  name: string;
343
356
  description: string;
344
357
  aliases?: string[];
@@ -351,38 +364,38 @@ export interface CommandDefinition<TArgs = BaseCommandArgs> {
351
364
  };
352
365
  };
353
366
  handler: CommandHandler<TArgs>;
354
- }
367
+ };
355
368
  /**
356
369
  * CLI context
357
370
  */
358
- export interface CLIContext {
371
+ export type CLIContext = {
359
372
  cwd: string;
360
373
  args: string[];
361
374
  env: NodeJS.ProcessEnv;
362
375
  exitCode?: number;
363
- }
376
+ };
364
377
  /**
365
378
  * Color mapping for CLI output
366
379
  */
367
- export interface ColorMap {
380
+ export type ColorMap = {
368
381
  [severity: string]: {
369
382
  color: string;
370
383
  symbol?: string;
371
384
  };
372
- }
385
+ };
373
386
  /**
374
387
  * Display severity colors (for evaluation display)
375
388
  */
376
- export interface SeverityColors {
389
+ export type SeverityColors = {
377
390
  [key: string]: {
378
391
  color: string;
379
392
  symbol: string;
380
393
  };
381
- }
394
+ };
382
395
  /**
383
396
  * JSON output structure
384
397
  */
385
- export interface JSONOutput {
398
+ export type JSONOutput = {
386
399
  success: boolean;
387
400
  data?: JsonValue;
388
401
  error?: string;
@@ -391,13 +404,13 @@ export interface JSONOutput {
391
404
  command: string;
392
405
  version?: string;
393
406
  };
394
- }
407
+ };
395
408
  /**
396
409
  * Console override for quiet mode
397
410
  */
398
- export interface ConsoleOverride {
411
+ export type ConsoleOverride = {
399
412
  [method: string]: (() => void) | undefined;
400
- }
413
+ };
401
414
  /**
402
415
  * Type guard for generate result
403
416
  */
@@ -86,25 +86,25 @@ export declare const ModelConfigSchema: z.ZodObject<{
86
86
  contextWindow: z.ZodNumber;
87
87
  releaseDate: z.ZodString;
88
88
  }, "strip", z.ZodTypeAny, {
89
+ id: string;
90
+ displayName: string;
91
+ capabilities: string[];
89
92
  deprecated: boolean;
90
93
  pricing: {
91
94
  input: number;
92
95
  output: number;
93
96
  };
94
- id: string;
95
- displayName: string;
96
- capabilities: string[];
97
97
  contextWindow: number;
98
98
  releaseDate: string;
99
99
  }, {
100
+ id: string;
101
+ displayName: string;
102
+ capabilities: string[];
100
103
  deprecated: boolean;
101
104
  pricing: {
102
105
  input: number;
103
106
  output: number;
104
107
  };
105
- id: string;
106
- displayName: string;
107
- capabilities: string[];
108
108
  contextWindow: number;
109
109
  releaseDate: string;
110
110
  }>;
@@ -132,25 +132,25 @@ export declare const ModelRegistrySchema: z.ZodObject<{
132
132
  contextWindow: z.ZodNumber;
133
133
  releaseDate: z.ZodString;
134
134
  }, "strip", z.ZodTypeAny, {
135
+ id: string;
136
+ displayName: string;
137
+ capabilities: string[];
135
138
  deprecated: boolean;
136
139
  pricing: {
137
140
  input: number;
138
141
  output: number;
139
142
  };
140
- id: string;
141
- displayName: string;
142
- capabilities: string[];
143
143
  contextWindow: number;
144
144
  releaseDate: string;
145
145
  }, {
146
+ id: string;
147
+ displayName: string;
148
+ capabilities: string[];
146
149
  deprecated: boolean;
147
150
  pricing: {
148
151
  input: number;
149
152
  output: number;
150
153
  };
151
- id: string;
152
- displayName: string;
153
- capabilities: string[];
154
154
  contextWindow: number;
155
155
  releaseDate: string;
156
156
  }>>>;
@@ -158,36 +158,36 @@ export declare const ModelRegistrySchema: z.ZodObject<{
158
158
  defaults: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
159
159
  }, "strip", z.ZodTypeAny, {
160
160
  version: string;
161
+ lastUpdated: string;
161
162
  models: Record<string, Record<string, {
163
+ id: string;
164
+ displayName: string;
165
+ capabilities: string[];
162
166
  deprecated: boolean;
163
167
  pricing: {
164
168
  input: number;
165
169
  output: number;
166
170
  };
167
- id: string;
168
- displayName: string;
169
- capabilities: string[];
170
171
  contextWindow: number;
171
172
  releaseDate: string;
172
173
  }>>;
173
- lastUpdated: string;
174
174
  aliases?: Record<string, string> | undefined;
175
175
  defaults?: Record<string, string> | undefined;
176
176
  }, {
177
177
  version: string;
178
+ lastUpdated: string;
178
179
  models: Record<string, Record<string, {
180
+ id: string;
181
+ displayName: string;
182
+ capabilities: string[];
179
183
  deprecated: boolean;
180
184
  pricing: {
181
185
  input: number;
182
186
  output: number;
183
187
  };
184
- id: string;
185
- displayName: string;
186
- capabilities: string[];
187
188
  contextWindow: number;
188
189
  releaseDate: string;
189
190
  }>>;
190
- lastUpdated: string;
191
191
  aliases?: Record<string, string> | undefined;
192
192
  defaults?: Record<string, string> | undefined;
193
193
  }>;
@@ -418,6 +418,143 @@ export type AISDKGenerateResult = GenerateResult & {
418
418
  }>;
419
419
  [key: string]: unknown;
420
420
  };
421
+ /**
422
+ * Bedrock tool usage structure
423
+ */
424
+ export type BedrockToolUse = {
425
+ toolUseId: string;
426
+ name: string;
427
+ input: Record<string, unknown>;
428
+ };
429
+ /**
430
+ * Bedrock tool result structure
431
+ */
432
+ export type BedrockToolResult = {
433
+ toolUseId: string;
434
+ content: Array<{
435
+ text: string;
436
+ }>;
437
+ status: string;
438
+ };
439
+ /**
440
+ * Bedrock content block structure
441
+ */
442
+ export type BedrockContentBlock = {
443
+ text?: string;
444
+ toolUse?: BedrockToolUse;
445
+ toolResult?: BedrockToolResult;
446
+ };
447
+ /**
448
+ * Bedrock message structure
449
+ */
450
+ export type BedrockMessage = {
451
+ role: "user" | "assistant";
452
+ content: BedrockContentBlock[];
453
+ };
454
+ /**
455
+ * Google AI Live media configuration
456
+ */
457
+ export type GenAILiveMedia = {
458
+ data: string;
459
+ mimeType: string;
460
+ };
461
+ /**
462
+ * Live server message inline data
463
+ */
464
+ export type LiveServerMessagePartInlineData = {
465
+ data?: string;
466
+ };
467
+ /**
468
+ * Live server message model turn
469
+ */
470
+ export type LiveServerMessageModelTurn = {
471
+ parts?: Array<{
472
+ inlineData?: LiveServerMessagePartInlineData;
473
+ }>;
474
+ };
475
+ /**
476
+ * Live server content structure
477
+ */
478
+ export type LiveServerContent = {
479
+ modelTurn?: LiveServerMessageModelTurn;
480
+ interrupted?: boolean;
481
+ };
482
+ /**
483
+ * Live server message structure
484
+ */
485
+ export type LiveServerMessage = {
486
+ serverContent?: LiveServerContent;
487
+ };
488
+ /**
489
+ * Live connection callbacks
490
+ */
491
+ export type LiveConnectCallbacks = {
492
+ onopen?: () => void;
493
+ onmessage?: (message: LiveServerMessage) => void;
494
+ onerror?: (e: {
495
+ message?: string;
496
+ }) => void;
497
+ onclose?: (e: {
498
+ code?: number;
499
+ reason?: string;
500
+ }) => void;
501
+ };
502
+ /**
503
+ * Live connection configuration
504
+ */
505
+ export type LiveConnectConfig = {
506
+ model: string;
507
+ callbacks: LiveConnectCallbacks;
508
+ config: {
509
+ responseModalities: string[];
510
+ speechConfig: {
511
+ voiceConfig: {
512
+ prebuiltVoiceConfig: {
513
+ voiceName: string;
514
+ };
515
+ };
516
+ };
517
+ };
518
+ };
519
+ /**
520
+ * Google AI Live session interface
521
+ */
522
+ export type GenAILiveSession = {
523
+ sendRealtimeInput?: (payload: {
524
+ media?: GenAILiveMedia;
525
+ event?: string;
526
+ }) => Promise<void> | void;
527
+ sendInput?: (payload: {
528
+ event?: string;
529
+ media?: GenAILiveMedia;
530
+ }) => Promise<void> | void;
531
+ close?: (code?: number, reason?: string) => Promise<void> | void;
532
+ };
533
+ /**
534
+ * Google AI client interface
535
+ */
536
+ export type GenAIClient = {
537
+ live: {
538
+ connect: (config: LiveConnectConfig) => Promise<GenAILiveSession>;
539
+ };
540
+ };
541
+ /**
542
+ * Google GenAI constructor type
543
+ */
544
+ export type GoogleGenAIClass = new (cfg: {
545
+ apiKey: string;
546
+ }) => GenAIClient;
547
+ /**
548
+ * OpenAI-compatible models endpoint response structure
549
+ */
550
+ export type ModelsResponse = {
551
+ data: Array<{
552
+ id: string;
553
+ object: string;
554
+ created?: number;
555
+ owned_by?: string;
556
+ }>;
557
+ };
421
558
  /**
422
559
  * Default model aliases for easy reference
423
560
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/neurolink",
3
- "version": "7.41.1",
3
+ "version": "7.41.2",
4
4
  "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 9 major providers: OpenAI, Anthropic, Google AI, AWS Bedrock, Azure, Hugging Face, Ollama, and Mistral AI.",
5
5
  "author": {
6
6
  "name": "Juspay Technologies",