@juspay/neurolink 7.41.1 → 7.41.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.
Files changed (33) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/config/configManager.d.ts +1 -1
  3. package/dist/config/configManager.js +7 -8
  4. package/dist/index.d.ts +1 -1
  5. package/dist/lib/config/configManager.d.ts +1 -1
  6. package/dist/lib/config/configManager.js +7 -8
  7. package/dist/lib/index.d.ts +1 -1
  8. package/dist/lib/providers/amazonBedrock.js +1 -0
  9. package/dist/lib/providers/googleAiStudio.js +1 -0
  10. package/dist/lib/providers/index.d.ts +0 -25
  11. package/dist/lib/providers/index.js +0 -21
  12. package/dist/lib/providers/openaiCompatible.js +1 -0
  13. package/dist/lib/types/cli.d.ts +53 -40
  14. package/dist/{config/types.d.ts → lib/types/configTypes.d.ts} +26 -26
  15. package/dist/{config/types.js → lib/types/configTypes.js} +1 -1
  16. package/dist/lib/types/index.d.ts +2 -1
  17. package/dist/lib/types/providers.d.ts +139 -2
  18. package/dist/lib/types/streamTypes.d.ts +2 -2
  19. package/dist/lib/utils/toolUtils.d.ts +1 -1
  20. package/dist/providers/amazonBedrock.js +1 -0
  21. package/dist/providers/googleAiStudio.js +1 -0
  22. package/dist/providers/index.d.ts +0 -25
  23. package/dist/providers/index.js +0 -21
  24. package/dist/providers/openaiCompatible.js +1 -0
  25. package/dist/types/cli.d.ts +53 -40
  26. package/dist/{lib/config/types.d.ts → types/configTypes.d.ts} +26 -26
  27. package/dist/{lib/config/types.js → types/configTypes.js} +1 -1
  28. package/dist/types/index.d.ts +2 -1
  29. package/dist/types/modelTypes.d.ts +20 -20
  30. package/dist/types/providers.d.ts +139 -2
  31. package/dist/types/streamTypes.d.ts +2 -2
  32. package/dist/utils/toolUtils.d.ts +1 -1
  33. package/package.json +1 -1
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * NeuroLink Configuration Types
3
- * Industry standard camelCase interfaces for config management
3
+ * Centralized configuration type definitions following the established architecture pattern
4
4
  */
5
5
  /**
6
- * Main NeuroLink configuration interface
6
+ * Main NeuroLink configuration type
7
7
  */
