@juspay/neurolink 7.36.0 → 7.37.1

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 (87) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cli/commands/config.d.ts +18 -18
  3. package/dist/cli/factories/commandFactory.d.ts +24 -0
  4. package/dist/cli/factories/commandFactory.js +297 -245
  5. package/dist/config/taskClassificationConfig.d.ts +51 -0
  6. package/dist/config/taskClassificationConfig.js +148 -0
  7. package/dist/core/baseProvider.d.ts +40 -3
  8. package/dist/core/baseProvider.js +689 -352
  9. package/dist/core/constants.d.ts +2 -30
  10. package/dist/core/constants.js +15 -43
  11. package/dist/factories/providerFactory.js +23 -6
  12. package/dist/index.d.ts +3 -2
  13. package/dist/index.js +4 -3
  14. package/dist/lib/config/taskClassificationConfig.d.ts +51 -0
  15. package/dist/lib/config/taskClassificationConfig.js +148 -0
  16. package/dist/lib/core/baseProvider.d.ts +40 -3
  17. package/dist/lib/core/baseProvider.js +689 -352
  18. package/dist/lib/core/constants.d.ts +2 -30
  19. package/dist/lib/core/constants.js +15 -43
  20. package/dist/lib/factories/providerFactory.js +23 -6
  21. package/dist/lib/index.d.ts +3 -2
  22. package/dist/lib/index.js +4 -3
  23. package/dist/lib/mcp/externalServerManager.js +2 -2
  24. package/dist/lib/mcp/registry.js +2 -2
  25. package/dist/lib/mcp/servers/agent/directToolsServer.js +19 -10
  26. package/dist/lib/mcp/toolRegistry.js +4 -8
  27. package/dist/lib/neurolink.d.ts +82 -27
  28. package/dist/lib/neurolink.js +672 -713
  29. package/dist/lib/providers/amazonBedrock.js +2 -2
  30. package/dist/lib/providers/googleVertex.d.ts +3 -23
  31. package/dist/lib/providers/googleVertex.js +14 -342
  32. package/dist/lib/providers/openAI.d.ts +23 -0
  33. package/dist/lib/providers/openAI.js +313 -6
  34. package/dist/lib/providers/sagemaker/language-model.d.ts +2 -2
  35. package/dist/lib/sdk/toolRegistration.js +18 -1
  36. package/dist/lib/types/common.d.ts +98 -0
  37. package/dist/lib/types/index.d.ts +2 -0
  38. package/dist/lib/types/index.js +2 -0
  39. package/dist/lib/types/streamTypes.d.ts +13 -6
  40. package/dist/lib/types/taskClassificationTypes.d.ts +52 -0
  41. package/dist/lib/types/taskClassificationTypes.js +5 -0
  42. package/dist/lib/types/typeAliases.d.ts +3 -2
  43. package/dist/lib/utils/modelRouter.d.ts +107 -0
  44. package/dist/lib/utils/modelRouter.js +292 -0
  45. package/dist/lib/utils/parameterValidation.js +6 -25
  46. package/dist/lib/utils/promptRedaction.d.ts +29 -0
  47. package/dist/lib/utils/promptRedaction.js +62 -0
  48. package/dist/lib/utils/schemaConversion.d.ts +14 -0
  49. package/dist/lib/utils/schemaConversion.js +140 -0
  50. package/dist/lib/utils/taskClassificationUtils.d.ts +55 -0
  51. package/dist/lib/utils/taskClassificationUtils.js +149 -0
  52. package/dist/lib/utils/taskClassifier.d.ts +23 -0
  53. package/dist/lib/utils/taskClassifier.js +94 -0
  54. package/dist/lib/utils/transformationUtils.js +143 -5
  55. package/dist/mcp/externalServerManager.js +2 -2
  56. package/dist/mcp/registry.js +2 -2
  57. package/dist/mcp/servers/agent/directToolsServer.js +19 -10
  58. package/dist/mcp/toolRegistry.js +4 -8
  59. package/dist/neurolink.d.ts +82 -27
  60. package/dist/neurolink.js +672 -713
  61. package/dist/providers/amazonBedrock.js +2 -2
  62. package/dist/providers/googleVertex.d.ts +3 -23
  63. package/dist/providers/googleVertex.js +14 -342
  64. package/dist/providers/openAI.d.ts +23 -0
  65. package/dist/providers/openAI.js +313 -6
  66. package/dist/providers/sagemaker/language-model.d.ts +2 -2
  67. package/dist/sdk/toolRegistration.js +18 -1
  68. package/dist/types/common.d.ts +98 -0
  69. package/dist/types/index.d.ts +2 -0
  70. package/dist/types/index.js +2 -0
  71. package/dist/types/streamTypes.d.ts +13 -6
  72. package/dist/types/taskClassificationTypes.d.ts +52 -0
  73. package/dist/types/taskClassificationTypes.js +5 -0
  74. package/dist/types/typeAliases.d.ts +3 -2
  75. package/dist/utils/modelRouter.d.ts +107 -0
  76. package/dist/utils/modelRouter.js +292 -0
  77. package/dist/utils/parameterValidation.js +6 -25
  78. package/dist/utils/promptRedaction.d.ts +29 -0
  79. package/dist/utils/promptRedaction.js +62 -0
  80. package/dist/utils/schemaConversion.d.ts +14 -0
  81. package/dist/utils/schemaConversion.js +140 -0
  82. package/dist/utils/taskClassificationUtils.d.ts +55 -0
  83. package/dist/utils/taskClassificationUtils.js +149 -0
  84. package/dist/utils/taskClassifier.d.ts +23 -0
  85. package/dist/utils/taskClassifier.js +94 -0
  86. package/dist/utils/transformationUtils.js +143 -5
  87. package/package.json +3 -2
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## [7.37.1](https://github.com/juspay/neurolink/compare/v7.37.0...v7.37.1) (2025-09-13)
2
+
3
+ ### Bug Fixes
4
+
5
+ - **(tools):** resolve MCP tool execution and parameter validation failures ([2aa2ef7](https://github.com/juspay/neurolink/commit/2aa2ef7db1293e158e5dd34f63050a87aa302ddf))
6
+
7
+ ## [7.37.0](https://github.com/juspay/neurolink/compare/v7.36.0...v7.37.0) (2025-09-10)
8
+
9
+ ### Features
10
+
11
+ - **(sdk):** Add advanced orchestration of model and providers BZ-43839 ([840d697](https://github.com/juspay/neurolink/commit/840d697aa6ef3e5e4c511a9482fc7e80006d2534))
12
+
1
13
  ## [7.36.0](https://github.com/juspay/neurolink/compare/v7.35.0...v7.36.0) (2025-09-10)
2
14
 
3
15
  ### Features
@@ -171,15 +171,15 @@ declare const ConfigSchema: z.ZodObject<{
171
171
  endpoint?: string | undefined;
172
172
  deploymentId?: string | undefined;
173
173
  } | undefined;
174
- huggingface?: {
175
- model: string;
176
- apiKey?: string | undefined;
177
- } | undefined;
178
174
  ollama?: {
179
175
  timeout: number;
180
176
  model: string;
181
177
  baseUrl: string;
182
178
  } | undefined;
179
+ huggingface?: {
180
+ model: string;
181
+ apiKey?: string | undefined;
182
+ } | undefined;
183
183
  mistral?: {
184
184
  model: string;
185
185
  apiKey?: string | undefined;
@@ -220,15 +220,15 @@ declare const ConfigSchema: z.ZodObject<{
220
220
  endpoint?: string | undefined;
221
221
  deploymentId?: string | undefined;
222
222
  } | undefined;
223
- huggingface?: {
224
- model?: string | undefined;
225
- apiKey?: string | undefined;
226
- } | undefined;
227
223
  ollama?: {
228
224
  timeout?: number | undefined;
229
225
  model?: string | undefined;
230
226
  baseUrl?: string | undefined;
231
227
  } | undefined;
228
+ huggingface?: {
229
+ model?: string | undefined;
230
+ apiKey?: string | undefined;
231
+ } | undefined;
232
232
  mistral?: {
233
233
  model?: string | undefined;
234
234
  apiKey?: string | undefined;
@@ -491,21 +491,21 @@ declare const ConfigSchema: z.ZodObject<{
491
491
  endpoint?: string | undefined;
492
492
  deploymentId?: string | undefined;
493
493
  } | undefined;
494
- huggingface?: {
495
- model: string;
496
- apiKey?: string | undefined;
497
- } | undefined;
498
494
  ollama?: {
499
495
  timeout: number;
500
496
  model: string;
501
497
  baseUrl: string;
502
498
  } | undefined;
499
+ huggingface?: {
500
+ model: string;
501
+ apiKey?: string | undefined;
502
+ } | undefined;
503
503
  mistral?: {
504
504
  model: string;
505
505
  apiKey?: string | undefined;
506
506
  } | undefined;
507
507
  };
508
- defaultProvider: "openai" | "anthropic" | "vertex" | "google-ai" | "auto" | "bedrock" | "azure" | "huggingface" | "ollama" | "mistral";
508
+ defaultProvider: "openai" | "anthropic" | "vertex" | "google-ai" | "auto" | "bedrock" | "azure" | "ollama" | "huggingface" | "mistral";
509
509
  profiles: Record<string, any>;
510
510
  preferences: {
511
511
  temperature: number;
@@ -589,21 +589,21 @@ declare const ConfigSchema: z.ZodObject<{
589
589
  endpoint?: string | undefined;
590
590
  deploymentId?: string | undefined;
591
591
  } | undefined;
592
- huggingface?: {
593
- model?: string | undefined;
594
- apiKey?: string | undefined;
595
- } | undefined;
596
592
  ollama?: {
597
593
  timeout?: number | undefined;
598
594
  model?: string | undefined;
599
595
  baseUrl?: string | undefined;
600
596
  } | undefined;
597
+ huggingface?: {
598
+ model?: string | undefined;
599
+ apiKey?: string | undefined;
600
+ } | undefined;
601
601
  mistral?: {
602
602
  model?: string | undefined;
603
603
  apiKey?: string | undefined;
604
604
  } | undefined;
605
605
  } | undefined;
606
- defaultProvider?: "openai" | "anthropic" | "vertex" | "google-ai" | "auto" | "bedrock" | "azure" | "huggingface" | "ollama" | "mistral" | undefined;
606
+ defaultProvider?: "openai" | "anthropic" | "vertex" | "google-ai" | "auto" | "bedrock" | "azure" | "ollama" | "huggingface" | "mistral" | undefined;
607
607
  profiles?: Record<string, any> | undefined;
608
608
  preferences?: {
609
609
  maxTokens?: number | undefined;
@@ -90,6 +90,30 @@ export declare class CLICommandFactory {
90
90
  * Execute the generate command
91
91
  */
92
92
  private static executeGenerate;
93
+ /**
94
+ * Process context for streaming
95
+ */
96
+ private static processStreamContext;
97
+ /**
98
+ * Execute dry-run streaming simulation
99
+ */
100
+ private static executeDryRunStream;
101
+ /**
102
+ * Execute real streaming with timeout handling
103
+ */
104
+ private static executeRealStream;
105
+ /**
106
+ * Process stream with timeout handling
107
+ */
108
+ private static processStreamWithTimeout;
109
+ /**
110
+ * Display analytics and evaluation results
111
+ */
112
+ private static displayStreamResults;
113
+ /**
114
+ * Handle stream output file writing and debug output
115
+ */
116
+ private static handleStreamOutput;
93
117
  /**
94
118
  * Log debug information for stream result
95
119
  */