@juspay/neurolink 1.2.4 → 1.5.0

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 (35) hide show
  1. package/CHANGELOG.md +170 -0
  2. package/README.md +96 -232
  3. package/dist/cli/commands/config.d.ts +403 -0
  4. package/dist/cli/commands/config.js +567 -0
  5. package/dist/cli/commands/mcp.d.ts +7 -0
  6. package/dist/cli/commands/mcp.js +434 -0
  7. package/dist/cli/index.d.ts +9 -0
  8. package/dist/cli/index.js +16 -9
  9. package/dist/core/factory.js +6 -2
  10. package/dist/core/types.d.ts +12 -2
  11. package/dist/core/types.js +11 -0
  12. package/dist/mcp/context-manager.d.ts +164 -0
  13. package/dist/mcp/context-manager.js +273 -0
  14. package/dist/mcp/factory.d.ts +144 -0
  15. package/dist/mcp/factory.js +141 -0
  16. package/dist/mcp/orchestrator.d.ts +170 -0
  17. package/dist/mcp/orchestrator.js +372 -0
  18. package/dist/mcp/registry.d.ts +188 -0
  19. package/dist/mcp/registry.js +373 -0
  20. package/dist/mcp/servers/ai-providers/ai-analysis-tools.d.ts +21 -0
  21. package/dist/mcp/servers/ai-providers/ai-analysis-tools.js +215 -0
  22. package/dist/mcp/servers/ai-providers/ai-core-server.d.ts +10 -0
  23. package/dist/mcp/servers/ai-providers/ai-core-server.js +302 -0
  24. package/dist/mcp/servers/ai-providers/ai-workflow-tools.d.ts +101 -0
  25. package/dist/mcp/servers/ai-providers/ai-workflow-tools.js +430 -0
  26. package/dist/neurolink.d.ts +4 -4
  27. package/dist/neurolink.js +109 -56
  28. package/dist/providers/googleAIStudio.d.ts +30 -0
  29. package/dist/providers/googleAIStudio.js +215 -0
  30. package/dist/providers/googleVertexAI.js +2 -2
  31. package/dist/providers/index.d.ts +2 -0
  32. package/dist/providers/index.js +3 -1
  33. package/dist/providers/openAI.js +2 -2
  34. package/dist/utils/providerUtils.js +11 -2
  35. package/package.json +78 -6
