@juspay/neurolink 6.2.1 → 7.0.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 +27 -16
- package/README.md +3 -3
- package/dist/cli/index.js +6 -6
- package/dist/cli/utils/{complete-setup.d.ts → completeSetup.d.ts} +1 -1
- package/dist/cli/utils/{complete-setup.js → completeSetup.js} +2 -2
- package/dist/{lib/core/base-provider.d.ts → core/baseProvider.d.ts} +1 -1
- package/dist/core/{base-provider.js → baseProvider.js} +2 -2
- package/dist/core/{dynamic-models.js → dynamicModels.js} +1 -1
- package/dist/core/evaluation.js +1 -1
- package/dist/core/factory.js +5 -5
- package/dist/core/types.d.ts +2 -2
- package/dist/{lib/factories/provider-registry.js → factories/providerRegistry.js} +9 -9
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/{core/base-provider.d.ts → lib/core/baseProvider.d.ts} +1 -1
- package/dist/lib/core/{base-provider.js → baseProvider.js} +2 -2
- package/dist/lib/core/{dynamic-models.js → dynamicModels.js} +1 -1
- package/dist/lib/core/evaluation.js +1 -1
- package/dist/lib/core/factory.js +3 -3
- package/dist/lib/core/types.d.ts +2 -2
- package/dist/{factories/provider-registry.js → lib/factories/providerRegistry.js} +9 -9
- package/dist/lib/index.d.ts +4 -4
- package/dist/lib/index.js +1 -1
- package/dist/lib/mcp/factory.d.ts +2 -2
- package/dist/lib/mcp/factory.js +2 -2
- package/dist/lib/mcp/servers/agent/{direct-tools-server.js → directToolsServer.js} +1 -1
- package/dist/lib/mcp/servers/{ai-providers/ai-core-server.js → aiProviders/aiCoreServer.js} +1 -1
- package/dist/lib/neurolink.d.ts +4 -4
- package/dist/lib/neurolink.js +4 -4
- package/dist/lib/providers/{amazon-bedrock.d.ts → amazonBedrock.d.ts} +2 -2
- package/dist/lib/providers/{amazon-bedrock.js → amazonBedrock.js} +1 -1
- package/dist/lib/providers/anthropic.d.ts +2 -2
- package/dist/lib/providers/anthropic.js +1 -1
- package/dist/{providers/anthropic-baseprovider.d.ts → lib/providers/anthropicBaseProvider.d.ts} +2 -2
- package/dist/lib/providers/{anthropic-baseprovider.js → anthropicBaseProvider.js} +1 -1
- package/dist/{providers/azure-openai.d.ts → lib/providers/azureOpenai.d.ts} +2 -2
- package/dist/{providers/azure-openai.js → lib/providers/azureOpenai.js} +1 -1
- package/dist/{providers/google-ai-studio.d.ts → lib/providers/googleAiStudio.d.ts} +2 -2
- package/dist/lib/providers/{google-ai-studio.js → googleAiStudio.js} +1 -1
- package/dist/{providers/google-vertex.d.ts → lib/providers/googleVertex.d.ts} +2 -2
- package/dist/lib/providers/{google-vertex.js → googleVertex.js} +1 -1
- package/dist/lib/providers/huggingFace.d.ts +2 -2
- package/dist/lib/providers/huggingFace.js +1 -1
- package/dist/lib/providers/index.d.ts +4 -4
- package/dist/lib/providers/index.js +4 -4
- package/dist/lib/providers/mistral.d.ts +2 -2
- package/dist/lib/providers/mistral.js +1 -1
- package/dist/lib/providers/ollama.d.ts +2 -2
- package/dist/lib/providers/ollama.js +1 -1
- package/dist/lib/providers/openAI.d.ts +2 -2
- package/dist/lib/providers/openAI.js +1 -1
- package/dist/{sdk/tool-registration.d.ts → lib/sdk/toolRegistration.d.ts} +1 -1
- package/dist/lib/telemetry/index.d.ts +2 -2
- package/dist/lib/telemetry/index.js +3 -3
- package/dist/lib/utils/providerConfig.js +1 -1
- package/dist/lib/utils/{provider-setup-messages.js → providerSetupMessages.js} +1 -1
- package/dist/lib/utils/providerUtils.js +1 -1
- package/dist/mcp/factory.d.ts +2 -2
- package/dist/mcp/factory.js +2 -2
- package/dist/mcp/servers/agent/{direct-tools-server.js → directToolsServer.js} +1 -1
- package/dist/mcp/servers/{ai-providers/ai-core-server.js → aiProviders/aiCoreServer.js} +2 -2
- package/dist/neurolink.d.ts +5 -5
- package/dist/neurolink.js +4 -4
- package/dist/providers/{amazon-bedrock.d.ts → amazonBedrock.d.ts} +2 -2
- package/dist/providers/{amazon-bedrock.js → amazonBedrock.js} +1 -1
- package/dist/providers/anthropic.d.ts +2 -2
- package/dist/providers/anthropic.js +1 -1
- package/dist/{lib/providers/anthropic-baseprovider.d.ts → providers/anthropicBaseProvider.d.ts} +2 -2
- package/dist/providers/{anthropic-baseprovider.js → anthropicBaseProvider.js} +1 -1
- package/dist/{lib/providers/azure-openai.d.ts → providers/azureOpenai.d.ts} +2 -2
- package/dist/{lib/providers/azure-openai.js → providers/azureOpenai.js} +1 -1
- package/dist/{lib/providers/google-ai-studio.d.ts → providers/googleAiStudio.d.ts} +2 -2
- package/dist/providers/{google-ai-studio.js → googleAiStudio.js} +2 -2
- package/dist/{lib/providers/google-vertex.d.ts → providers/googleVertex.d.ts} +2 -2
- package/dist/providers/{google-vertex.js → googleVertex.js} +1 -1
- package/dist/providers/huggingFace.d.ts +2 -2
- package/dist/providers/huggingFace.js +1 -1
- package/dist/providers/index.d.ts +4 -4
- package/dist/providers/index.js +4 -4
- package/dist/providers/mistral.d.ts +2 -2
- package/dist/providers/mistral.js +1 -1
- package/dist/providers/ollama.d.ts +2 -2
- package/dist/providers/ollama.js +1 -1
- package/dist/providers/openAI.d.ts +2 -2
- package/dist/providers/openAI.js +1 -1
- package/dist/{lib/sdk/tool-registration.d.ts → sdk/toolRegistration.d.ts} +1 -1
- package/dist/telemetry/index.d.ts +2 -2
- package/dist/telemetry/index.js +3 -3
- package/dist/utils/providerConfig.js +1 -1
- package/dist/utils/{provider-setup-messages.js → providerSetupMessages.js} +1 -1
- package/dist/utils/providerUtils.js +1 -1
- package/package.json +23 -22
- /package/dist/agent/{direct-tools.d.ts → directTools.d.ts} +0 -0
- /package/dist/agent/{direct-tools.js → directTools.js} +0 -0
- /package/dist/cli/factories/{command-factory.d.ts → commandFactory.d.ts} +0 -0
- /package/dist/cli/factories/{command-factory.js → commandFactory.js} +0 -0
- /package/dist/cli/utils/{env-manager.d.ts → envManager.d.ts} +0 -0
- /package/dist/cli/utils/{env-manager.js → envManager.js} +0 -0
- /package/dist/cli/utils/{interactive-setup.d.ts → interactiveSetup.d.ts} +0 -0
- /package/dist/cli/utils/{interactive-setup.js → interactiveSetup.js} +0 -0
- /package/dist/core/{dynamic-models.d.ts → dynamicModels.d.ts} +0 -0
- /package/dist/core/{evaluation-providers.d.ts → evaluationProviders.d.ts} +0 -0
- /package/dist/core/{evaluation-providers.js → evaluationProviders.js} +0 -0
- /package/dist/core/{service-registry.d.ts → serviceRegistry.d.ts} +0 -0
- /package/dist/core/{service-registry.js → serviceRegistry.js} +0 -0
- /package/dist/factories/{provider-factory.d.ts → providerFactory.d.ts} +0 -0
- /package/dist/factories/{provider-factory.js → providerFactory.js} +0 -0
- /package/dist/factories/{provider-registry.d.ts → providerRegistry.d.ts} +0 -0
- /package/dist/lib/agent/{direct-tools.d.ts → directTools.d.ts} +0 -0
- /package/dist/lib/agent/{direct-tools.js → directTools.js} +0 -0
- /package/dist/lib/core/{dynamic-models.d.ts → dynamicModels.d.ts} +0 -0
- /package/dist/lib/core/{evaluation-providers.d.ts → evaluationProviders.d.ts} +0 -0
- /package/dist/lib/core/{evaluation-providers.js → evaluationProviders.js} +0 -0
- /package/dist/lib/core/{service-registry.d.ts → serviceRegistry.d.ts} +0 -0
- /package/dist/lib/core/{service-registry.js → serviceRegistry.js} +0 -0
- /package/dist/lib/factories/{provider-factory.d.ts → providerFactory.d.ts} +0 -0
- /package/dist/lib/factories/{provider-factory.js → providerFactory.js} +0 -0
- /package/dist/lib/factories/{provider-registry.d.ts → providerRegistry.d.ts} +0 -0
- /package/dist/lib/mcp/servers/agent/{direct-tools-server.d.ts → directToolsServer.d.ts} +0 -0
- /package/dist/lib/mcp/servers/{ai-providers/ai-analysis-tools.d.ts → aiProviders/aiAnalysisTools.d.ts} +0 -0
- /package/dist/lib/mcp/servers/{ai-providers/ai-analysis-tools.js → aiProviders/aiAnalysisTools.js} +0 -0
- /package/dist/lib/mcp/servers/{ai-providers/ai-core-server.d.ts → aiProviders/aiCoreServer.d.ts} +0 -0
- /package/dist/lib/mcp/servers/{ai-providers/ai-workflow-tools.d.ts → aiProviders/aiWorkflowTools.d.ts} +0 -0
- /package/dist/lib/mcp/servers/{ai-providers/ai-workflow-tools.js → aiProviders/aiWorkflowTools.js} +0 -0
- /package/dist/lib/mcp/servers/utilities/{utility-server.d.ts → utilityServer.d.ts} +0 -0
- /package/dist/lib/mcp/servers/utilities/{utility-server.js → utilityServer.js} +0 -0
- /package/dist/lib/mcp/{tool-registry.d.ts → toolRegistry.d.ts} +0 -0
- /package/dist/lib/mcp/{tool-registry.js → toolRegistry.js} +0 -0
- /package/dist/lib/proxy/{proxy-fetch.d.ts → proxyFetch.d.ts} +0 -0
- /package/dist/lib/proxy/{proxy-fetch.js → proxyFetch.js} +0 -0
- /package/dist/lib/sdk/{tool-registration.js → toolRegistration.js} +0 -0
- /package/dist/lib/telemetry/{telemetry-service.d.ts → telemetryService.d.ts} +0 -0
- /package/dist/lib/telemetry/{telemetry-service.js → telemetryService.js} +0 -0
- /package/dist/lib/types/{generate-types.d.ts → generateTypes.d.ts} +0 -0
- /package/dist/lib/types/{generate-types.js → generateTypes.js} +0 -0
- /package/dist/lib/types/{mcp-types.d.ts → mcpTypes.d.ts} +0 -0
- /package/dist/lib/types/{mcp-types.js → mcpTypes.js} +0 -0
- /package/dist/lib/types/{stream-types.d.ts → streamTypes.d.ts} +0 -0
- /package/dist/lib/types/{stream-types.js → streamTypes.js} +0 -0
- /package/dist/lib/types/{universal-provider-options.d.ts → universalProviderOptions.d.ts} +0 -0
- /package/dist/lib/types/{universal-provider-options.js → universalProviderOptions.js} +0 -0
- /package/dist/lib/utils/{provider-setup-messages.d.ts → providerSetupMessages.d.ts} +0 -0
- /package/dist/mcp/servers/agent/{direct-tools-server.d.ts → directToolsServer.d.ts} +0 -0
- /package/dist/mcp/servers/{ai-providers/ai-analysis-tools.d.ts → aiProviders/aiAnalysisTools.d.ts} +0 -0
- /package/dist/mcp/servers/{ai-providers/ai-analysis-tools.js → aiProviders/aiAnalysisTools.js} +0 -0
- /package/dist/mcp/servers/{ai-providers/ai-core-server.d.ts → aiProviders/aiCoreServer.d.ts} +0 -0
- /package/dist/mcp/servers/{ai-providers/ai-workflow-tools.d.ts → aiProviders/aiWorkflowTools.d.ts} +0 -0
- /package/dist/mcp/servers/{ai-providers/ai-workflow-tools.js → aiProviders/aiWorkflowTools.js} +0 -0
- /package/dist/mcp/servers/utilities/{utility-server.d.ts → utilityServer.d.ts} +0 -0
- /package/dist/mcp/servers/utilities/{utility-server.js → utilityServer.js} +0 -0
- /package/dist/mcp/{tool-registry.d.ts → toolRegistry.d.ts} +0 -0
- /package/dist/mcp/{tool-registry.js → toolRegistry.js} +0 -0
- /package/dist/proxy/{proxy-fetch.d.ts → proxyFetch.d.ts} +0 -0
- /package/dist/proxy/{proxy-fetch.js → proxyFetch.js} +0 -0
- /package/dist/sdk/{tool-registration.js → toolRegistration.js} +0 -0
- /package/dist/telemetry/{telemetry-service.d.ts → telemetryService.d.ts} +0 -0
- /package/dist/telemetry/{telemetry-service.js → telemetryService.js} +0 -0
- /package/dist/types/{generate-types.d.ts → generateTypes.d.ts} +0 -0
- /package/dist/types/{generate-types.js → generateTypes.js} +0 -0
- /package/dist/types/{mcp-types.d.ts → mcpTypes.d.ts} +0 -0
- /package/dist/types/{mcp-types.js → mcpTypes.js} +0 -0
- /package/dist/types/{stream-types.d.ts → streamTypes.d.ts} +0 -0
- /package/dist/types/{stream-types.js → streamTypes.js} +0 -0
- /package/dist/types/{universal-provider-options.d.ts → universalProviderOptions.d.ts} +0 -0
- /package/dist/types/{universal-provider-options.js → universalProviderOptions.js} +0 -0
- /package/dist/utils/{provider-setup-messages.d.ts → providerSetupMessages.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
# [7.0.0](https://github.com/juspay/neurolink/compare/v6.2.1...v7.0.0) (2025-07-31)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Code Refactoring
|
|
5
|
+
|
|
6
|
+
* **structure:** standardize all filenames and directories to camelCase ([656d094](https://github.com/juspay/neurolink/commit/656d094ac5f6caeecb4aebbfbe3f49f75f1adc4a))
|
|
7
|
+
|
|
2
8
|
|
|
9
|
+
### BREAKING CHANGES
|
|
10
|
+
|
|
11
|
+
* **structure:** None - all functionality preserved, only naming conventions updated
|
|
12
|
+
|
|
13
|
+
## [6.2.1](https://github.com/juspay/neurolink/compare/v6.2.0...v6.2.1) (2025-07-31)
|
|
3
14
|
|
|
4
15
|
### Bug Fixes
|
|
5
16
|
|
|
6
|
-
|
|
17
|
+
- **logging:** consolidate MCP logging and add debug flag control ([ea0132d](https://github.com/juspay/neurolink/commit/ea0132dd954966cb42238dc3736f6cee9cc7b18d))
|
|
7
18
|
|
|
8
19
|
# [6.2.0](https://github.com/juspay/neurolink/compare/v6.1.0...v6.2.0) (2025-07-30)
|
|
9
20
|
|
|
@@ -36,22 +47,22 @@ NeuroLink codebase, affecting 140+ files with systematic type safety improvement
|
|
|
36
47
|
- NEW: src/lib/types/cli.ts - CLI command types and interfaces
|
|
37
48
|
- NEW: src/lib/types/index.ts - Centralized type exports
|
|
38
49
|
|
|
39
|
-
- Export NeuroLinkSDK interface from
|
|
40
|
-
- Fix all provider constructors: anthropic,
|
|
41
|
-
- Update
|
|
50
|
+
- Export NeuroLinkSDK interface from baseProvider for proper typing
|
|
51
|
+
- Fix all provider constructors: anthropic, azureOpenai, googleAiStudio, googleVertex, mistral
|
|
52
|
+
- Update functionCalling-provider with proper type casting
|
|
42
53
|
- Enhanced analytics-helper with comprehensive type guards
|
|
43
54
|
- Fix timeout-wrapper and all provider error handling
|
|
44
55
|
|
|
45
|
-
- Fix
|
|
46
|
-
- Fix
|
|
56
|
+
- Fix directToolsServer: inputSchema and execution result types
|
|
57
|
+
- Fix aiCoreServer: provider factory and result access types
|
|
47
58
|
- Fix transport-manager: HTTP client transport constructor types
|
|
48
59
|
- Fix unified-registry: server configuration type compatibility
|
|
49
60
|
- Update all MCP adapters, clients, managers, and orchestrators
|
|
50
61
|
- Fix tool integration, registry, and session management
|
|
51
62
|
- Enhanced error handling and recovery systems
|
|
52
63
|
|
|
53
|
-
- Update
|
|
54
|
-
- Fix
|
|
64
|
+
- Update baseProvider with proper abstract method signatures
|
|
65
|
+
- Fix serviceRegistry with type-safe service management
|
|
55
66
|
- Enhanced factory pattern with proper generic constraints
|
|
56
67
|
- Update evaluation system with strict typing
|
|
57
68
|
- Fix analytics core with proper data flow types
|
|
@@ -365,7 +376,7 @@ Co-authored-by: sachin.sharma <sachin.sharma@juspay.in>
|
|
|
365
376
|
- **💰 Cost Intelligence**: Built-in cost optimization and model selection algorithms
|
|
366
377
|
|
|
367
378
|
- **Current Leader**: Gemini 2.0 Flash at $0.000075/1K input tokens
|
|
368
|
-
- **Capability Mapping**: Find models by features (
|
|
379
|
+
- **Capability Mapping**: Find models by features (functionCalling, vision, code-execution)
|
|
369
380
|
- **Real-Time Pricing**: Always current model costs and performance data
|
|
370
381
|
- **Budget Controls**: Maximum price filtering and cost-aware selection
|
|
371
382
|
|
|
@@ -384,16 +395,16 @@ Co-authored-by: sachin.sharma <sachin.sharma@juspay.in>
|
|
|
384
395
|
|
|
385
396
|
### Technical Implementation
|
|
386
397
|
|
|
387
|
-
- **New Module**: `src/lib/core/
|
|
398
|
+
- **New Module**: `src/lib/core/dynamicModels.ts` - Core dynamic model provider
|
|
388
399
|
- **Configuration**: `config/models.json` - Structured model definitions with metadata
|
|
389
400
|
- **Integration**: Updated `AIProviderFactory` to use dynamic models by default
|
|
390
|
-
- **Testing**: Comprehensive test suite (`test-
|
|
401
|
+
- **Testing**: Comprehensive test suite (`test-dynamicModels.js`, `test-complete-integration.js`)
|
|
391
402
|
- **Server**: Fake hosted server for testing and development (`scripts/model-server.js`)
|
|
392
403
|
|
|
393
404
|
### API Enhancements
|
|
394
405
|
|
|
395
406
|
- **Environment Variables**: Added `GOOGLE_AI_API_KEY` for better compatibility
|
|
396
|
-
- **New Scripts**: `npm run model-server`, `npm run test:
|
|
407
|
+
- **New Scripts**: `npm run model-server`, `npm run test:dynamicModels`
|
|
397
408
|
- **Model Search API**: RESTful endpoints for model discovery and filtering
|
|
398
409
|
- **Performance**: Sub-millisecond provider creation with intelligent caching
|
|
399
410
|
|
|
@@ -584,7 +595,7 @@ neurolink generate-text "test" --debug
|
|
|
584
595
|
- **Impact**: **100% provider coverage** with comprehensive fallback for maximum reliability
|
|
585
596
|
|
|
586
597
|
- **🧹 Console Statement Cleanup**: Systematic cleanup of debug output across entire codebase
|
|
587
|
-
- **Files Updated**: `src/lib/neurolink.ts`, `src/lib/core/factory.ts`, `src/lib/providers/openAI.ts`, `src/lib/mcp/servers/
|
|
598
|
+
- **Files Updated**: `src/lib/neurolink.ts`, `src/lib/core/factory.ts`, `src/lib/providers/openAI.ts`, `src/lib/mcp/servers/aiProviders/aiCoreServer.ts`
|
|
588
599
|
- **Pattern**: Replaced 200+ `console.log()` statements with `logger.debug()` calls
|
|
589
600
|
- **Result**: Professional CLI behavior suitable for production deployment and demos
|
|
590
601
|
|
|
@@ -808,8 +819,8 @@ src/lib/mcp/
|
|
|
808
819
|
├── context-manager.ts # Rich context (15+ fields) + tool chain tracking
|
|
809
820
|
├── registry.ts # Tool discovery, registration, execution + statistics
|
|
810
821
|
├── orchestrator.ts # Single tools + sequential pipelines + error handling
|
|
811
|
-
└── servers/
|
|
812
|
-
└──
|
|
822
|
+
└── servers/aiProviders/ # AI Core Server with 3 tools integrated
|
|
823
|
+
└── aiCoreServer.ts # generate-text, select-provider, check-provider-status
|
|
813
824
|
```
|
|
814
825
|
|
|
815
826
|
### Breaking Changes
|
package/README.md
CHANGED
|
@@ -351,7 +351,7 @@ NeuroLink now features a revolutionary dynamic model configuration system that e
|
|
|
351
351
|
|
|
352
352
|
- **🔄 Self-Updating**: New models automatically available without code updates
|
|
353
353
|
- **💰 Cost-Optimized**: Automatic selection of cheapest models for tasks
|
|
354
|
-
- **🔍 Smart Search**: Find models by capabilities (
|
|
354
|
+
- **🔍 Smart Search**: Find models by capabilities (functionCalling, vision, etc.)
|
|
355
355
|
- **🏷️ Alias Support**: Use friendly names like "claude-latest" or "best-coding"
|
|
356
356
|
- **📊 Real-Time Pricing**: Always current model costs and performance data
|
|
357
357
|
|
|
@@ -369,14 +369,14 @@ npx @juspay/neurolink gen "Write code" --model best-coding
|
|
|
369
369
|
|
|
370
370
|
# Test dynamic model server
|
|
371
371
|
npm run model-server # Starts config server on localhost:3001
|
|
372
|
-
npm run test:
|
|
372
|
+
npm run test:dynamicModels # Comprehensive test suite
|
|
373
373
|
```
|
|
374
374
|
|
|
375
375
|
### 📊 Current Model Inventory (Auto-Updated)
|
|
376
376
|
|
|
377
377
|
- **10 active models** across 4 providers
|
|
378
378
|
- **Cheapest**: Gemini 2.0 Flash ($0.000075/1K tokens)
|
|
379
|
-
- **Most capable**: Claude 3 Opus (
|
|
379
|
+
- **Most capable**: Claude 3 Opus (functionCalling + vision + analysis)
|
|
380
380
|
- **Best for coding**: Claude 3 Opus, Gemini 2.0 Flash
|
|
381
381
|
- **1 deprecated model** automatically excluded
|
|
382
382
|
|
package/dist/cli/index.js
CHANGED
|
@@ -191,7 +191,7 @@ function handleError(error, context) {
|
|
|
191
191
|
// Initialize MCP system for CLI with manual config enabled
|
|
192
192
|
async function initializeCLI() {
|
|
193
193
|
// Import and configure for CLI mode
|
|
194
|
-
const { ProviderRegistry } = await import("../lib/factories/
|
|
194
|
+
const { ProviderRegistry } = await import("../lib/factories/providerRegistry.js");
|
|
195
195
|
// Enable manual MCP only for CLI
|
|
196
196
|
ProviderRegistry.setOptions({
|
|
197
197
|
enableManualMCP: true,
|
|
@@ -308,7 +308,7 @@ const cli = yargs(args)
|
|
|
308
308
|
"openai",
|
|
309
309
|
"bedrock",
|
|
310
310
|
"vertex",
|
|
311
|
-
"
|
|
311
|
+
"googleVertex",
|
|
312
312
|
"anthropic",
|
|
313
313
|
"azure",
|
|
314
314
|
"google-ai",
|
|
@@ -622,7 +622,7 @@ const cli = yargs(args)
|
|
|
622
622
|
"openai",
|
|
623
623
|
"bedrock",
|
|
624
624
|
"vertex",
|
|
625
|
-
"
|
|
625
|
+
"googleVertex",
|
|
626
626
|
"anthropic",
|
|
627
627
|
"azure",
|
|
628
628
|
"google-ai",
|
|
@@ -779,7 +779,7 @@ const cli = yargs(args)
|
|
|
779
779
|
"openai",
|
|
780
780
|
"bedrock",
|
|
781
781
|
"vertex",
|
|
782
|
-
"
|
|
782
|
+
"googleVertex",
|
|
783
783
|
"anthropic",
|
|
784
784
|
"azure",
|
|
785
785
|
"google-ai",
|
|
@@ -919,7 +919,7 @@ const cli = yargs(args)
|
|
|
919
919
|
"openai",
|
|
920
920
|
"bedrock",
|
|
921
921
|
"vertex",
|
|
922
|
-
"
|
|
922
|
+
"googleVertex",
|
|
923
923
|
"anthropic",
|
|
924
924
|
"azure",
|
|
925
925
|
"google-ai",
|
|
@@ -1086,7 +1086,7 @@ const cli = yargs(args)
|
|
|
1086
1086
|
.example("$0 status", "Quick provider status check")
|
|
1087
1087
|
.example("$0 status --verbose", "Show detailed status information"), async (argv) => {
|
|
1088
1088
|
// Direct implementation instead of redirect to avoid recursion
|
|
1089
|
-
const { CLICommandFactory } = await import("./factories/
|
|
1089
|
+
const { CLICommandFactory } = await import("./factories/commandFactory.js");
|
|
1090
1090
|
const commandFactory = new CLICommandFactory();
|
|
1091
1091
|
await commandFactory.executeProviderStatus(argv);
|
|
1092
1092
|
})
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Orchestrates the entire setup process: interactive wizard, environment management,
|
|
5
5
|
* provider testing, and summary display.
|
|
6
6
|
*/
|
|
7
|
-
import { type SetupResult } from "./
|
|
7
|
+
import { type SetupResult } from "./interactiveSetup.js";
|
|
8
8
|
/**
|
|
9
9
|
* Run the complete interactive setup process
|
|
10
10
|
*/
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Orchestrates the entire setup process: interactive wizard, environment management,
|
|
5
5
|
* provider testing, and summary display.
|
|
6
6
|
*/
|
|
7
|
-
import { runInteractiveSetup, testProviderConnectivity, displaySetupSummary, } from "./
|
|
8
|
-
import { updateEnvFile, displayEnvUpdateSummary } from "./
|
|
7
|
+
import { runInteractiveSetup, testProviderConnectivity, displaySetupSummary, } from "./interactiveSetup.js";
|
|
8
|
+
import { updateEnvFile, displayEnvUpdateSummary } from "./envManager.js";
|
|
9
9
|
import chalk from "chalk";
|
|
10
10
|
/**
|
|
11
11
|
* Run the complete interactive setup process
|
|
@@ -2,7 +2,7 @@ import type { ZodType, ZodTypeDef } from "zod";
|
|
|
2
2
|
import type { Schema } from "ai";
|
|
3
3
|
import type { Tool, LanguageModel } from "ai";
|
|
4
4
|
import type { AIProvider, TextGenerationOptions, EnhancedGenerateResult, AnalyticsData, AIProviderName, EvaluationData } from "../core/types.js";
|
|
5
|
-
import type { StreamOptions, StreamResult } from "../types/
|
|
5
|
+
import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
|
|
6
6
|
import type { JsonValue, UnknownRecord } from "../types/common.js";
|
|
7
7
|
import type { ToolResult } from "../types/tools.js";
|
|
8
8
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { logger } from "../utils/logger.js";
|
|
2
|
-
import { directAgentTools } from "../agent/
|
|
2
|
+
import { directAgentTools } from "../agent/directTools.js";
|
|
3
3
|
/**
|
|
4
4
|
* Validates if a result contains a valid toolsObject structure
|
|
5
5
|
* @param result - The result object to validate
|
|
@@ -260,7 +260,7 @@ export class BaseProvider {
|
|
|
260
260
|
// Not an error - custom tools are optional
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
|
-
// MCP tools loading simplified - removed
|
|
263
|
+
// MCP tools loading simplified - removed functionCalling dependency
|
|
264
264
|
if (!this.mcpTools) {
|
|
265
265
|
// Set empty tools object - MCP tools are handled at a higher level
|
|
266
266
|
this.mcpTools = {};
|
|
@@ -163,7 +163,7 @@ export class DynamicModelProvider {
|
|
|
163
163
|
this.ensureInitialized();
|
|
164
164
|
switch (useCase) {
|
|
165
165
|
case "coding":
|
|
166
|
-
return (this.searchByCapability("
|
|
166
|
+
return (this.searchByCapability("functionCalling", {
|
|
167
167
|
excludeDeprecated: true,
|
|
168
168
|
})[0] || null);
|
|
169
169
|
case "analysis":
|
package/dist/core/evaluation.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { logger } from "../utils/logger.js";
|
|
5
5
|
import { AIProviderFactory } from "./factory.js";
|
|
6
6
|
import { z } from "zod";
|
|
7
|
-
import { ProviderRegistry } from "../factories/
|
|
7
|
+
import { ProviderRegistry } from "../factories/providerRegistry.js";
|
|
8
8
|
// Zod schema for validation
|
|
9
9
|
const UnifiedEvaluationSchema = z.object({
|
|
10
10
|
relevance: z.number().min(1).max(10),
|
package/dist/core/factory.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// ✅ CIRCULAR DEPENDENCY FIX: Remove barrel export import
|
|
2
2
|
// Providers are now managed via ProviderFactory instead of direct imports
|
|
3
|
-
import { ProviderFactory } from "../factories/
|
|
4
|
-
import { ProviderRegistry } from "../factories/
|
|
3
|
+
import { ProviderFactory } from "../factories/providerFactory.js";
|
|
4
|
+
import { ProviderRegistry } from "../factories/providerRegistry.js";
|
|
5
5
|
import { getBestProvider } from "../utils/providerUtils.js";
|
|
6
6
|
import { logger } from "../utils/logger.js";
|
|
7
|
-
import { dynamicModelProvider } from "./
|
|
7
|
+
import { dynamicModelProvider } from "./dynamicModels.js";
|
|
8
8
|
const componentIdentifier = "aiProviderFactory";
|
|
9
9
|
/**
|
|
10
10
|
* Factory for creating AI provider instances with centralized configuration
|
|
@@ -104,8 +104,8 @@ export class AIProviderFactory {
|
|
|
104
104
|
// Wrap with MCP if enabled
|
|
105
105
|
if (enableMCP) {
|
|
106
106
|
try {
|
|
107
|
-
logger.debug(`[${functionTag}] MCP wrapping disabled -
|
|
108
|
-
// MCP wrapping simplified - removed
|
|
107
|
+
logger.debug(`[${functionTag}] MCP wrapping disabled - functionCalling removed`);
|
|
108
|
+
// MCP wrapping simplified - removed functionCalling dependency
|
|
109
109
|
}
|
|
110
110
|
catch (mcpError) {
|
|
111
111
|
logger.warn(`[${functionTag}] Failed to wrap with MCP, using base provider`, {
|
package/dist/core/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ZodType, ZodTypeDef } from "zod";
|
|
2
2
|
import type { Schema, Tool } from "ai";
|
|
3
|
-
import type { GenerateResult } from "../types/
|
|
4
|
-
import type { StreamOptions, StreamResult } from "../types/
|
|
3
|
+
import type { GenerateResult } from "../types/generateTypes.js";
|
|
4
|
+
import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
|
|
5
5
|
import type { JsonValue } from "../types/common.js";
|
|
6
6
|
export interface TextGenerationResult {
|
|
7
7
|
content: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ProviderFactory } from "./
|
|
1
|
+
import { ProviderFactory } from "./providerFactory.js";
|
|
2
2
|
// ✅ FINAL CIRCULAR DEPENDENCY FIX: Lazy loading all providers
|
|
3
3
|
// Removed all static imports - providers loaded dynamically when needed
|
|
4
4
|
// This breaks the circular dependency chain completely
|
|
@@ -22,12 +22,12 @@ export class ProviderRegistry {
|
|
|
22
22
|
}
|
|
23
23
|
try {
|
|
24
24
|
// ✅ LAZY LOADING: Register providers with dynamic import factory functions
|
|
25
|
-
const { ProviderFactory } = await import("./
|
|
25
|
+
const { ProviderFactory } = await import("./providerFactory.js");
|
|
26
26
|
// Register Google AI Studio Provider (our validated baseline)
|
|
27
27
|
ProviderFactory.registerProvider(AIProviderName.GOOGLE_AI, async (modelName, providerName, sdk) => {
|
|
28
|
-
const { GoogleAIStudioProvider } = await import("../providers/
|
|
28
|
+
const { GoogleAIStudioProvider } = await import("../providers/googleAiStudio.js");
|
|
29
29
|
return new GoogleAIStudioProvider(modelName, sdk);
|
|
30
|
-
}, GoogleAIModels.GEMINI_2_5_FLASH, ["
|
|
30
|
+
}, GoogleAIModels.GEMINI_2_5_FLASH, ["googleAiStudio", "google", "gemini", "google-ai"]);
|
|
31
31
|
// Register OpenAI provider
|
|
32
32
|
ProviderFactory.registerProvider(AIProviderName.OPENAI, async (modelName, providerName, sdk) => {
|
|
33
33
|
const { OpenAIProvider } = await import("../providers/openAI.js");
|
|
@@ -40,20 +40,20 @@ export class ProviderRegistry {
|
|
|
40
40
|
}, "claude-3-5-sonnet-20241022", ["claude", "anthropic"]);
|
|
41
41
|
// Register Amazon Bedrock provider
|
|
42
42
|
ProviderFactory.registerProvider(AIProviderName.BEDROCK, async (modelName) => {
|
|
43
|
-
const { AmazonBedrockProvider } = await import("../providers/
|
|
43
|
+
const { AmazonBedrockProvider } = await import("../providers/amazonBedrock.js");
|
|
44
44
|
return new AmazonBedrockProvider(modelName);
|
|
45
45
|
}, undefined, // Let provider read BEDROCK_MODEL from .env
|
|
46
46
|
["bedrock", "aws"]);
|
|
47
47
|
// Register Azure OpenAI provider
|
|
48
48
|
ProviderFactory.registerProvider(AIProviderName.AZURE, async (modelName) => {
|
|
49
|
-
const { AzureOpenAIProvider } = await import("../providers/
|
|
49
|
+
const { AzureOpenAIProvider } = await import("../providers/azureOpenai.js");
|
|
50
50
|
return new AzureOpenAIProvider(modelName);
|
|
51
|
-
}, "gpt-4o-mini", ["azure", "
|
|
51
|
+
}, "gpt-4o-mini", ["azure", "azureOpenai"]);
|
|
52
52
|
// Register Google Vertex AI provider
|
|
53
53
|
ProviderFactory.registerProvider(AIProviderName.VERTEX, async (modelName) => {
|
|
54
|
-
const { GoogleVertexProvider } = await import("../providers/
|
|
54
|
+
const { GoogleVertexProvider } = await import("../providers/googleVertex.js");
|
|
55
55
|
return new GoogleVertexProvider(modelName);
|
|
56
|
-
}, "gemini-2.5-pro", ["vertex", "
|
|
56
|
+
}, "gemini-2.5-pro", ["vertex", "googleVertex"]);
|
|
57
57
|
// Register Hugging Face provider (Unified Router implementation)
|
|
58
58
|
ProviderFactory.registerProvider(AIProviderName.HUGGINGFACE, async (modelName) => {
|
|
59
59
|
const { HuggingFaceProvider } = await import("../providers/huggingFace.js");
|
package/dist/index.d.ts
CHANGED
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
import { AIProviderFactory } from "./core/factory.js";
|
|
10
10
|
export { AIProviderFactory };
|
|
11
11
|
export type { AIProvider, AIProviderName, ProviderConfig, StreamingOptions, ProviderAttempt, SupportedModelName, } from "./core/types.js";
|
|
12
|
-
export type { GenerateOptions, GenerateResult, EnhancedProvider, } from "./types/
|
|
13
|
-
export type { SimpleTool, ToolContext } from "./sdk/
|
|
14
|
-
export { createTool, createTypedTool, validateTool, } from "./sdk/
|
|
15
|
-
export type { InMemoryMCPServerConfig, InMemoryToolInfo, InMemoryToolResult, } from "./types/
|
|
12
|
+
export type { GenerateOptions, GenerateResult, EnhancedProvider, } from "./types/generateTypes.js";
|
|
13
|
+
export type { SimpleTool, ToolContext } from "./sdk/toolRegistration.js";
|
|
14
|
+
export { createTool, createTypedTool, validateTool, } from "./sdk/toolRegistration.js";
|
|
15
|
+
export type { InMemoryMCPServerConfig, InMemoryToolInfo, InMemoryToolResult, } from "./types/mcpTypes.js";
|
|
16
16
|
export { BedrockModels, OpenAIModels, VertexModels, DEFAULT_PROVIDER_CONFIGS, } from "./core/types.js";
|
|
17
17
|
export { getBestProvider, getAvailableProviders, isValidProvider, } from "./utils/providerUtils.js";
|
|
18
18
|
export { NeuroLink } from "./neurolink.js";
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// Core exports
|
|
10
10
|
import { AIProviderFactory } from "./core/factory.js";
|
|
11
11
|
export { AIProviderFactory };
|
|
12
|
-
export { createTool, createTypedTool, validateTool, } from "./sdk/
|
|
12
|
+
export { createTool, createTypedTool, validateTool, } from "./sdk/toolRegistration.js";
|
|
13
13
|
// Model enums
|
|
14
14
|
export { BedrockModels, OpenAIModels, VertexModels, DEFAULT_PROVIDER_CONFIGS, } from "./core/types.js";
|
|
15
15
|
// Utility exports
|
|
@@ -2,7 +2,7 @@ import type { ZodType, ZodTypeDef } from "zod";
|
|
|
2
2
|
import type { Schema } from "ai";
|
|
3
3
|
import type { Tool, LanguageModel } from "ai";
|
|
4
4
|
import type { AIProvider, TextGenerationOptions, EnhancedGenerateResult, AnalyticsData, AIProviderName, EvaluationData } from "../core/types.js";
|
|
5
|
-
import type { StreamOptions, StreamResult } from "../types/
|
|
5
|
+
import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
|
|
6
6
|
import type { JsonValue, UnknownRecord } from "../types/common.js";
|
|
7
7
|
import type { ToolResult } from "../types/tools.js";
|
|
8
8
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { logger } from "../utils/logger.js";
|
|
2
|
-
import { directAgentTools } from "../agent/
|
|
2
|
+
import { directAgentTools } from "../agent/directTools.js";
|
|
3
3
|
/**
|
|
4
4
|
* Validates if a result contains a valid toolsObject structure
|
|
5
5
|
* @param result - The result object to validate
|
|
@@ -260,7 +260,7 @@ export class BaseProvider {
|
|
|
260
260
|
// Not an error - custom tools are optional
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
|
-
// MCP tools loading simplified - removed
|
|
263
|
+
// MCP tools loading simplified - removed functionCalling dependency
|
|
264
264
|
if (!this.mcpTools) {
|
|
265
265
|
// Set empty tools object - MCP tools are handled at a higher level
|
|
266
266
|
this.mcpTools = {};
|
|
@@ -163,7 +163,7 @@ export class DynamicModelProvider {
|
|
|
163
163
|
this.ensureInitialized();
|
|
164
164
|
switch (useCase) {
|
|
165
165
|
case "coding":
|
|
166
|
-
return (this.searchByCapability("
|
|
166
|
+
return (this.searchByCapability("functionCalling", {
|
|
167
167
|
excludeDeprecated: true,
|
|
168
168
|
})[0] || null);
|
|
169
169
|
case "analysis":
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { logger } from "../utils/logger.js";
|
|
5
5
|
import { AIProviderFactory } from "./factory.js";
|
|
6
6
|
import { z } from "zod";
|
|
7
|
-
import { ProviderRegistry } from "../factories/
|
|
7
|
+
import { ProviderRegistry } from "../factories/providerRegistry.js";
|
|
8
8
|
// Zod schema for validation
|
|
9
9
|
const UnifiedEvaluationSchema = z.object({
|
|
10
10
|
relevance: z.number().min(1).max(10),
|
package/dist/lib/core/factory.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// ✅ CIRCULAR DEPENDENCY FIX: Remove barrel export import
|
|
2
2
|
// Providers are now managed via ProviderFactory instead of direct imports
|
|
3
|
-
import { ProviderFactory } from "../factories/
|
|
3
|
+
import { ProviderFactory } from "../factories/providerFactory.js";
|
|
4
4
|
import { getBestProvider } from "../utils/providerUtils.js";
|
|
5
5
|
import { logger } from "../utils/logger.js";
|
|
6
6
|
const componentIdentifier = "aiProviderFactory";
|
|
@@ -102,8 +102,8 @@ export class AIProviderFactory {
|
|
|
102
102
|
// Wrap with MCP if enabled
|
|
103
103
|
if (enableMCP) {
|
|
104
104
|
try {
|
|
105
|
-
logger.debug(`[${functionTag}] MCP wrapping disabled -
|
|
106
|
-
// MCP wrapping simplified - removed
|
|
105
|
+
logger.debug(`[${functionTag}] MCP wrapping disabled - functionCalling removed`);
|
|
106
|
+
// MCP wrapping simplified - removed functionCalling dependency
|
|
107
107
|
}
|
|
108
108
|
catch (mcpError) {
|
|
109
109
|
logger.warn(`[${functionTag}] Failed to wrap with MCP, using base provider`, {
|
package/dist/lib/core/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ZodType, ZodTypeDef } from "zod";
|
|
2
2
|
import type { Schema, Tool } from "ai";
|
|
3
|
-
import type { GenerateResult } from "../types/
|
|
4
|
-
import type { StreamOptions, StreamResult } from "../types/
|
|
3
|
+
import type { GenerateResult } from "../types/generateTypes.js";
|
|
4
|
+
import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
|
|
5
5
|
import type { JsonValue } from "../types/common.js";
|
|
6
6
|
export interface TextGenerationResult {
|
|
7
7
|
content: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ProviderFactory } from "./
|
|
1
|
+
import { ProviderFactory } from "./providerFactory.js";
|
|
2
2
|
// ✅ FINAL CIRCULAR DEPENDENCY FIX: Lazy loading all providers
|
|
3
3
|
// Removed all static imports - providers loaded dynamically when needed
|
|
4
4
|
// This breaks the circular dependency chain completely
|
|
@@ -22,12 +22,12 @@ export class ProviderRegistry {
|
|
|
22
22
|
}
|
|
23
23
|
try {
|
|
24
24
|
// ✅ LAZY LOADING: Register providers with dynamic import factory functions
|
|
25
|
-
const { ProviderFactory } = await import("./
|
|
25
|
+
const { ProviderFactory } = await import("./providerFactory.js");
|
|
26
26
|
// Register Google AI Studio Provider (our validated baseline)
|
|
27
27
|
ProviderFactory.registerProvider(AIProviderName.GOOGLE_AI, async (modelName, providerName, sdk) => {
|
|
28
|
-
const { GoogleAIStudioProvider } = await import("../providers/
|
|
28
|
+
const { GoogleAIStudioProvider } = await import("../providers/googleAiStudio.js");
|
|
29
29
|
return new GoogleAIStudioProvider(modelName, sdk);
|
|
30
|
-
}, GoogleAIModels.GEMINI_2_5_FLASH, ["
|
|
30
|
+
}, GoogleAIModels.GEMINI_2_5_FLASH, ["googleAiStudio", "google", "gemini", "google-ai"]);
|
|
31
31
|
// Register OpenAI provider
|
|
32
32
|
ProviderFactory.registerProvider(AIProviderName.OPENAI, async (modelName, providerName, sdk) => {
|
|
33
33
|
const { OpenAIProvider } = await import("../providers/openAI.js");
|
|
@@ -40,20 +40,20 @@ export class ProviderRegistry {
|
|
|
40
40
|
}, "claude-3-5-sonnet-20241022", ["claude", "anthropic"]);
|
|
41
41
|
// Register Amazon Bedrock provider
|
|
42
42
|
ProviderFactory.registerProvider(AIProviderName.BEDROCK, async (modelName) => {
|
|
43
|
-
const { AmazonBedrockProvider } = await import("../providers/
|
|
43
|
+
const { AmazonBedrockProvider } = await import("../providers/amazonBedrock.js");
|
|
44
44
|
return new AmazonBedrockProvider(modelName);
|
|
45
45
|
}, undefined, // Let provider read BEDROCK_MODEL from .env
|
|
46
46
|
["bedrock", "aws"]);
|
|
47
47
|
// Register Azure OpenAI provider
|
|
48
48
|
ProviderFactory.registerProvider(AIProviderName.AZURE, async (modelName) => {
|
|
49
|
-
const { AzureOpenAIProvider } = await import("../providers/
|
|
49
|
+
const { AzureOpenAIProvider } = await import("../providers/azureOpenai.js");
|
|
50
50
|
return new AzureOpenAIProvider(modelName);
|
|
51
|
-
}, "gpt-4o-mini", ["azure", "
|
|
51
|
+
}, "gpt-4o-mini", ["azure", "azureOpenai"]);
|
|
52
52
|
// Register Google Vertex AI provider
|
|
53
53
|
ProviderFactory.registerProvider(AIProviderName.VERTEX, async (modelName) => {
|
|
54
|
-
const { GoogleVertexProvider } = await import("../providers/
|
|
54
|
+
const { GoogleVertexProvider } = await import("../providers/googleVertex.js");
|
|
55
55
|
return new GoogleVertexProvider(modelName);
|
|
56
|
-
}, "gemini-2.5-pro", ["vertex", "
|
|
56
|
+
}, "gemini-2.5-pro", ["vertex", "googleVertex"]);
|
|
57
57
|
// Register Hugging Face provider (Unified Router implementation)
|
|
58
58
|
ProviderFactory.registerProvider(AIProviderName.HUGGINGFACE, async (modelName) => {
|
|
59
59
|
const { HuggingFaceProvider } = await import("../providers/huggingFace.js");
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
import { AIProviderFactory } from "./core/factory.js";
|
|
10
10
|
export { AIProviderFactory };
|
|
11
11
|
export type { AIProvider, AIProviderName, ProviderConfig, StreamingOptions, ProviderAttempt, SupportedModelName, } from "./core/types.js";
|
|
12
|
-
export type { GenerateOptions, GenerateResult, EnhancedProvider, } from "./types/
|
|
13
|
-
export type { SimpleTool, ToolContext } from "./sdk/
|
|
14
|
-
export { createTool, createTypedTool, validateTool, } from "./sdk/
|
|
15
|
-
export type { InMemoryMCPServerConfig, InMemoryToolInfo, InMemoryToolResult, } from "./types/
|
|
12
|
+
export type { GenerateOptions, GenerateResult, EnhancedProvider, } from "./types/generateTypes.js";
|
|
13
|
+
export type { SimpleTool, ToolContext } from "./sdk/toolRegistration.js";
|
|
14
|
+
export { createTool, createTypedTool, validateTool, } from "./sdk/toolRegistration.js";
|
|
15
|
+
export type { InMemoryMCPServerConfig, InMemoryToolInfo, InMemoryToolResult, } from "./types/mcpTypes.js";
|
|
16
16
|
export { BedrockModels, OpenAIModels, VertexModels, DEFAULT_PROVIDER_CONFIGS, } from "./core/types.js";
|
|
17
17
|
export { getBestProvider, getAvailableProviders, isValidProvider, } from "./utils/providerUtils.js";
|
|
18
18
|
export { NeuroLink } from "./neurolink.js";
|
package/dist/lib/index.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// Core exports
|
|
10
10
|
import { AIProviderFactory } from "./core/factory.js";
|
|
11
11
|
export { AIProviderFactory };
|
|
12
|
-
export { createTool, createTypedTool, validateTool, } from "./sdk/
|
|
12
|
+
export { createTool, createTypedTool, validateTool, } from "./sdk/toolRegistration.js";
|
|
13
13
|
// Model enums
|
|
14
14
|
export { BedrockModels, OpenAIModels, VertexModels, DEFAULT_PROVIDER_CONFIGS, } from "./core/types.js";
|
|
15
15
|
// Utility exports
|
|
@@ -8,7 +8,7 @@ import type { ExecutionContext } from "./contracts/mcpContract.js";
|
|
|
8
8
|
/**
|
|
9
9
|
* MCP Server Categories for organization and discovery
|
|
10
10
|
*/
|
|
11
|
-
export type MCPServerCategory = "
|
|
11
|
+
export type MCPServerCategory = "aiProviders" | "frameworks" | "development" | "business" | "content" | "data" | "integrations" | "automation" | "analysis" | "custom";
|
|
12
12
|
/**
|
|
13
13
|
* Tool execution context - Rich context passed to every tool execution
|
|
14
14
|
* Following Lighthouse's pattern for rich tool context
|
|
@@ -130,7 +130,7 @@ export interface MCPServerConfig {
|
|
|
130
130
|
* id: 'neurolink-ai-core',
|
|
131
131
|
* title: 'NeuroLink AI Core',
|
|
132
132
|
* description: 'Core AI provider tools',
|
|
133
|
-
* category: '
|
|
133
|
+
* category: 'aiProviders'
|
|
134
134
|
* });
|
|
135
135
|
*
|
|
136
136
|
* aiCoreServer.registerTool({
|
package/dist/lib/mcp/factory.js
CHANGED
|
@@ -14,7 +14,7 @@ const ServerConfigSchema = z.object({
|
|
|
14
14
|
version: z.string().optional(),
|
|
15
15
|
category: z
|
|
16
16
|
.enum([
|
|
17
|
-
"
|
|
17
|
+
"aiProviders",
|
|
18
18
|
"frameworks",
|
|
19
19
|
"development",
|
|
20
20
|
"business",
|
|
@@ -46,7 +46,7 @@ const ServerConfigSchema = z.object({
|
|
|
46
46
|
* id: 'neurolink-ai-core',
|
|
47
47
|
* title: 'NeuroLink AI Core',
|
|
48
48
|
* description: 'Core AI provider tools',
|
|
49
|
-
* category: '
|
|
49
|
+
* category: 'aiProviders'
|
|
50
50
|
* });
|
|
51
51
|
*
|
|
52
52
|
* aiCoreServer.registerTool({
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Wraps the agent direct tools as an MCP server for proper registration
|
|
4
4
|
*/
|
|
5
5
|
import { createMCPServer } from "../../factory.js";
|
|
6
|
-
import { directAgentTools } from "../../../agent/
|
|
6
|
+
import { directAgentTools } from "../../../agent/directTools.js";
|
|
7
7
|
import { logger } from "../../../utils/logger.js";
|
|
8
8
|
/**
|
|
9
9
|
* Direct Tools Server - Agent direct tools for immediate use
|
|
@@ -15,7 +15,7 @@ export const aiCoreServer = createMCPServer({
|
|
|
15
15
|
id: "neurolink-ai-core",
|
|
16
16
|
title: "NeuroLink AI Core",
|
|
17
17
|
description: "Core AI provider management with automatic fallback and status monitoring",
|
|
18
|
-
category: "
|
|
18
|
+
category: "aiProviders",
|
|
19
19
|
version: "1.2.0",
|
|
20
20
|
capabilities: [
|
|
21
21
|
"provider-selection",
|
package/dist/lib/neurolink.d.ts
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* Uses real MCP infrastructure for tool discovery and execution.
|
|
7
7
|
*/
|
|
8
8
|
import type { TextGenerationOptions, TextGenerationResult } from "./core/types.js";
|
|
9
|
-
import type { GenerateOptions, GenerateResult } from "./types/
|
|
10
|
-
import type { StreamOptions, StreamResult } from "./types/
|
|
11
|
-
import type { SimpleTool } from "./sdk/
|
|
12
|
-
import type { InMemoryMCPServerConfig } from "./types/
|
|
9
|
+
import type { GenerateOptions, GenerateResult } from "./types/generateTypes.js";
|
|
10
|
+
import type { StreamOptions, StreamResult } from "./types/streamTypes.js";
|
|
11
|
+
import type { SimpleTool } from "./sdk/toolRegistration.js";
|
|
12
|
+
import type { InMemoryMCPServerConfig } from "./types/mcpTypes.js";
|
|
13
13
|
export interface ProviderStatus {
|
|
14
14
|
provider: string;
|
|
15
15
|
status: "working" | "failed" | "not-configured";
|
package/dist/lib/neurolink.js
CHANGED
|
@@ -15,11 +15,11 @@ catch (error) {
|
|
|
15
15
|
}
|
|
16
16
|
import { AIProviderFactory } from "./core/factory.js";
|
|
17
17
|
import { mcpLogger } from "./utils/logger.js";
|
|
18
|
-
import { toolRegistry } from "./mcp/
|
|
18
|
+
import { toolRegistry } from "./mcp/toolRegistry.js";
|
|
19
19
|
import { logger } from "./utils/logger.js";
|
|
20
20
|
import { getBestProvider } from "./utils/providerUtils.js";
|
|
21
|
-
import { ProviderRegistry } from "./factories/
|
|
22
|
-
import { validateTool, createMCPServerFromTools, } from "./sdk/
|
|
21
|
+
import { ProviderRegistry } from "./factories/providerRegistry.js";
|
|
22
|
+
import { validateTool, createMCPServerFromTools, } from "./sdk/toolRegistration.js";
|
|
23
23
|
// Core types imported from core/types.js
|
|
24
24
|
export class NeuroLink {
|
|
25
25
|
mcpInitialized = false;
|
|
@@ -667,7 +667,7 @@ export class NeuroLink {
|
|
|
667
667
|
"openai",
|
|
668
668
|
"bedrock",
|
|
669
669
|
"vertex",
|
|
670
|
-
"
|
|
670
|
+
"googleVertex",
|
|
671
671
|
"anthropic",
|
|
672
672
|
"azure",
|
|
673
673
|
"google-ai",
|