@juspay/neurolink 1.6.0 → 1.9.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.
- package/CHANGELOG.md +193 -7
- package/README.md +100 -17
- package/dist/agent/direct-tools.d.ts +1203 -0
- package/dist/agent/direct-tools.js +387 -0
- package/dist/cli/commands/agent-generate.d.ts +2 -0
- package/dist/cli/commands/agent-generate.js +70 -0
- package/dist/cli/commands/config.d.ts +6 -6
- package/dist/cli/commands/config.js +326 -273
- package/dist/cli/commands/mcp.d.ts +2 -1
- package/dist/cli/commands/mcp.js +874 -146
- package/dist/cli/commands/ollama.d.ts +1 -1
- package/dist/cli/commands/ollama.js +153 -143
- package/dist/cli/index.js +589 -323
- package/dist/cli/utils/complete-setup.d.ts +19 -0
- package/dist/cli/utils/complete-setup.js +81 -0
- package/dist/cli/utils/env-manager.d.ts +44 -0
- package/dist/cli/utils/env-manager.js +226 -0
- package/dist/cli/utils/interactive-setup.d.ts +48 -0
- package/dist/cli/utils/interactive-setup.js +302 -0
- package/dist/core/dynamic-models.d.ts +208 -0
- package/dist/core/dynamic-models.js +250 -0
- package/dist/core/factory.d.ts +13 -6
- package/dist/core/factory.js +176 -61
- package/dist/core/types.d.ts +4 -2
- package/dist/core/types.js +4 -4
- package/dist/index.d.ts +16 -16
- package/dist/index.js +16 -16
- package/dist/lib/agent/direct-tools.d.ts +1203 -0
- package/dist/lib/agent/direct-tools.js +387 -0
- package/dist/lib/core/dynamic-models.d.ts +208 -0
- package/dist/lib/core/dynamic-models.js +250 -0
- package/dist/lib/core/factory.d.ts +13 -6
- package/dist/lib/core/factory.js +176 -61
- package/dist/lib/core/types.d.ts +4 -2
- package/dist/lib/core/types.js +4 -4
- package/dist/lib/index.d.ts +16 -16
- package/dist/lib/index.js +16 -16
- package/dist/lib/mcp/auto-discovery.d.ts +120 -0
- package/dist/lib/mcp/auto-discovery.js +793 -0
- package/dist/lib/mcp/client.d.ts +66 -0
- package/dist/lib/mcp/client.js +245 -0
- package/dist/lib/mcp/config.d.ts +31 -0
- package/dist/lib/mcp/config.js +74 -0
- package/dist/lib/mcp/context-manager.d.ts +4 -4
- package/dist/lib/mcp/context-manager.js +24 -18
- package/dist/lib/mcp/factory.d.ts +28 -11
- package/dist/lib/mcp/factory.js +36 -29
- package/dist/lib/mcp/function-calling.d.ts +51 -0
- package/dist/lib/mcp/function-calling.js +510 -0
- package/dist/lib/mcp/index.d.ts +190 -0
- package/dist/lib/mcp/index.js +156 -0
- package/dist/lib/mcp/initialize-tools.d.ts +28 -0
- package/dist/lib/mcp/initialize-tools.js +209 -0
- package/dist/lib/mcp/initialize.d.ts +17 -0
- package/dist/lib/mcp/initialize.js +51 -0
- package/dist/lib/mcp/logging.d.ts +71 -0
- package/dist/lib/mcp/logging.js +183 -0
- package/dist/lib/mcp/manager.d.ts +67 -0
- package/dist/lib/mcp/manager.js +176 -0
- package/dist/lib/mcp/neurolink-mcp-client.d.ts +96 -0
- package/dist/lib/mcp/neurolink-mcp-client.js +417 -0
- package/dist/lib/mcp/orchestrator.d.ts +3 -3
- package/dist/lib/mcp/orchestrator.js +46 -43
- package/dist/lib/mcp/registry.d.ts +2 -2
- package/dist/lib/mcp/registry.js +42 -33
- package/dist/lib/mcp/servers/ai-providers/ai-analysis-tools.d.ts +1 -1
- package/dist/lib/mcp/servers/ai-providers/ai-analysis-tools.js +204 -65
- package/dist/lib/mcp/servers/ai-providers/ai-core-server.js +142 -102
- package/dist/lib/mcp/servers/ai-providers/ai-workflow-tools.d.ts +6 -6
- package/dist/lib/mcp/servers/ai-providers/ai-workflow-tools.js +197 -142
- package/dist/lib/mcp/servers/utilities/utility-server.d.ts +8 -0
- package/dist/lib/mcp/servers/utilities/utility-server.js +326 -0
- package/dist/lib/mcp/tool-integration.d.ts +67 -0
- package/dist/lib/mcp/tool-integration.js +179 -0
- package/dist/lib/mcp/unified-registry.d.ts +269 -0
- package/dist/lib/mcp/unified-registry.js +1411 -0
- package/dist/lib/neurolink.d.ts +68 -6
- package/dist/lib/neurolink.js +304 -42
- package/dist/lib/providers/agent-enhanced-provider.d.ts +59 -0
- package/dist/lib/providers/agent-enhanced-provider.js +242 -0
- package/dist/lib/providers/amazonBedrock.d.ts +3 -3
- package/dist/lib/providers/amazonBedrock.js +54 -50
- package/dist/lib/providers/anthropic.d.ts +2 -2
- package/dist/lib/providers/anthropic.js +92 -84
- package/dist/lib/providers/azureOpenAI.d.ts +2 -2
- package/dist/lib/providers/azureOpenAI.js +97 -86
- package/dist/lib/providers/function-calling-provider.d.ts +70 -0
- package/dist/lib/providers/function-calling-provider.js +359 -0
- package/dist/lib/providers/googleAIStudio.d.ts +10 -5
- package/dist/lib/providers/googleAIStudio.js +60 -38
- package/dist/lib/providers/googleVertexAI.d.ts +3 -3
- package/dist/lib/providers/googleVertexAI.js +96 -86
- package/dist/lib/providers/huggingFace.d.ts +3 -3
- package/dist/lib/providers/huggingFace.js +70 -63
- package/dist/lib/providers/index.d.ts +11 -11
- package/dist/lib/providers/index.js +18 -18
- package/dist/lib/providers/mcp-provider.d.ts +62 -0
- package/dist/lib/providers/mcp-provider.js +183 -0
- package/dist/lib/providers/mistralAI.d.ts +3 -3
- package/dist/lib/providers/mistralAI.js +42 -36
- package/dist/lib/providers/ollama.d.ts +4 -4
- package/dist/lib/providers/ollama.js +113 -98
- package/dist/lib/providers/openAI.d.ts +7 -3
- package/dist/lib/providers/openAI.js +45 -33
- package/dist/lib/utils/logger.js +2 -2
- package/dist/lib/utils/providerUtils.js +53 -31
- package/dist/mcp/auto-discovery.d.ts +120 -0
- package/dist/mcp/auto-discovery.js +794 -0
- package/dist/mcp/client.d.ts +66 -0
- package/dist/mcp/client.js +245 -0
- package/dist/mcp/config.d.ts +31 -0
- package/dist/mcp/config.js +74 -0
- package/dist/mcp/context-manager.d.ts +4 -4
- package/dist/mcp/context-manager.js +24 -18
- package/dist/mcp/factory.d.ts +28 -11
- package/dist/mcp/factory.js +36 -29
- package/dist/mcp/function-calling.d.ts +51 -0
- package/dist/mcp/function-calling.js +510 -0
- package/dist/mcp/index.d.ts +190 -0
- package/dist/mcp/index.js +156 -0
- package/dist/mcp/initialize-tools.d.ts +28 -0
- package/dist/mcp/initialize-tools.js +210 -0
- package/dist/mcp/initialize.d.ts +17 -0
- package/dist/mcp/initialize.js +51 -0
- package/dist/mcp/logging.d.ts +71 -0
- package/dist/mcp/logging.js +183 -0
- package/dist/mcp/manager.d.ts +67 -0
- package/dist/mcp/manager.js +176 -0
- package/dist/mcp/neurolink-mcp-client.d.ts +96 -0
- package/dist/mcp/neurolink-mcp-client.js +417 -0
- package/dist/mcp/orchestrator.d.ts +3 -3
- package/dist/mcp/orchestrator.js +46 -43
- package/dist/mcp/registry.d.ts +2 -2
- package/dist/mcp/registry.js +42 -33
- package/dist/mcp/servers/ai-providers/ai-analysis-tools.d.ts +1 -1
- package/dist/mcp/servers/ai-providers/ai-analysis-tools.js +204 -65
- package/dist/mcp/servers/ai-providers/ai-core-server.js +142 -102
- package/dist/mcp/servers/ai-providers/ai-workflow-tools.d.ts +6 -6
- package/dist/mcp/servers/ai-providers/ai-workflow-tools.js +197 -142
- package/dist/mcp/servers/utilities/utility-server.d.ts +8 -0
- package/dist/mcp/servers/utilities/utility-server.js +326 -0
- package/dist/mcp/tool-integration.d.ts +67 -0
- package/dist/mcp/tool-integration.js +179 -0
- package/dist/mcp/unified-registry.d.ts +269 -0
- package/dist/mcp/unified-registry.js +1411 -0
- package/dist/neurolink.d.ts +68 -6
- package/dist/neurolink.js +304 -42
- package/dist/providers/agent-enhanced-provider.d.ts +59 -0
- package/dist/providers/agent-enhanced-provider.js +242 -0
- package/dist/providers/amazonBedrock.d.ts +3 -3
- package/dist/providers/amazonBedrock.js +54 -50
- package/dist/providers/anthropic.d.ts +2 -2
- package/dist/providers/anthropic.js +92 -84
- package/dist/providers/azureOpenAI.d.ts +2 -2
- package/dist/providers/azureOpenAI.js +97 -86
- package/dist/providers/function-calling-provider.d.ts +70 -0
- package/dist/providers/function-calling-provider.js +359 -0
- package/dist/providers/googleAIStudio.d.ts +10 -5
- package/dist/providers/googleAIStudio.js +60 -38
- package/dist/providers/googleVertexAI.d.ts +3 -3
- package/dist/providers/googleVertexAI.js +96 -86
- package/dist/providers/huggingFace.d.ts +3 -3
- package/dist/providers/huggingFace.js +70 -63
- package/dist/providers/index.d.ts +11 -11
- package/dist/providers/index.js +18 -18
- package/dist/providers/mcp-provider.d.ts +62 -0
- package/dist/providers/mcp-provider.js +183 -0
- package/dist/providers/mistralAI.d.ts +3 -3
- package/dist/providers/mistralAI.js +42 -36
- package/dist/providers/ollama.d.ts +4 -4
- package/dist/providers/ollama.js +113 -98
- package/dist/providers/openAI.d.ts +7 -3
- package/dist/providers/openAI.js +45 -33
- package/dist/utils/logger.js +2 -2
- package/dist/utils/providerUtils.js +53 -31
- package/package.json +175 -161
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,187 @@
|
|
|
1
|
+
# 1.9.0 (2025-06-20)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
* 🎉 feat: Enhanced multi-provider support with production infrastructure ([#16](https://github.com/juspay/neurolink/issues/16)) ([55eb81a](https://github.com/juspay/neurolink/commit/55eb81a4a7e88c94f6017565b14633b254a15197))
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
* **cli:** prevent debug log persistence in production deployments ([#14](https://github.com/juspay/neurolink/issues/14)) ([7310a4c](https://github.com/juspay/neurolink/commit/7310a4cb405e1f35bcc5b22559f3da87a1d793f4))
|
|
10
|
+
* 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))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* 🚀 MCP automatic tool discovery + dynamic models + AI function calling ([781b4e5](https://github.com/juspay/neurolink/commit/781b4e5c6e4886acb44a986f7b204eff346427e1))
|
|
16
|
+
* add Google AI Studio integration and restructure documentation ([#11](https://github.com/juspay/neurolink/issues/11)) ([346fed2](https://github.com/juspay/neurolink/commit/346fed2ad458da07b80158f084afed8f3b804f06))
|
|
17
|
+
* 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))
|
|
18
|
+
* 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))
|
|
19
|
+
* implement comprehensive CLI tool with visual documentation and … ([#4](https://github.com/juspay/neurolink/issues/4)) ([9991edb](https://github.com/juspay/neurolink/commit/9991edba7dbe7b9b33bd3b4e2b30186a81b40391))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### BREAKING CHANGES
|
|
23
|
+
|
|
24
|
+
* Enhanced provider architecture with MCP integration
|
|
25
|
+
|
|
26
|
+
- ✨ MCP automatic tool discovery - detects 82+ tools from connected servers
|
|
27
|
+
- 🎯 AI function calling - seamless tool execution with Vercel AI SDK
|
|
28
|
+
- 🔧 Dynamic model configuration via config/models.json
|
|
29
|
+
- 🤖 Agent-based generation with automatic tool selection
|
|
30
|
+
- 📡 Real-time MCP server management and monitoring
|
|
31
|
+
|
|
32
|
+
- Added MCPEnhancedProvider for automatic tool integration
|
|
33
|
+
- Implemented function calling for Google AI, OpenAI providers
|
|
34
|
+
- Created unified tool registry for MCP and built-in tools
|
|
35
|
+
- Enhanced CLI with `agent-generate` and MCP management commands
|
|
36
|
+
- Added comprehensive examples and documentation
|
|
37
|
+
|
|
38
|
+
- Automatic .mcp-config.json discovery across platforms
|
|
39
|
+
- Session-based context management for tool execution
|
|
40
|
+
- Graceful fallback when MCP servers unavailable
|
|
41
|
+
- Performance optimized tool discovery (<1ms per tool)
|
|
42
|
+
|
|
43
|
+
- Added 5 new comprehensive guides (MCP, troubleshooting, dynamic models)
|
|
44
|
+
- Created practical examples for all integration patterns
|
|
45
|
+
- Updated API reference with new capabilities
|
|
46
|
+
- Enhanced memory bank with implementation details
|
|
47
|
+
|
|
48
|
+
Resolves: Enhanced AI capabilities with real-world tool integration
|
|
49
|
+
* None - 100% backward compatibility maintained
|
|
50
|
+
|
|
51
|
+
Closes: Enhanced multi-provider support milestone
|
|
52
|
+
Ready for: Immediate production deployment
|
|
53
|
+
Impact: Most comprehensive AI provider ecosystem (9 providers)
|
|
54
|
+
|
|
55
|
+
Co-authored-by: sachin.sharma <sachin.sharma@juspay.in>
|
|
56
|
+
|
|
1
57
|
# @juspay/neurolink
|
|
2
58
|
|
|
59
|
+
## 1.8.0
|
|
60
|
+
|
|
61
|
+
### 🎯 Major Feature: Dynamic Model Configuration System
|
|
62
|
+
|
|
63
|
+
- **⚡ Revolutionary Model Management**: Introduced dynamic model configuration system replacing static enums
|
|
64
|
+
|
|
65
|
+
- **Self-Updating Models**: New models automatically available without code updates
|
|
66
|
+
- **Cost Optimization**: Automatic selection of cheapest models for tasks
|
|
67
|
+
- **Smart Resolution**: Fuzzy matching, aliases, and capability-based search
|
|
68
|
+
- **Multi-Source Loading**: Configuration from API → GitHub → local with fallback
|
|
69
|
+
|
|
70
|
+
- **💰 Cost Intelligence**: Built-in cost optimization and model selection algorithms
|
|
71
|
+
|
|
72
|
+
- **Current Leader**: Gemini 2.0 Flash at $0.000075/1K input tokens
|
|
73
|
+
- **Capability Mapping**: Find models by features (function-calling, vision, code-execution)
|
|
74
|
+
- **Real-Time Pricing**: Always current model costs and performance data
|
|
75
|
+
- **Budget Controls**: Maximum price filtering and cost-aware selection
|
|
76
|
+
|
|
77
|
+
- **🔧 Production-Ready Infrastructure**: Complete system with validation and monitoring
|
|
78
|
+
|
|
79
|
+
- **Model Configuration Server**: REST API with search capabilities (`scripts/model-server.js`)
|
|
80
|
+
- **Zod Schema Validation**: Type-safe runtime configuration validation
|
|
81
|
+
- **Comprehensive Testing**: Full test suite for all dynamic model functionality
|
|
82
|
+
- **Documentation**: Complete guide with examples and best practices
|
|
83
|
+
|
|
84
|
+
- **🏷️ Smart Model Features**: Advanced model resolution and aliasing
|
|
85
|
+
- **Aliases**: Use friendly names like "claude-latest", "best-coding", "fastest"
|
|
86
|
+
- **Default Models**: Provider-specific defaults when no model specified
|
|
87
|
+
- **Fuzzy Matching**: "opus" → resolves to "claude-3-opus"
|
|
88
|
+
- **Deprecation Handling**: Automatically exclude deprecated models
|
|
89
|
+
|
|
90
|
+
### Technical Implementation
|
|
91
|
+
|
|
92
|
+
- **New Module**: `src/lib/core/dynamic-models.ts` - Core dynamic model provider
|
|
93
|
+
- **Configuration**: `config/models.json` - Structured model definitions with metadata
|
|
94
|
+
- **Integration**: Updated `AIProviderFactory` to use dynamic models by default
|
|
95
|
+
- **Testing**: Comprehensive test suite (`test-dynamic-models.js`, `test-complete-integration.js`)
|
|
96
|
+
- **Server**: Fake hosted server for testing and development (`scripts/model-server.js`)
|
|
97
|
+
|
|
98
|
+
### API Enhancements
|
|
99
|
+
|
|
100
|
+
- **Environment Variables**: Added `GOOGLE_AI_API_KEY` for better compatibility
|
|
101
|
+
- **New Scripts**: `npm run model-server`, `npm run test:dynamic-models`
|
|
102
|
+
- **Model Search API**: RESTful endpoints for model discovery and filtering
|
|
103
|
+
- **Performance**: Sub-millisecond provider creation with intelligent caching
|
|
104
|
+
|
|
105
|
+
### Current Model Inventory
|
|
106
|
+
|
|
107
|
+
- **10 Active Models**: Across Anthropic, OpenAI, Google, and Bedrock
|
|
108
|
+
- **Cost Range**: $0.000075 - $0.075 per 1K input tokens (100x cost difference)
|
|
109
|
+
- **Capabilities**: Function-calling (9 models), Vision (7 models), Code-execution (1 model)
|
|
110
|
+
- **Deprecation Tracking**: 1 deprecated model (GPT-4 Turbo) automatically excluded
|
|
111
|
+
|
|
112
|
+
### Breaking Changes
|
|
113
|
+
|
|
114
|
+
- **MCP Default**: MCP tools now enabled by default in `AIProviderFactory.createProvider`
|
|
115
|
+
- **Environment**: Added `GOOGLE_AI_API_KEY` requirement for Google AI Studio
|
|
116
|
+
- **Model Resolution**: Some edge cases in model name resolution may behave differently
|
|
117
|
+
|
|
118
|
+
### Migration Notes
|
|
119
|
+
|
|
120
|
+
- **Backward Compatible**: Existing code continues to work with improved functionality
|
|
121
|
+
- **Optional Features**: Dynamic model features are additive and optional
|
|
122
|
+
- **Configuration**: No changes required to existing `.env` files
|
|
123
|
+
- **Performance**: Improved provider creation speed and reliability
|
|
124
|
+
|
|
125
|
+
## 1.7.1
|
|
126
|
+
|
|
127
|
+
### Bug Fixes - MCP System Restoration
|
|
128
|
+
|
|
129
|
+
- **🔧 Fixed Built-in Tool Loading**: Resolved critical circular dependency issues preventing default tools from loading
|
|
130
|
+
|
|
131
|
+
- **Root Cause**: Circular dependency between `config.ts` and `unified-registry.ts` preventing proper initialization
|
|
132
|
+
- **Solution**: Implemented dynamic imports and restructured initialization chain
|
|
133
|
+
- **Result**: Built-in tools restored from 0 → 3 tools (100% recovery rate)
|
|
134
|
+
|
|
135
|
+
- **⏰ Fixed Time Tool Functionality**: Time tool now properly available and returns accurate real-time data
|
|
136
|
+
|
|
137
|
+
- Fixed tool registration and execution pathway
|
|
138
|
+
- Proper timezone handling and formatting
|
|
139
|
+
- Verified accuracy against system time
|
|
140
|
+
|
|
141
|
+
- **🔍 Enhanced External Tool Discovery**: 58+ external MCP tools now discoverable via comprehensive auto-discovery
|
|
142
|
+
|
|
143
|
+
- Auto-discovery across VS Code, Claude Desktop, Cursor, Windsurf
|
|
144
|
+
- Proper placeholder system for lazy activation
|
|
145
|
+
- Unified registry integration
|
|
146
|
+
|
|
147
|
+
- **🏗️ Unified Registry Architecture**: Centralized tool management system now fully operational
|
|
148
|
+
- Seamless integration of built-in and external tools
|
|
149
|
+
- Proper initialization sequence and dependency management
|
|
150
|
+
- Enhanced debugging and status reporting
|
|
151
|
+
|
|
152
|
+
### Technical Changes
|
|
153
|
+
|
|
154
|
+
- Fixed circular dependency between core MCP modules
|
|
155
|
+
- Updated `initialize.ts` to use dynamic imports preventing startup issues
|
|
156
|
+
- Enhanced `loadDefaultRegistryTools()` to ensure proper built-in server registration
|
|
157
|
+
- Temporarily disabled AI core server to resolve complex dependencies (utility server fully working)
|
|
158
|
+
- Improved error handling and logging throughout MCP system
|
|
159
|
+
|
|
160
|
+
### Validation Results
|
|
161
|
+
|
|
162
|
+
- **Built-in Tools**: 3/3 working (get-current-time, calculate-date-difference, format-number)
|
|
163
|
+
- **External Discovery**: 58+ tools discovered across multiple MCP sources
|
|
164
|
+
- **Tool Execution**: Real-time AI tool calling verified and working
|
|
165
|
+
- **System Integration**: Full CLI and SDK integration operational
|
|
166
|
+
|
|
167
|
+
### Breaking Changes
|
|
168
|
+
|
|
169
|
+
- None - all changes are backward compatible improvements
|
|
170
|
+
|
|
171
|
+
### Migration Notes
|
|
172
|
+
|
|
173
|
+
- Existing MCP configurations continue to work
|
|
174
|
+
- Built-in tools now work automatically without additional setup
|
|
175
|
+
- External tools require proper MCP server configuration (as before)
|
|
176
|
+
|
|
177
|
+
## 1.7.0
|
|
178
|
+
|
|
179
|
+
### Patch Changes
|
|
180
|
+
|
|
181
|
+
- **🔧 Version Bump**: Updated version to 1.7.0 to publish the three-provider implementation
|
|
182
|
+
- All code changes were already included in 1.6.0 but not published
|
|
183
|
+
- This version publishes the complete implementation to npm
|
|
184
|
+
|
|
3
185
|
## 1.6.0
|
|
4
186
|
|
|
5
187
|
### Major Changes
|
|
@@ -12,6 +194,7 @@
|
|
|
12
194
|
### Features
|
|
13
195
|
|
|
14
196
|
- **🛠️ Enhanced CLI with Ollama Commands**: New Ollama-specific management commands
|
|
197
|
+
|
|
15
198
|
- `neurolink ollama list-models` - List installed local models
|
|
16
199
|
- `neurolink ollama pull <model>` - Download models locally
|
|
17
200
|
- `neurolink ollama remove <model>` - Remove installed models
|
|
@@ -36,12 +219,12 @@
|
|
|
36
219
|
|
|
37
220
|
### Provider Comparison
|
|
38
221
|
|
|
39
|
-
| Provider
|
|
40
|
-
|
|
41
|
-
| OpenAI
|
|
42
|
-
| Ollama
|
|
43
|
-
| Hugging Face | Open source
|
|
44
|
-
| Mistral
|
|
222
|
+
| Provider | Best For | Setup Time | Privacy | Cost |
|
|
223
|
+
| ------------ | ------------- | ---------- | ------- | ------- |
|
|
224
|
+
| OpenAI | General use | 2 min | Cloud | $$$ |
|
|
225
|
+
| Ollama | Privacy | 5 min | Local | Free |
|
|
226
|
+
| Hugging Face | Open source | 2 min | Cloud | Free/$$ |
|
|
227
|
+
| Mistral | EU compliance | 2 min | Cloud | $$ |
|
|
45
228
|
|
|
46
229
|
### Bug Fixes
|
|
47
230
|
|
|
@@ -92,12 +275,14 @@ neurolink generate-text "test" --debug
|
|
|
92
275
|
### Patch Changes
|
|
93
276
|
|
|
94
277
|
- **🔧 Production-Ready CLI Logging System**: Fixed critical logging system for clean production output
|
|
278
|
+
|
|
95
279
|
- **Issue**: CLI showed excessive debug output during normal operation, breaking demo presentations
|
|
96
280
|
- **Root Cause**: Mixed console.log statements bypassed conditional logger system
|
|
97
281
|
- **Solution**: Systematic replacement of all console.log with logger.debug across codebase
|
|
98
282
|
- **Impact**: **Clean CLI output by default** with conditional debug available via `NEUROLINK_DEBUG=true`
|
|
99
283
|
|
|
100
284
|
- **🔄 Enhanced Provider Fallback Logic**: Fixed incomplete provider fallback coverage
|
|
285
|
+
|
|
101
286
|
- **Issue**: Provider fallback only attempted 4 of 6 providers (missing Anthropic & Azure)
|
|
102
287
|
- **Root Cause**: Incomplete provider array in NeuroLink class fallback logic
|
|
103
288
|
- **Solution**: Updated to include all 6 providers: `['openai', 'vertex', 'bedrock', 'anthropic', 'azure', 'google-ai']`
|
|
@@ -141,6 +326,7 @@ NEUROLINK_DEBUG=true node dist/cli/cli/index.js generate-text "test" --max-token
|
|
|
141
326
|
### Patch Changes
|
|
142
327
|
|
|
143
328
|
- **🔧 Critical CLI Dependency Fix**: Removed peer dependencies to ensure zero-friction CLI usage
|
|
329
|
+
|
|
144
330
|
- **Issue**: CLI commands failed when provider-specific SDK packages were peer dependencies
|
|
145
331
|
- **Root Cause**: `npx` doesn't install peer dependencies, causing missing module errors
|
|
146
332
|
- **Solution**: Moved ALL AI provider SDKs to regular dependencies
|
|
@@ -198,7 +384,7 @@ docs/
|
|
|
198
384
|
|
|
199
385
|
```typescript
|
|
200
386
|
// New Google AI Studio usage
|
|
201
|
-
import { createBestAIProvider } from
|
|
387
|
+
import { createBestAIProvider } from "@juspay/neurolink";
|
|
202
388
|
|
|
203
389
|
const provider = createBestAIProvider(); // Auto-includes Google AI Studio
|
|
204
390
|
const result = await provider.generateText("Hello, Gemini!");
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://www.typescriptlang.org/)
|
|
8
8
|
[](https://github.com/juspay/neurolink/actions)
|
|
9
9
|
|
|
10
|
-
> Universal AI toolkit with
|
|
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
|
|
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
|
-
-
|
|
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
|
|
79
|
-
npx @juspay/neurolink generate-text "
|
|
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
204
|
- **[Provider Status Check](./docs/visual-content/cli-videos/cli-02-provider-status.mp4)** - Connectivity verification
|
|
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
|
|
160
|
-
|
|
161
|
-
| **OpenAI**
|
|
162
|
-
| **Google AI Studio** | Gemini 1.5/2.0 Flash/Pro
|
|
163
|
-
| **Amazon Bedrock**
|
|
164
|
-
| **Google Vertex AI** | Gemini 2.5 Flash
|
|
165
|
-
| **Anthropic**
|
|
166
|
-
| **Azure OpenAI**
|
|
167
|
-
| **Hugging Face** 🆕
|
|
168
|
-
| **Ollama** 🆕
|
|
169
|
-
| **Mistral AI** 🆕
|
|
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
|