@juspay/neurolink 1.6.0 → 1.10.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 (182) hide show
  1. package/CHANGELOG.md +200 -7
  2. package/README.md +101 -18
  3. package/dist/agent/direct-tools.d.ts +1203 -0
  4. package/dist/agent/direct-tools.js +387 -0
  5. package/dist/cli/commands/agent-generate.d.ts +2 -0
  6. package/dist/cli/commands/agent-generate.js +70 -0
  7. package/dist/cli/commands/config.d.ts +6 -6
  8. package/dist/cli/commands/config.js +326 -273
  9. package/dist/cli/commands/mcp.d.ts +2 -1
  10. package/dist/cli/commands/mcp.js +874 -146
  11. package/dist/cli/commands/ollama.d.ts +1 -1
  12. package/dist/cli/commands/ollama.js +153 -143
  13. package/dist/cli/index.js +687 -325
  14. package/dist/cli/utils/complete-setup.d.ts +19 -0
  15. package/dist/cli/utils/complete-setup.js +81 -0
  16. package/dist/cli/utils/env-manager.d.ts +44 -0
  17. package/dist/cli/utils/env-manager.js +226 -0
  18. package/dist/cli/utils/interactive-setup.d.ts +48 -0
  19. package/dist/cli/utils/interactive-setup.js +302 -0
  20. package/dist/core/dynamic-models.d.ts +208 -0
  21. package/dist/core/dynamic-models.js +250 -0
  22. package/dist/core/factory.d.ts +13 -6
  23. package/dist/core/factory.js +177 -62
  24. package/dist/core/types.d.ts +4 -2
  25. package/dist/core/types.js +4 -4
  26. package/dist/index.d.ts +16 -16
  27. package/dist/index.js +16 -16
  28. package/dist/lib/agent/direct-tools.d.ts +1203 -0
  29. package/dist/lib/agent/direct-tools.js +387 -0
  30. package/dist/lib/core/dynamic-models.d.ts +208 -0
  31. package/dist/lib/core/dynamic-models.js +250 -0
  32. package/dist/lib/core/factory.d.ts +13 -6
  33. package/dist/lib/core/factory.js +177 -62
  34. package/dist/lib/core/types.d.ts +4 -2
  35. package/dist/lib/core/types.js +4 -4
  36. package/dist/lib/index.d.ts +16 -16
  37. package/dist/lib/index.js +16 -16
  38. package/dist/lib/mcp/auto-discovery.d.ts +120 -0
  39. package/dist/lib/mcp/auto-discovery.js +793 -0
  40. package/dist/lib/mcp/client.d.ts +66 -0
  41. package/dist/lib/mcp/client.js +245 -0
  42. package/dist/lib/mcp/config.d.ts +31 -0
  43. package/dist/lib/mcp/config.js +74 -0
  44. package/dist/lib/mcp/context-manager.d.ts +4 -4
  45. package/dist/lib/mcp/context-manager.js +24 -18
  46. package/dist/lib/mcp/factory.d.ts +28 -11
  47. package/dist/lib/mcp/factory.js +36 -29
  48. package/dist/lib/mcp/function-calling.d.ts +51 -0
  49. package/dist/lib/mcp/function-calling.js +510 -0
  50. package/dist/lib/mcp/index.d.ts +190 -0
  51. package/dist/lib/mcp/index.js +156 -0
  52. package/dist/lib/mcp/initialize-tools.d.ts +28 -0
  53. package/dist/lib/mcp/initialize-tools.js +209 -0
  54. package/dist/lib/mcp/initialize.d.ts +17 -0
  55. package/dist/lib/mcp/initialize.js +51 -0
  56. package/dist/lib/mcp/logging.d.ts +71 -0
  57. package/dist/lib/mcp/logging.js +183 -0
  58. package/dist/lib/mcp/manager.d.ts +67 -0
  59. package/dist/lib/mcp/manager.js +176 -0
  60. package/dist/lib/mcp/neurolink-mcp-client.d.ts +96 -0
  61. package/dist/lib/mcp/neurolink-mcp-client.js +417 -0
  62. package/dist/lib/mcp/orchestrator.d.ts +3 -3
  63. package/dist/lib/mcp/orchestrator.js +46 -43
  64. package/dist/lib/mcp/registry.d.ts +12 -4
  65. package/dist/lib/mcp/registry.js +64 -37
  66. package/dist/lib/mcp/servers/ai-providers/ai-analysis-tools.d.ts +1 -1
  67. package/dist/lib/mcp/servers/ai-providers/ai-analysis-tools.js +204 -65
  68. package/dist/lib/mcp/servers/ai-providers/ai-core-server.js +142 -102
  69. package/dist/lib/mcp/servers/ai-providers/ai-workflow-tools.d.ts +6 -6
  70. package/dist/lib/mcp/servers/ai-providers/ai-workflow-tools.js +197 -142
  71. package/dist/lib/mcp/servers/utilities/utility-server.d.ts +8 -0
  72. package/dist/lib/mcp/servers/utilities/utility-server.js +326 -0
  73. package/dist/lib/mcp/tool-integration.d.ts +67 -0
  74. package/dist/lib/mcp/tool-integration.js +179 -0
  75. package/dist/lib/mcp/unified-registry.d.ts +269 -0
  76. package/dist/lib/mcp/unified-registry.js +1411 -0
  77. package/dist/lib/neurolink.d.ts +68 -6
  78. package/dist/lib/neurolink.js +304 -42
  79. package/dist/lib/providers/agent-enhanced-provider.d.ts +59 -0
  80. package/dist/lib/providers/agent-enhanced-provider.js +242 -0
  81. package/dist/lib/providers/amazonBedrock.d.ts +3 -3
  82. package/dist/lib/providers/amazonBedrock.js +54 -50
  83. package/dist/lib/providers/anthropic.d.ts +2 -2
  84. package/dist/lib/providers/anthropic.js +92 -84
  85. package/dist/lib/providers/azureOpenAI.d.ts +2 -2
  86. package/dist/lib/providers/azureOpenAI.js +97 -86
  87. package/dist/lib/providers/function-calling-provider.d.ts +70 -0
  88. package/dist/lib/providers/function-calling-provider.js +359 -0
  89. package/dist/lib/providers/googleAIStudio.d.ts +10 -5
  90. package/dist/lib/providers/googleAIStudio.js +60 -38
  91. package/dist/lib/providers/googleVertexAI.d.ts +3 -3
  92. package/dist/lib/providers/googleVertexAI.js +96 -86
  93. package/dist/lib/providers/huggingFace.d.ts +3 -3
  94. package/dist/lib/providers/huggingFace.js +70 -63
  95. package/dist/lib/providers/index.d.ts +11 -11
  96. package/dist/lib/providers/index.js +18 -18
  97. package/dist/lib/providers/mcp-provider.d.ts +62 -0
  98. package/dist/lib/providers/mcp-provider.js +183 -0
  99. package/dist/lib/providers/mistralAI.d.ts +3 -3
  100. package/dist/lib/providers/mistralAI.js +42 -36
  101. package/dist/lib/providers/ollama.d.ts +4 -4
  102. package/dist/lib/providers/ollama.js +128 -98
  103. package/dist/lib/providers/openAI.d.ts +7 -3
  104. package/dist/lib/providers/openAI.js +45 -33
  105. package/dist/lib/utils/logger.js +2 -2
  106. package/dist/lib/utils/providerUtils-fixed.d.ts +8 -0
  107. package/dist/lib/utils/providerUtils-fixed.js +75 -0
  108. package/dist/lib/utils/providerUtils.d.ts +8 -1
  109. package/dist/lib/utils/providerUtils.js +63 -32
  110. package/dist/mcp/auto-discovery.d.ts +120 -0
  111. package/dist/mcp/auto-discovery.js +794 -0
  112. package/dist/mcp/client.d.ts +66 -0
  113. package/dist/mcp/client.js +245 -0
  114. package/dist/mcp/config.d.ts +31 -0
  115. package/dist/mcp/config.js +74 -0
  116. package/dist/mcp/context-manager.d.ts +4 -4
  117. package/dist/mcp/context-manager.js +24 -18
  118. package/dist/mcp/factory.d.ts +28 -11
  119. package/dist/mcp/factory.js +36 -29
  120. package/dist/mcp/function-calling.d.ts +51 -0
  121. package/dist/mcp/function-calling.js +510 -0
  122. package/dist/mcp/index.d.ts +190 -0
  123. package/dist/mcp/index.js +156 -0
  124. package/dist/mcp/initialize-tools.d.ts +28 -0
  125. package/dist/mcp/initialize-tools.js +210 -0
  126. package/dist/mcp/initialize.d.ts +17 -0
  127. package/dist/mcp/initialize.js +51 -0
  128. package/dist/mcp/logging.d.ts +71 -0
  129. package/dist/mcp/logging.js +183 -0
  130. package/dist/mcp/manager.d.ts +67 -0
  131. package/dist/mcp/manager.js +176 -0
  132. package/dist/mcp/neurolink-mcp-client.d.ts +96 -0
  133. package/dist/mcp/neurolink-mcp-client.js +417 -0
  134. package/dist/mcp/orchestrator.d.ts +3 -3
  135. package/dist/mcp/orchestrator.js +46 -43
  136. package/dist/mcp/registry.d.ts +12 -4
  137. package/dist/mcp/registry.js +64 -37
  138. package/dist/mcp/servers/ai-providers/ai-analysis-tools.d.ts +1 -1
  139. package/dist/mcp/servers/ai-providers/ai-analysis-tools.js +204 -65
  140. package/dist/mcp/servers/ai-providers/ai-core-server.js +142 -102
  141. package/dist/mcp/servers/ai-providers/ai-workflow-tools.d.ts +6 -6
  142. package/dist/mcp/servers/ai-providers/ai-workflow-tools.js +197 -142
  143. package/dist/mcp/servers/utilities/utility-server.d.ts +8 -0
  144. package/dist/mcp/servers/utilities/utility-server.js +326 -0
  145. package/dist/mcp/tool-integration.d.ts +67 -0
  146. package/dist/mcp/tool-integration.js +179 -0
  147. package/dist/mcp/unified-registry.d.ts +269 -0
  148. package/dist/mcp/unified-registry.js +1411 -0
  149. package/dist/neurolink.d.ts +68 -6
  150. package/dist/neurolink.js +304 -42
  151. package/dist/providers/agent-enhanced-provider.d.ts +59 -0
  152. package/dist/providers/agent-enhanced-provider.js +242 -0
  153. package/dist/providers/amazonBedrock.d.ts +3 -3
  154. package/dist/providers/amazonBedrock.js +54 -50
  155. package/dist/providers/anthropic.d.ts +2 -2
  156. package/dist/providers/anthropic.js +92 -84
  157. package/dist/providers/azureOpenAI.d.ts +2 -2
  158. package/dist/providers/azureOpenAI.js +97 -86
  159. package/dist/providers/function-calling-provider.d.ts +70 -0
  160. package/dist/providers/function-calling-provider.js +359 -0
  161. package/dist/providers/googleAIStudio.d.ts +10 -5
  162. package/dist/providers/googleAIStudio.js +60 -38
  163. package/dist/providers/googleVertexAI.d.ts +3 -3
  164. package/dist/providers/googleVertexAI.js +96 -86
  165. package/dist/providers/huggingFace.d.ts +3 -3
  166. package/dist/providers/huggingFace.js +70 -63
  167. package/dist/providers/index.d.ts +11 -11
  168. package/dist/providers/index.js +18 -18
  169. package/dist/providers/mcp-provider.d.ts +62 -0
  170. package/dist/providers/mcp-provider.js +183 -0
  171. package/dist/providers/mistralAI.d.ts +3 -3
  172. package/dist/providers/mistralAI.js +42 -36
  173. package/dist/providers/ollama.d.ts +4 -4
  174. package/dist/providers/ollama.js +128 -98
  175. package/dist/providers/openAI.d.ts +7 -3
  176. package/dist/providers/openAI.js +45 -33
  177. package/dist/utils/logger.js +2 -2
  178. package/dist/utils/providerUtils-fixed.d.ts +8 -0
  179. package/dist/utils/providerUtils-fixed.js +75 -0
  180. package/dist/utils/providerUtils.d.ts +8 -1
  181. package/dist/utils/providerUtils.js +63 -32
  182. package/package.json +182 -160