8
- export interface NeuroLinkConfig {
8
+ export type NeuroLinkConfig = {
9
9
  providers?: Record<string, ProviderConfig>;
10
10
  performance?: PerformanceConfig;
11
11
  analytics?: AnalyticsConfig;
@@ -13,11 +13,11 @@ export interface NeuroLinkConfig {
13
13
  lastUpdated?: number;
14
14
  configVersion?: string;
15
15
  [key: string]: unknown;
16
- }
16
+ };
17
17
  /**
18
18
  * Provider-specific configuration
19
19
  */
20
- export interface ProviderConfig {
20
+ export type ProviderConfig = {
21
21
  model?: string;
22
22
  available?: boolean;
23
23
  lastCheck?: number;
@@ -30,32 +30,32 @@ export interface ProviderConfig {
30
30
  costPerToken?: number;
31
31
  features?: string[];
32
32
  [key: string]: unknown;
33
- }
33
+ };
34
34
  /**
35
35
  * Performance and caching configuration
36
36
  */
37
- export interface PerformanceConfig {
37
+ export type PerformanceConfig = {
38
38
  cache?: CacheConfig;
39
39
  fallback?: FallbackConfig;
40
40
  timeoutMs?: number;
41
41
  maxConcurrency?: number;
42
42
  retryConfig?: RetryConfig;
43
- }
43
+ };
44
44
  /**
45
45
  * Cache configuration
46
46
  */
47
- export interface CacheConfig {
47
+ export type CacheConfig = {
48
48
  enabled?: boolean;
49
49
  ttlMs?: number;
50
50
  strategy?: "memory" | "writeThrough" | "cacheAside";
51
51
  maxSize?: number;
52
52
  persistToDisk?: boolean;
53
53
  diskPath?: string;
54
- }
54
+ };
55
55
  /**
56
56
  * Fallback configuration
57
57
  */
58
- export interface FallbackConfig {
58
+ export type FallbackConfig = {
59
59
  enabled?: boolean;
60
60
  maxAttempts?: number;
61
61
  delayMs?: number;
@@ -63,22 +63,22 @@ export interface FallbackConfig {
63
63
  commonResponses?: Record<string, string>;
64
64
  localFallbackPath?: string;
65
65
  degradedMode?: boolean;
66
- }
66
+ };
67
67
  /**
68
68
  * Retry configuration
69
69
  */
70
- export interface RetryConfig {
70
+ export type RetryConfig = {
71
71
  enabled?: boolean;
72
72
  maxAttempts?: number;
73
73
  baseDelayMs?: number;
74
74
  maxDelayMs?: number;
75
75
  exponentialBackoff?: boolean;
76
76
  retryConditions?: string[];
77
- }
77
+ };
78
78
  /**
79
79
  * Analytics configuration
80
80
  */
81
- export interface AnalyticsConfig {
81
+ export type AnalyticsConfig = {
82
82
  enabled?: boolean;
83
83
  trackTokens?: boolean;
84
84
  trackCosts?: boolean;
@@ -90,11 +90,11 @@ export interface AnalyticsConfig {
90
90
  days?: number;
91
91
  maxEntries?: number;
92
92
  };
93
- }
93
+ };
94
94
  /**
95
95
  * Tool configuration
96
96
  */
97
- export interface ToolConfig {
97
+ export type ToolConfig = {
98
98
  /** Whether built-in tools should be disabled */
99
99
  disableBuiltinTools?: boolean;
100
100
  /** Whether custom tools are allowed */
@@ -103,20 +103,20 @@ export interface ToolConfig {
103
103
  maxToolsPerProvider?: number;
104
104
  /** Whether MCP tools should be enabled */
105
105
  enableMCPTools?: boolean;
106
- }
106
+ };
107
107
  /**
108
108
  * Backup metadata information
109
109
  */
110
- export interface BackupInfo {
110
+ export type BackupInfo = {
111
111
  filename: string;
112
112
  path: string;
113
113
  metadata: BackupMetadata;
114
114
  config: NeuroLinkConfig;
115
- }
115
+ };
116
116
  /**
117
117
  * Backup metadata
118
118
  */
119
- export interface BackupMetadata {
119
+ export type BackupMetadata = {
120
120
  reason: string;
121
121
  timestamp: number;
122
122
  version: string;
@@ -124,26 +124,26 @@ export interface BackupMetadata {
124
124
  hash?: string;
125
125
  size?: number;
126
126
  createdBy?: string;
127
- }
127
+ };
128
128
  /**
129
129
  * Configuration validation result
130
130
  */
131
- export interface ConfigValidationResult {
131
+ export type ConfigValidationResult = {
132
132
  valid: boolean;
133
133
  errors: string[];
134
134
  warnings: string[];
135
135
  suggestions: string[];
136
- }
136
+ };
137
137
  /**
138
138
  * Configuration update options
139
139
  */
140
- export interface ConfigUpdateOptions {
140
+ export type ConfigUpdateOptions = {
141
141
  createBackup?: boolean;
142
142
  validate?: boolean;
143
143
  merge?: boolean;
144
144
  reason?: string;
145
145
  silent?: boolean;
146
- }
146
+ };
147
147
  /**
148
148
  * Default configuration values
149
149
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * NeuroLink Configuration Types
3
- * Industry standard camelCase interfaces for config management
3
+ * Centralized configuration type definitions following the established architecture pattern
4
4
  */
5
5
  /**
6
6
  * Default configuration values
@@ -6,9 +6,10 @@ export * from "./tools.js";
6
6
  export * from "./providers.js";
7
7
  export * from "./cli.js";
8
8
  export * from "./taskClassificationTypes.js";
9
+ export type { NeuroLinkConfig, PerformanceConfig, CacheConfig, FallbackConfig, RetryConfig, AnalyticsConfig, ToolConfig, BackupInfo, BackupMetadata, ConfigValidationResult, ConfigUpdateOptions, } from "./configTypes.js";
9
10
  export type { Unknown, UnknownRecord, UnknownArray, JsonValue, JsonObject, JsonArray, ErrorInfo, Result, FunctionParameters, } from "./common.js";
10
11
  export type { ToolArgs, ToolContext, ToolResult, ToolDefinition, SimpleTool, AvailableTool, ToolExecution, } from "./tools.js";
11
- export type { AISDKModel, ProviderError, ProviderConfig } from "./providers.js";
12
+ export type { AISDKModel, ProviderError, AIModelProviderConfig, } from "./providers.js";
12
13
  export type { BaseCommandArgs, GenerateCommandArgs, MCPCommandArgs, ModelsCommandArgs, CommandResult, GenerateResult, StreamChunk, } from "./cli.js";
13
14
  export type { TaskType, TaskClassification, ClassificationScores, ClassificationStats, ClassificationValidation, } from "./taskClassificationTypes.js";
14
15
  export type { MCPTransportType, MCPServerConnectionStatus, MCPServerCategory, MCPServerStatus, MCPDiscoveredServer, MCPConnectedServer, MCPToolInfo, MCPExecutableTool, MCPServerMetadata, MCPToolMetadata, MCPServerRegistryEntry, } from "./mcpTypes.js";
@@ -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
  }>;
@@ -268,7 +268,7 @@ export type ProviderCapabilities = {
268
268
  /**
269
269
  * Provider configuration specifying provider and its available models (from core types)
270
270
  */
271
- export type ProviderConfig = {
271
+ export type AIModelProviderConfig = {
272
272
  provider: AIProviderName;
273
273
  models: SupportedModelName[];
274
274
  };
@@ -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
  */
@@ -451,4 +588,4 @@ export declare const ModelAliases: {
451
588
  /**
452
589
  * Default provider configurations
453
590
  */
454
- export declare const DEFAULT_PROVIDER_CONFIGS: ProviderConfig[];
591
+ export declare const DEFAULT_PROVIDER_CONFIGS: AIModelProviderConfig[];
@@ -1,6 +1,6 @@
1
1
  import type { Tool } from "ai";
2
2
  import type { ValidationSchema, StandardRecord } from "./typeAliases.js";
3
- import type { ProviderConfig } from "./providers.js";
3
+ import type { AIModelProviderConfig } from "./providers.js";
4
4
  import type { TextContent, ImageContent } from "./content.js";
5
5
  import type { AIProviderName, AnalyticsData } from "../types/index.js";
6
6
  import type { TokenUsage } from "./analytics.js";
@@ -38,7 +38,7 @@ export type StreamingMetadata = {
38
38
  * Options for AI requests with unified provider configuration
39
39
  */
40
40
  export type StreamingOptions = {
41
- providers: ProviderConfig[];
41
+ providers: AIModelProviderConfig[];
42
42
  temperature?: number;
43
43
  maxTokens?: number;
44
44
  systemPrompt?: string;
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Consolidates environment variable access to avoid scattered process.env calls
5
5
  */
6
- import type { ToolConfig } from "../config/types.js";
6
+ import type { ToolConfig } from "../types/configTypes.js";
7
7
  /**
8
8
  * Check if built-in tools should be disabled
9
9
  * Centralized function to replace direct process.env access
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/neurolink",
3
- "version": "7.41.1",
3
+ "version": "7.41.3",
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",