@@ -0,0 +1,403 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * NeuroLink CLI Configuration Management
4
+ *
5
+ * Enhanced configuration system with interactive setup,
6
+ * multi-profile support, and smart validation.
7
+ */
8
+ import { z } from 'zod';
9
+ declare const ConfigSchema: z.ZodObject<{
10
+ defaultProvider: z.ZodDefault<z.ZodEnum<["auto", "openai", "bedrock", "vertex", "anthropic", "azure", "google-ai", "huggingface"]>>;
11
+ providers: z.ZodDefault<z.ZodObject<{
12
+ openai: z.ZodOptional<z.ZodObject<{
13
+ apiKey: z.ZodOptional<z.ZodString>;
14
+ model: z.ZodDefault<z.ZodString>;
15
+ baseURL: z.ZodOptional<z.ZodString>;
16
+ }, "strip", z.ZodTypeAny, {
17
+ model: string;
18
+ apiKey?: string | undefined;
19
+ baseURL?: string | undefined;
20
+ }, {
21
+ apiKey?: string | undefined;
22
+ model?: string | undefined;
23
+ baseURL?: string | undefined;
24
+ }>>;
25
+ bedrock: z.ZodOptional<z.ZodObject<{
26
+ region: z.ZodOptional<z.ZodString>;
27
+ accessKeyId: z.ZodOptional<z.ZodString>;
28
+ secretAccessKey: z.ZodOptional<z.ZodString>;
29
+ sessionToken: z.ZodOptional<z.ZodString>;
30
+ model: z.ZodDefault<z.ZodString>;
31
+ }, "strip", z.ZodTypeAny, {
32
+ model: string;
33
+ region?: string | undefined;
34
+ accessKeyId?: string | undefined;
35
+ secretAccessKey?: string | undefined;
36
+ sessionToken?: string | undefined;
37
+ }, {
38
+ model?: string | undefined;
39
+ region?: string | undefined;
40
+ accessKeyId?: string | undefined;
41
+ secretAccessKey?: string | undefined;
42
+ sessionToken?: string | undefined;
43
+ }>>;
44
+ vertex: z.ZodOptional<z.ZodObject<{
45
+ projectId: z.ZodOptional<z.ZodString>;
46
+ location: z.ZodDefault<z.ZodString>;
47
+ credentials: z.ZodOptional<z.ZodString>;
48
+ serviceAccountKey: z.ZodOptional<z.ZodString>;
49
+ clientEmail: z.ZodOptional<z.ZodString>;
50
+ privateKey: z.ZodOptional<z.ZodString>;
51
+ model: z.ZodDefault<z.ZodString>;
52
+ }, "strip", z.ZodTypeAny, {
53
+ model: string;
54
+ location: string;
55
+ projectId?: string | undefined;
56
+ credentials?: string | undefined;
57
+ serviceAccountKey?: string | undefined;
58
+ clientEmail?: string | undefined;
59
+ privateKey?: string | undefined;
60
+ }, {
61
+ model?: string | undefined;
62
+ projectId?: string | undefined;
63
+ location?: string | undefined;
64
+ credentials?: string | undefined;
65
+ serviceAccountKey?: string | undefined;
66
+ clientEmail?: string | undefined;
67
+ privateKey?: string | undefined;
68
+ }>>;
69
+ anthropic: z.ZodOptional<z.ZodObject<{
70
+ apiKey: z.ZodOptional<z.ZodString>;
71
+ model: z.ZodDefault<z.ZodString>;
72
+ }, "strip", z.ZodTypeAny, {
73
+ model: string;
74
+ apiKey?: string | undefined;
75
+ }, {
76
+ apiKey?: string | undefined;
77
+ model?: string | undefined;
78
+ }>>;
79
+ azure: z.ZodOptional<z.ZodObject<{
80
+ apiKey: z.ZodOptional<z.ZodString>;
81
+ endpoint: z.ZodOptional<z.ZodString>;
82
+ deploymentId: z.ZodOptional<z.ZodString>;
83
+ model: z.ZodDefault<z.ZodString>;
84
+ }, "strip", z.ZodTypeAny, {
85
+ model: string;
86
+ apiKey?: string | undefined;
87
+ endpoint?: string | undefined;
88
+ deploymentId?: string | undefined;
89
+ }, {
90
+ apiKey?: string | undefined;
91
+ model?: string | undefined;
92
+ endpoint?: string | undefined;
93
+ deploymentId?: string | undefined;
94
+ }>>;
95
+ 'google-ai': z.ZodOptional<z.ZodObject<{
96
+ apiKey: z.ZodOptional<z.ZodString>;
97
+ model: z.ZodDefault<z.ZodString>;
98
+ }, "strip", z.ZodTypeAny, {
99
+ model: string;
100
+ apiKey?: string | undefined;
101
+ }, {
102
+ apiKey?: string | undefined;
103
+ model?: string | undefined;
104
+ }>>;
105
+ huggingface: z.ZodOptional<z.ZodObject<{
106
+ apiKey: z.ZodOptional<z.ZodString>;
107
+ model: z.ZodDefault<z.ZodString>;
108
+ }, "strip", z.ZodTypeAny, {
109
+ model: string;
110
+ apiKey?: string | undefined;
111
+ }, {
112
+ apiKey?: string | undefined;
113
+ model?: string | undefined;
114
+ }>>;
115
+ }, "strip", z.ZodTypeAny, {
116
+ openai?: {
117
+ model: string;
118
+ apiKey?: string | undefined;
119
+ baseURL?: string | undefined;
120
+ } | undefined;
121
+ bedrock?: {
122
+ model: string;
123
+ region?: string | undefined;
124
+ accessKeyId?: string | undefined;
125
+ secretAccessKey?: string | undefined;
126
+ sessionToken?: string | undefined;
127
+ } | undefined;
128
+ vertex?: {
129
+ model: string;
130
+ location: string;
131
+ projectId?: string | undefined;
132
+ credentials?: string | undefined;
133
+ serviceAccountKey?: string | undefined;
134
+ clientEmail?: string | undefined;
135
+ privateKey?: string | undefined;
136
+ } | undefined;
137
+ anthropic?: {
138
+ model: string;
139
+ apiKey?: string | undefined;
140
+ } | undefined;
141
+ azure?: {
142
+ model: string;
143
+ apiKey?: string | undefined;
144
+ endpoint?: string | undefined;
145
+ deploymentId?: string | undefined;
146
+ } | undefined;
147
+ 'google-ai'?: {
148
+ model: string;
149
+ apiKey?: string | undefined;
150
+ } | undefined;
151
+ huggingface?: {
152
+ model: string;
153
+ apiKey?: string | undefined;
154
+ } | undefined;
155
+ }, {
156
+ openai?: {
157
+ apiKey?: string | undefined;
158
+ model?: string | undefined;
159
+ baseURL?: string | undefined;
160
+ } | undefined;
161
+ bedrock?: {
162
+ model?: string | undefined;
163
+ region?: string | undefined;
164
+ accessKeyId?: string | undefined;
165
+ secretAccessKey?: string | undefined;
166
+ sessionToken?: string | undefined;
167
+ } | undefined;
168
+ vertex?: {
169
+ model?: string | undefined;
170
+ projectId?: string | undefined;
171
+ location?: string | undefined;
172
+ credentials?: string | undefined;
173
+ serviceAccountKey?: string | undefined;
174
+ clientEmail?: string | undefined;
175
+ privateKey?: string | undefined;
176
+ } | undefined;
177
+ anthropic?: {
178
+ apiKey?: string | undefined;
179
+ model?: string | undefined;
180
+ } | undefined;
181
+ azure?: {
182
+ apiKey?: string | undefined;
183
+ model?: string | undefined;
184
+ endpoint?: string | undefined;
185
+ deploymentId?: string | undefined;
186
+ } | undefined;
187
+ 'google-ai'?: {
188
+ apiKey?: string | undefined;
189
+ model?: string | undefined;
190
+ } | undefined;
191
+ huggingface?: {
192
+ apiKey?: string | undefined;
193
+ model?: string | undefined;
194
+ } | undefined;
195
+ }>>;
196
+ profiles: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>;
197
+ preferences: z.ZodDefault<z.ZodObject<{
198
+ outputFormat: z.ZodDefault<z.ZodEnum<["text", "json", "yaml"]>>;
199
+ temperature: z.ZodDefault<z.ZodNumber>;
200
+ maxTokens: z.ZodDefault<z.ZodNumber>;
201
+ enableLogging: z.ZodDefault<z.ZodBoolean>;
202
+ enableCaching: z.ZodDefault<z.ZodBoolean>;
203
+ cacheStrategy: z.ZodDefault<z.ZodEnum<["memory", "file", "redis"]>>;
204
+ }, "strip", z.ZodTypeAny, {
205
+ temperature: number;
206
+ maxTokens: number;
207
+ outputFormat: "text" | "json" | "yaml";
208
+ enableLogging: boolean;
209
+ enableCaching: boolean;
210
+ cacheStrategy: "file" | "memory" | "redis";
211
+ }, {
212
+ temperature?: number | undefined;
213
+ maxTokens?: number | undefined;
214
+ outputFormat?: "text" | "json" | "yaml" | undefined;
215
+ enableLogging?: boolean | undefined;
216
+ enableCaching?: boolean | undefined;
217
+ cacheStrategy?: "file" | "memory" | "redis" | undefined;
218
+ }>>;
219
+ }, "strip", z.ZodTypeAny, {
220
+ defaultProvider: "auto" | "openai" | "bedrock" | "vertex" | "anthropic" | "azure" | "google-ai" | "huggingface";
221
+ providers: {
222
+ openai?: {
223
+ model: string;
224
+ apiKey?: string | undefined;
225
+ baseURL?: string | undefined;
226
+ } | undefined;
227
+ bedrock?: {
228
+ model: string;
229
+ region?: string | undefined;
230
+ accessKeyId?: string | undefined;
231
+ secretAccessKey?: string | undefined;
232
+ sessionToken?: string | undefined;
233
+ } | undefined;
234
+ vertex?: {
235
+ model: string;
236
+ location: string;
237
+ projectId?: string | undefined;
238
+ credentials?: string | undefined;
239
+ serviceAccountKey?: string | undefined;
240
+ clientEmail?: string | undefined;
241
+ privateKey?: string | undefined;
242
+ } | undefined;
243
+ anthropic?: {
244
+ model: string;
245
+ apiKey?: string | undefined;
246
+ } | undefined;
247
+ azure?: {
248
+ model: string;
249
+ apiKey?: string | undefined;
250
+ endpoint?: string | undefined;
251
+ deploymentId?: string | undefined;
252
+ } | undefined;
253
+ 'google-ai'?: {
254
+ model: string;
255
+ apiKey?: string | undefined;
256
+ } | undefined;
257
+ huggingface?: {
258
+ model: string;
259
+ apiKey?: string | undefined;
260
+ } | undefined;
261
+ };
262
+ profiles: Record<string, any>;
263
+ preferences: {
264
+ temperature: number;
265
+ maxTokens: number;
266
+ outputFormat: "text" | "json" | "yaml";
267
+ enableLogging: boolean;
268
+ enableCaching: boolean;
269
+ cacheStrategy: "file" | "memory" | "redis";
270
+ };
271
+ }, {
272
+ defaultProvider?: "auto" | "openai" | "bedrock" | "vertex" | "anthropic" | "azure" | "google-ai" | "huggingface" | undefined;
273
+ providers?: {
274
+ openai?: {
275
+ apiKey?: string | undefined;
276
+ model?: string | undefined;
277
+ baseURL?: string | undefined;
278
+ } | undefined;
279
+ bedrock?: {
280
+ model?: string | undefined;
281
+ region?: string | undefined;
282
+ accessKeyId?: string | undefined;
283
+ secretAccessKey?: string | undefined;
284
+ sessionToken?: string | undefined;
285
+ } | undefined;
286
+ vertex?: {
287
+ model?: string | undefined;
288
+ projectId?: string | undefined;
289
+ location?: string | undefined;
290
+ credentials?: string | undefined;
291
+ serviceAccountKey?: string | undefined;
292
+ clientEmail?: string | undefined;
293
+ privateKey?: string | undefined;
294
+ } | undefined;
295
+ anthropic?: {
296
+ apiKey?: string | undefined;
297
+ model?: string | undefined;
298
+ } | undefined;
299
+ azure?: {
300
+ apiKey?: string | undefined;
301
+ model?: string | undefined;
302
+ endpoint?: string | undefined;
303
+ deploymentId?: string | undefined;
304
+ } | undefined;
305
+ 'google-ai'?: {
306
+ apiKey?: string | undefined;
307
+ model?: string | undefined;
308
+ } | undefined;
309
+ huggingface?: {
310
+ apiKey?: string | undefined;
311
+ model?: string | undefined;
312
+ } | undefined;
313
+ } | undefined;
314
+ profiles?: Record<string, any> | undefined;
315
+ preferences?: {
316
+ temperature?: number | undefined;
317
+ maxTokens?: number | undefined;
318
+ outputFormat?: "text" | "json" | "yaml" | undefined;
319
+ enableLogging?: boolean | undefined;
320
+ enableCaching?: boolean | undefined;
321
+ cacheStrategy?: "file" | "memory" | "redis" | undefined;
322
+ } | undefined;
323
+ }>;
324
+ export type NeuroLinkConfig = z.infer<typeof ConfigSchema>;
325
+ export declare class ConfigManager {
326
+ private configDir;
327
+ private configFile;
328
+ private config;
329
+ constructor();
330
+ /**
331
+ * Load configuration from file or create default
332
+ */
333
+ private loadConfig;
334
+ /**
335
+ * Save configuration to file
336
+ */
337
+ private saveConfig;
338
+ /**
339
+ * Interactive configuration setup
340
+ */
341
+ initInteractive(): Promise<void>;
342
+ /**
343
+ * Setup individual providers
344
+ */
345
+ private setupProviders;
346
+ /**
347
+ * Setup individual provider
348
+ */
349
+ private setupProvider;
350
+ /**
351
+ * OpenAI provider setup
352
+ */
353
+ private setupOpenAI;
354
+ /**
355
+ * Amazon Bedrock provider setup
356
+ */
357
+ private setupBedrock;
358
+ /**
359
+ * Google Vertex AI provider setup
360
+ */
361
+ private setupVertex;
362
+ /**
363
+ * Anthropic provider setup
364
+ */
365
+ private setupAnthropic;
366
+ /**
367
+ * Azure OpenAI provider setup
368
+ */
369
+ private setupAzure;
370
+ /**
371
+ * Google AI Studio provider setup
372
+ */
373
+ private setupGoogleAI;
374
+ /**
375
+ * Hugging Face provider setup
376
+ */
377
+ private setupHuggingFace;
378
+ /**
379
+ * Get current configuration
380
+ */
381
+ getConfig(): NeuroLinkConfig;
382
+ /**
383
+ * Update configuration
384
+ */
385
+ updateConfig(updates: Partial<NeuroLinkConfig>): void;
386
+ /**
387
+ * Show current configuration
388
+ */
389
+ showConfig(): void;
390
+ /**
391
+ * Validate configuration
392
+ */
393
+ validateConfig(): {
394
+ valid: boolean;
395
+ errors: string[];
396
+ };
397
+ /**
398
+ * Reset configuration to defaults
399
+ */
400
+ resetConfig(): void;
401
+ }
402
+ export declare const configManager: ConfigManager;
403
+ export {};