package/CHANGELOG.md CHANGED
@@ -1,5 +1,194 @@
1
+ # [1.10.0](https://github.com/juspay/neurolink/compare/v1.9.0...v1.10.0) (2025-06-21)
2
+
3
+
4
+ ### Features
5
+
6
+ * **cli:** improve provider status accuracy and error handling ([523e845](https://github.com/juspay/neurolink/commit/523e84566fee5d9afa3638186f90c628e20e4894))
7
+
8
+ # 1.9.0 (2025-06-20)
9
+
10
+
11
+ * 🎉 feat: Enhanced multi-provider support with production infrastructure ([#16](https://github.com/juspay/neurolink/issues/16)) ([55eb81a](https://github.com/juspay/neurolink/commit/55eb81a4a7e88c94f6017565b14633b254a15197))
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * **cli:** prevent debug log persistence in production deployments ([#14](https://github.com/juspay/neurolink/issues/14)) ([7310a4c](https://github.com/juspay/neurolink/commit/7310a4cb405e1f35bcc5b22559f3da87a1d793f4))
17
+ * production-ready CLI logging system and enhanced provider fallback ([#13](https://github.com/juspay/neurolink/issues/13)) ([a7e8122](https://github.com/juspay/neurolink/commit/a7e8122393f09cd85e473e5711fbfff05343025e))
18
+
19
+
20
+ ### Features
21
+
22
+ * 🚀 MCP automatic tool discovery + dynamic models + AI function calling ([781b4e5](https://github.com/juspay/neurolink/commit/781b4e5c6e4886acb44a986f7b204eff346427e1))
23
+ * add Google AI Studio integration and restructure documentation ([#11](https://github.com/juspay/neurolink/issues/11)) ([346fed2](https://github.com/juspay/neurolink/commit/346fed2ad458da07b80158f084afed8f3b804f06))
24
+ * add Google AI Studio, fix CLI dependencies, and add LICENSE file ([#12](https://github.com/juspay/neurolink/issues/12)) ([c234bcb](https://github.com/juspay/neurolink/commit/c234bcb65ab1d07cb079ee9ffe9d61841aa945fb))
25
+ * implement AI Development Workflow Tools and comprehensive visual documentation ([#10](https://github.com/juspay/neurolink/issues/10)) ([b0ae179](https://github.com/juspay/neurolink/commit/b0ae179d0b31936e4aa8c53c8e8a234cd467e7c3))
26
+ * implement comprehensive CLI tool with visual documentation and … ([#4](https://github.com/juspay/neurolink/issues/4)) ([9991edb](https://github.com/juspay/neurolink/commit/9991edba7dbe7b9b33bd3b4e2b30186a81b40391))
27
+
28
+
29
+ ### BREAKING CHANGES
30
+
31
+ * Enhanced provider architecture with MCP integration
32
+
33
+ - ✨ MCP automatic tool discovery - detects 82+ tools from connected servers
34
+ - 🎯 AI function calling - seamless tool execution with Vercel AI SDK
35
+ - 🔧 Dynamic model configuration via config/models.json
36
+ - 🤖 Agent-based generation with automatic tool selection
37
+ - 📡 Real-time MCP server management and monitoring
38
+
39
+ - Added MCPEnhancedProvider for automatic tool integration
40
+ - Implemented function calling for Google AI, OpenAI providers
41
+ - Created unified tool registry for MCP and built-in tools
42
+ - Enhanced CLI with `agent-generate` and MCP management commands
43
+ - Added comprehensive examples and documentation
44
+
45
+ - Automatic .mcp-config.json discovery across platforms
46
+ - Session-based context management for tool execution
47
+ - Graceful fallback when MCP servers unavailable
48
+ - Performance optimized tool discovery (<1ms per tool)
49
+
50
+ - Added 5 new comprehensive guides (MCP, troubleshooting, dynamic models)
51
+ - Created practical examples for all integration patterns
52
+ - Updated API reference with new capabilities
53
+ - Enhanced memory bank with implementation details
54
+
55
+ Resolves: Enhanced AI capabilities with real-world tool integration
56
+ * None - 100% backward compatibility maintained
57
+
58
+ Closes: Enhanced multi-provider support milestone
59
+ Ready for: Immediate production deployment
60
+ Impact: Most comprehensive AI provider ecosystem (9 providers)
61
+
62
+ Co-authored-by: sachin.sharma <sachin.sharma@juspay.in>
63
+
1
64
  # @juspay/neurolink
2
65
 
66
+ ## 1.8.0
67
+
68
+ ### 🎯 Major Feature: Dynamic Model Configuration System
69
+
70
+ - **⚡ Revolutionary Model Management**: Introduced dynamic model configuration system replacing static enums
71
+
72
+ - **Self-Updating Models**: New models automatically available without code updates
73
+ - **Cost Optimization**: Automatic selection of cheapest models for tasks
74
+ - **Smart Resolution**: Fuzzy matching, aliases, and capability-based search
75
+ - **Multi-Source Loading**: Configuration from API → GitHub → local with fallback
76
+
77
+ - **💰 Cost Intelligence**: Built-in cost optimization and model selection algorithms
78
+
79
+ - **Current Leader**: Gemini 2.0 Flash at $0.000075/1K input tokens
80
+ - **Capability Mapping**: Find models by features (function-calling, vision, code-execution)
81
+ - **Real-Time Pricing**: Always current model costs and performance data
82
+ - **Budget Controls**: Maximum price filtering and cost-aware selection
83
+
84
+ - **🔧 Production-Ready Infrastructure**: Complete system with validation and monitoring
85
+
86
+ - **Model Configuration Server**: REST API with search capabilities (`scripts/model-server.js`)
87
+ - **Zod Schema Validation**: Type-safe runtime configuration validation
88
+ - **Comprehensive Testing**: Full test suite for all dynamic model functionality
89
+ - **Documentation**: Complete guide with examples and best practices
90
+
91
+ - **🏷️ Smart Model Features**: Advanced model resolution and aliasing
92
+ - **Aliases**: Use friendly names like "claude-latest", "best-coding", "fastest"
93
+ - **Default Models**: Provider-specific defaults when no model specified
94
+ - **Fuzzy Matching**: "opus" → resolves to "claude-3-opus"
95
+ - **Deprecation Handling**: Automatically exclude deprecated models
96
+
97
+ ### Technical Implementation
98
+
99
+ - **New Module**: `src/lib/core/dynamic-models.ts` - Core dynamic model provider
100
+ - **Configuration**: `config/models.json` - Structured model definitions with metadata
101
+ - **Integration**: Updated `AIProviderFactory` to use dynamic models by default
102
+ - **Testing**: Comprehensive test suite (`test-dynamic-models.js`, `test-complete-integration.js`)
103
+ - **Server**: Fake hosted server for testing and development (`scripts/model-server.js`)
104
+
105
+ ### API Enhancements
106
+
107
+ - **Environment Variables**: Added `GOOGLE_AI_API_KEY` for better compatibility
108
+ - **New Scripts**: `npm run model-server`, `npm run test:dynamic-models`
109
+ - **Model Search API**: RESTful endpoints for model discovery and filtering
110
+ - **Performance**: Sub-millisecond provider creation with intelligent caching
111
+
112
+ ### Current Model Inventory
113
+
114
+ - **10 Active Models**: Across Anthropic, OpenAI, Google, and Bedrock
115
+ - **Cost Range**: $0.000075 - $0.075 per 1K input tokens (100x cost difference)
116
+ - **Capabilities**: Function-calling (9 models), Vision (7 models), Code-execution (1 model)
117
+ - **Deprecation Tracking**: 1 deprecated model (GPT-4 Turbo) automatically excluded
118
+
119
+ ### Breaking Changes
120
+
121
+ - **MCP Default**: MCP tools now enabled by default in `AIProviderFactory.createProvider`
122
+ - **Environment**: Added `GOOGLE_AI_API_KEY` requirement for Google AI Studio
123
+ - **Model Resolution**: Some edge cases in model name resolution may behave differently
124
+
125
+ ### Migration Notes
126
+
127
+ - **Backward Compatible**: Existing code continues to work with improved functionality
128
+ - **Optional Features**: Dynamic model features are additive and optional
129
+ - **Configuration**: No changes required to existing `.env` files
130
+ - **Performance**: Improved provider creation speed and reliability
131
+
132
+ ## 1.7.1
133
+
134
+ ### Bug Fixes - MCP System Restoration
135
+
136
+ - **🔧 Fixed Built-in Tool Loading**: Resolved critical circular dependency issues preventing default tools from loading
137
+
138
+ - **Root Cause**: Circular dependency between `config.ts` and `unified-registry.ts` preventing proper initialization
139
+ - **Solution**: Implemented dynamic imports and restructured initialization chain
140
+ - **Result**: Built-in tools restored from 0 → 3 tools (100% recovery rate)
141
+
142
+ - **⏰ Fixed Time Tool Functionality**: Time tool now properly available and returns accurate real-time data
143
+
144
+ - Fixed tool registration and execution pathway
145
+ - Proper timezone handling and formatting
146
+ - Verified accuracy against system time
147
+
148
+ - **🔍 Enhanced External Tool Discovery**: 58+ external MCP tools now discoverable via comprehensive auto-discovery
149
+
150
+ - Auto-discovery across VS Code, Claude Desktop, Cursor, Windsurf
151
+ - Proper placeholder system for lazy activation
152
+ - Unified registry integration
153
+
154
+ - **🏗️ Unified Registry Architecture**: Centralized tool management system now fully operational
155
+ - Seamless integration of built-in and external tools
156
+ - Proper initialization sequence and dependency management
157
+ - Enhanced debugging and status reporting
158
+
159
+ ### Technical Changes
160
+
161
+ - Fixed circular dependency between core MCP modules
162
+ - Updated `initialize.ts` to use dynamic imports preventing startup issues
163
+ - Enhanced `loadDefaultRegistryTools()` to ensure proper built-in server registration
164
+ - Temporarily disabled AI core server to resolve complex dependencies (utility server fully working)
165
+ - Improved error handling and logging throughout MCP system
166
+
167
+ ### Validation Results
168
+
169
+ - **Built-in Tools**: 3/3 working (get-current-time, calculate-date-difference, format-number)
170
+ - **External Discovery**: 58+ tools discovered across multiple MCP sources
171
+ - **Tool Execution**: Real-time AI tool calling verified and working
172
+ - **System Integration**: Full CLI and SDK integration operational
173
+
174
+ ### Breaking Changes
175
+
176
+ - None - all changes are backward compatible improvements
177
+
178
+ ### Migration Notes
179
+
180
+ - Existing MCP configurations continue to work
181
+ - Built-in tools now work automatically without additional setup
182
+ - External tools require proper MCP server configuration (as before)
183
+
184
+ ## 1.7.0
185
+
186
+ ### Patch Changes
187
+
188
+ - **🔧 Version Bump**: Updated version to 1.7.0 to publish the three-provider implementation
189
+ - All code changes were already included in 1.6.0 but not published
190
+ - This version publishes the complete implementation to npm
191
+
3
192
  ## 1.6.0
4
193
 
5
194
  ### Major Changes
@@ -12,6 +201,7 @@
12
201
  ### Features
13
202
 
14
203
  - **🛠️ Enhanced CLI with Ollama Commands**: New Ollama-specific management commands
204
+
15
205
  - `neurolink ollama list-models` - List installed local models
16
206
  - `neurolink ollama pull <model>` - Download models locally
17
207
  - `neurolink ollama remove <model>` - Remove installed models
@@ -36,12 +226,12 @@
36
226
 
37
227
  ### Provider Comparison
38
228
 
39
- | Provider | Best For | Setup Time | Privacy | Cost |
40
- |----------|----------|------------|---------|------|
41
- | OpenAI | General use | 2 min | Cloud | $$$ |
42
- | Ollama | Privacy | 5 min | Local | Free |
43
- | Hugging Face | Open source | 2 min | Cloud | Free/$$ |
44
- | Mistral | EU compliance | 2 min | Cloud | $$ |
229
+ | Provider | Best For | Setup Time | Privacy | Cost |
230
+ | ------------ | ------------- | ---------- | ------- | ------- |
231
+ | OpenAI | General use | 2 min | Cloud | $$$ |
232
+ | Ollama | Privacy | 5 min | Local | Free |
233
+ | Hugging Face | Open source | 2 min | Cloud | Free/$$ |
234
+ | Mistral | EU compliance | 2 min | Cloud | $$ |
45
235
 
46
236
  ### Bug Fixes
47
237
 
@@ -92,12 +282,14 @@ neurolink generate-text "test" --debug
92
282
  ### Patch Changes
93
283
 
94
284
  - **🔧 Production-Ready CLI Logging System**: Fixed critical logging system for clean production output
285
+
95
286
  - **Issue**: CLI showed excessive debug output during normal operation, breaking demo presentations
96
287
  - **Root Cause**: Mixed console.log statements bypassed conditional logger system
97
288
  - **Solution**: Systematic replacement of all console.log with logger.debug across codebase
98
289
  - **Impact**: **Clean CLI output by default** with conditional debug available via `NEUROLINK_DEBUG=true`
99
290
 
100
291
  - **🔄 Enhanced Provider Fallback Logic**: Fixed incomplete provider fallback coverage
292
+
101
293
  - **Issue**: Provider fallback only attempted 4 of 6 providers (missing Anthropic & Azure)
102
294
  - **Root Cause**: Incomplete provider array in NeuroLink class fallback logic
103
295
  - **Solution**: Updated to include all 6 providers: `['openai', 'vertex', 'bedrock', 'anthropic', 'azure', 'google-ai']`
@@ -141,6 +333,7 @@ NEUROLINK_DEBUG=true node dist/cli/cli/index.js generate-text "test" --max-token
141
333
  ### Patch Changes
142
334
 
143
335
  - **🔧 Critical CLI Dependency Fix**: Removed peer dependencies to ensure zero-friction CLI usage
336
+
144
337
  - **Issue**: CLI commands failed when provider-specific SDK packages were peer dependencies
145
338
  - **Root Cause**: `npx` doesn't install peer dependencies, causing missing module errors
146
339
  - **Solution**: Moved ALL AI provider SDKs to regular dependencies
@@ -198,7 +391,7 @@ docs/
198
391
 
199
392
  ```typescript
200
393
  // New Google AI Studio usage
201
- import { createBestAIProvider } from '@juspay/neurolink';
394
+ import { createBestAIProvider } from "@juspay/neurolink";
202
395
 
203
396
  const provider = createBestAIProvider(); // Auto-includes Google AI Studio
204
397
  const result = await provider.generateText("Hello, Gemini!");
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  [![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue)](https://www.typescriptlang.org/)
8
8
  [![CI](https://github.com/juspay/neurolink/workflows/CI/badge.svg)](https://github.com/juspay/neurolink/actions)
9
9
 
10
- > Universal AI toolkit with 9 major AI providers, automatic fallback, and both CLI + SDK interfaces. Production-ready with TypeScript support.
10
+ > Universal AI toolkit with multiple provider support, automatic fallback, and both CLI + SDK interfaces. Production-ready with TypeScript support.
11
11
 
12
12
  **NeuroLink** unifies OpenAI, Bedrock, Vertex AI, Google AI Studio, Anthropic, Azure OpenAI, Hugging Face, Ollama, and Mistral AI with intelligent fallback and streaming support. Available as both a **programmatic SDK** and **professional CLI tool**. Extracted from production use at Juspay.
13
13
 
@@ -32,12 +32,12 @@ npm install @juspay/neurolink
32
32
  ### Basic Usage
33
33
 
34
34
  ```typescript
35
- import { createBestAIProvider } from '@juspay/neurolink';
35
+ import { createBestAIProvider } from "@juspay/neurolink";
36
36
 
37
37
  // Auto-selects best available provider
38
38
  const provider = createBestAIProvider();
39
39
  const result = await provider.generateText({
40
- prompt: "Write a haiku about programming"
40
+ prompt: "Write a haiku about programming",
41
41
  });
42
42
 
43
43
  console.log(result.text);
@@ -61,22 +61,95 @@ npx @juspay/neurolink status
61
61
  ## ✨ Key Features
62
62
 
63
63
  - 🔄 **9 AI Providers** - OpenAI, Bedrock, Vertex AI, Google AI Studio, Anthropic, Azure, Hugging Face, Ollama, Mistral AI
64
+ - ⚡ **Dynamic Model System** - Self-updating model configurations without code changes
65
+ - 💰 **Cost Optimization** - Automatic selection of cheapest models for tasks
66
+ - 🔍 **Smart Model Resolution** - Fuzzy matching, aliases, and capability-based search
64
67
  - ⚡ **Automatic Fallback** - Never fail when providers are down
65
68
  - 🖥️ **CLI + SDK** - Use from command line or integrate programmatically
66
69
  - 🛡️ **Production Ready** - TypeScript, error handling, extracted from production
67
- - 🔧 **MCP Integration** - Model Context Protocol support for extensibility
70
+ - **MCP Integration** - Model Context Protocol with working built-in tools and 58+ external servers
71
+ - 🔍 **MCP Auto-Discovery** - Zero-config discovery across VS Code, Claude, Cursor, Windsurf
72
+ - ⚙️ **Built-in Tools** - Time, date calculations, and number formatting ready to use
68
73
  - 🤖 **AI Analysis Tools** - Built-in optimization and workflow assistance
69
74
  - 🏠 **Local AI Support** - Run completely offline with Ollama
70
75
  - 🌍 **Open Source Models** - Access 100,000+ models via Hugging Face
71
76
  - 🇪🇺 **GDPR Compliance** - European data processing with Mistral AI
72
77
 
78
+ ## 🛠️ MCP Integration Status (v1.7.1)
79
+
80
+ | Component | Status | Description |
81
+ | ------------------- | ------------------ | --------------------------------------------------- |
82
+ | Built-in Tools | ✅ **Working** | Time tool, utilities - fully functional |
83
+ | External Discovery | ✅ **Working** | 58+ MCP servers auto-discovered from all AI tools |
84
+ | Tool Execution | ✅ **Working** | Real-time AI tool calling with built-in tools |
85
+ | External Activation | 🔧 **Development** | Discovery complete, activation protocol in progress |
86
+
87
+ ### ✅ Quick MCP Test (v1.7.1)
88
+
89
+ ```bash
90
+ # Test built-in tools (works immediately)
91
+ npx @juspay/neurolink generate-text "What time is it?" --debug
92
+ # Returns: "The current time is Friday, December 13, 2024 at 10:30:45 AM PST"
93
+
94
+ # Test tool discovery
95
+ npx @juspay/neurolink generate-text "What tools do you have access to?" --debug
96
+ # AI will list 5+ built-in tools and 58+ discovered external servers
97
+
98
+ # Test external server discovery
99
+ npx @juspay/neurolink mcp discover --format table
100
+ # Shows all discovered MCP servers from Claude, VS Code, Cursor, etc.
101
+ ```
102
+
103
+ ## ⚡ Dynamic Model System (v1.8.0)
104
+
105
+ NeuroLink now features a revolutionary dynamic model configuration system that eliminates hardcoded model lists and enables automatic cost optimization.
106
+
107
+ ### ✅ Key Benefits
108
+
109
+ - **🔄 Self-Updating**: New models automatically available without code updates
110
+ - **💰 Cost-Optimized**: Automatic selection of cheapest models for tasks
111
+ - **🔍 Smart Search**: Find models by capabilities (function-calling, vision, etc.)
112
+ - **🏷️ Alias Support**: Use friendly names like "claude-latest" or "best-coding"
113
+ - **📊 Real-Time Pricing**: Always current model costs and performance data
114
+
115
+ ### 🚀 Quick Examples
116
+
117
+ ```bash
118
+ # Cost optimization - automatically use cheapest model
119
+ npx @juspay/neurolink generate-text "Hello" --optimize-cost
120
+
121
+ # Capability search - find models with specific features
122
+ npx @juspay/neurolink generate-text "Describe this image" --capability vision
123
+
124
+ # Model aliases - use friendly names
125
+ npx @juspay/neurolink generate-text "Write code" --model best-coding
126
+
127
+ # Test dynamic model server
128
+ npm run model-server # Starts config server on localhost:3001
129
+ npm run test:dynamic-models # Comprehensive test suite
130
+ ```
131
+
132
+ ### 📊 Current Model Inventory (Auto-Updated)
133
+
134
+ - **10 active models** across 4 providers
135
+ - **Cheapest**: Gemini 2.0 Flash ($0.000075/1K tokens)
136
+ - **Most capable**: Claude 3 Opus (function-calling + vision + analysis)
137
+ - **Best for coding**: Claude 3 Opus, Gemini 2.0 Flash
138
+ - **1 deprecated model** automatically excluded
139
+
140
+ **[📖 Complete Dynamic Models Guide](./docs/DYNAMIC-MODELS.md)** - Setup, configuration, and advanced usage
141
+
73
142
  ## 💻 Essential Examples
74
143
 
75
144
  ### CLI Commands
76
145
 
77
146
  ```bash
78
- # Text generation with provider selection
79
- npx @juspay/neurolink generate-text "Explain quantum computing" --provider openai
147
+ # Text generation with automatic MCP tool detection (default)
148
+ npx @juspay/neurolink generate-text "What time is it?"
149
+ # AI automatically uses time tool for real-time data
150
+
151
+ # Disable tools for training-data-only responses
152
+ npx @juspay/neurolink generate-text "What time is it?" --disable-tools
80
153
 
81
154
  # Real-time streaming
82
155
  npx @juspay/neurolink stream "Tell me a story about robots"
@@ -114,6 +187,7 @@ export async function POST(request: NextRequest) {
114
187
  **No installation required!** Experience NeuroLink through comprehensive visual documentation:
115
188
 
116
189
  ### 📱 Interactive Web Demo
190
+
117
191
  ```bash
118
192
  cd neurolink-demo && node server.js
119
193
  # Visit http://localhost:9876 for live demo
@@ -125,11 +199,13 @@ cd neurolink-demo && node server.js
125
199
  - **Privacy Options**: Test local AI with Ollama
126
200
 
127
201
  ### 🖥️ CLI Demonstrations
202
+
128
203
  - **[CLI Help & Commands](./docs/visual-content/cli-videos/cli-01-cli-help.mp4)** - Complete command reference
129
- - **[Provider Status Check](./docs/visual-content/cli-videos/cli-02-provider-status.mp4)** - Connectivity verification
204
+ - **[Provider Status Check](./docs/visual-content/cli-videos/cli-02-provider-status.mp4)** - Connectivity verification (now with authentication and model availability checks)
130
205
  - **[Text Generation](./docs/visual-content/cli-videos/cli-03-text-generation.mp4)** - Real AI content creation
131
206
 
132
207
  ### 🌐 Web Interface Videos
208
+
133
209
  - **[Business Use Cases](./neurolink-demo/videos/business-use-cases.mp4)** - Professional applications
134
210
  - **[Developer Tools](./neurolink-demo/videos/developer-tools.mp4)** - Code generation and APIs
135
211
  - **[Creative Tools](./neurolink-demo/videos/creative-tools.mp4)** - Content creation
@@ -139,46 +215,52 @@ cd neurolink-demo && node server.js
139
215
  ## 📚 Documentation
140
216
 
141
217
  ### Getting Started
218
+
142
219
  - **[🔧 Provider Setup](./docs/PROVIDER-CONFIGURATION.md)** - Complete environment configuration
143
220
  - **[🖥️ CLI Guide](./docs/CLI-GUIDE.md)** - All commands and options
144
221
  - **[🏗️ SDK Integration](./docs/FRAMEWORK-INTEGRATION.md)** - Next.js, SvelteKit, React
145
222
  - **[⚙️ Environment Variables](./docs/ENVIRONMENT-VARIABLES.md)** - Full configuration guide
146
223
 
147
224
  ### Advanced Features
225
+
148
226
  - **[🔄 MCP Foundation](./docs/MCP-FOUNDATION.md)** - Model Context Protocol architecture
227
+ - **[⚡ Dynamic Models](./docs/DYNAMIC-MODELS.md)** - Self-updating model configurations and cost optimization
149
228
  - **[🧠 AI Analysis Tools](./docs/AI-ANALYSIS-TOOLS.md)** - Usage optimization and benchmarking
150
229
  - **[🛠️ AI Workflow Tools](./docs/AI-WORKFLOW-TOOLS.md)** - Development lifecycle assistance
151
230
  - **[🎬 Visual Demos](./docs/VISUAL-DEMOS.md)** - Screenshots and videos
152
231
 
153
232
  ### Reference
233
+
154
234
  - **[📚 API Reference](./docs/API-REFERENCE.md)** - Complete TypeScript API
155
235
  - **[🔗 Framework Integration](./docs/FRAMEWORK-INTEGRATION.md)** - SvelteKit, Next.js, Express.js
156
236
 
157
237
  ## 🏗️ Supported Providers & Models
158
238
 
159
- | Provider | Models | Auth Method | Free Tier |
160
- |----------|--------|-------------|-----------|
161
- | **OpenAI** | GPT-4o, GPT-4o-mini | API Key | ❌ |
162
- | **Google AI Studio** | Gemini 1.5/2.0 Flash/Pro | API Key | ✅ |
163
- | **Amazon Bedrock** | Claude 3.5/3.7 Sonnet | AWS Credentials | ❌ |
164
- | **Google Vertex AI** | Gemini 2.5 Flash | Service Account | ❌ |
165
- | **Anthropic** | Claude 3.5 Sonnet | API Key | ❌ |
166
- | **Azure OpenAI** | GPT-4, GPT-3.5 | API Key + Endpoint | ❌ |
167
- | **Hugging Face** 🆕 | 100,000+ models | API Key | ✅ |
168
- | **Ollama** 🆕 | Llama 2, Code Llama, Mistral | None (Local) | ✅ |
169
- | **Mistral AI** 🆕 | Tiny, Small, Medium, Large | API Key | |
239
+ | Provider | Models | Auth Method | Free Tier |
240
+ | -------------------- | ---------------------------- | ------------------ | --------- |
241
+ | **OpenAI** | GPT-4o, GPT-4o-mini | API Key | ❌ |
242
+ | **Google AI Studio** | Gemini 1.5/2.0 Flash/Pro | API Key | ✅ |
243
+ | **Amazon Bedrock** | Claude 3.5/3.7 Sonnet | AWS Credentials | ❌ |
244
+ | **Google Vertex AI** | Gemini 2.5 Flash | Service Account | ❌ |
245
+ | **Anthropic** | Claude 3.5 Sonnet | API Key | ❌ |
246
+ | **Azure OpenAI** | GPT-4, GPT-3.5 | API Key + Endpoint | ❌ |
247
+ | **Hugging Face** 🆕 | 100,000+ models | API Key | ✅ |
248
+ | **Ollama** 🆕 | Llama 2, Code Llama, Mistral | None (Local) | ✅ |
249
+ | **Mistral AI** 🆕 | Tiny, Small, Medium, Large | API Key | |
170
250
 
171
251
  **✨ Auto-Selection**: NeuroLink automatically chooses the best available provider based on speed, reliability, and configuration.
172
252
 
173
253
  ## 🎯 Production Features
174
254
 
175
255
  ### Enterprise-Grade Reliability
256
+
176
257
  - **Automatic Failover**: Seamless provider switching on failures
177
258
  - **Error Recovery**: Comprehensive error handling and logging
178
259
  - **Performance Monitoring**: Built-in analytics and metrics
179
260
  - **Type Safety**: Full TypeScript support with IntelliSense
180
261
 
181
262
  ### AI Platform Capabilities
263
+
182
264
  - **MCP Foundation**: Universal AI development platform with 10+ specialized tools
183
265
  - **Analysis Tools**: Usage optimization, performance benchmarking, parameter tuning
184
266
  - **Workflow Tools**: Test generation, code refactoring, documentation, debugging
@@ -189,6 +271,7 @@ cd neurolink-demo && node server.js
189
271
  We welcome contributions! Please see our [Contributing Guidelines](./CONTRIBUTING.md) for details.
190
272
 
191
273
  ### Development Setup
274
+
192
275
  ```bash
193
276
  git clone https://github.com/juspay/neurolink
194
277
  cd neurolink