@juspay/neurolink 5.0.0 → 5.2.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 +20 -7
- package/README.md +160 -172
- package/dist/agent/direct-tools.d.ts +6 -6
- package/dist/chat/sse-handler.js +5 -4
- package/dist/chat/websocket-chat-handler.js +9 -9
- package/dist/cli/commands/config.d.ts +3 -3
- package/dist/cli/commands/mcp.js +9 -8
- package/dist/cli/commands/ollama.js +3 -3
- package/dist/cli/factories/command-factory.d.ts +18 -0
- package/dist/cli/factories/command-factory.js +183 -0
- package/dist/cli/index.js +105 -157
- package/dist/cli/utils/interactive-setup.js +2 -2
- package/dist/core/base-provider.d.ts +423 -0
- package/dist/core/base-provider.js +365 -0
- package/dist/core/constants.d.ts +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/dynamic-models.d.ts +6 -6
- package/dist/core/evaluation.d.ts +19 -80
- package/dist/core/evaluation.js +185 -484
- package/dist/core/factory.d.ts +3 -3
- package/dist/core/factory.js +31 -91
- package/dist/core/service-registry.d.ts +47 -0
- package/dist/core/service-registry.js +112 -0
- package/dist/core/types.d.ts +49 -49
- package/dist/core/types.js +1 -0
- package/dist/factories/compatibility-factory.d.ts +20 -0
- package/dist/factories/compatibility-factory.js +69 -0
- package/dist/factories/provider-factory.d.ts +72 -0
- package/dist/factories/provider-factory.js +144 -0
- package/dist/factories/provider-generate-factory.d.ts +20 -0
- package/dist/factories/provider-generate-factory.js +87 -0
- package/dist/factories/provider-registry.d.ts +38 -0
- package/dist/factories/provider-registry.js +107 -0
- package/dist/index.d.ts +8 -5
- package/dist/index.js +5 -5
- package/dist/lib/agent/direct-tools.d.ts +6 -6
- package/dist/lib/chat/sse-handler.js +5 -4
- package/dist/lib/chat/websocket-chat-handler.js +9 -9
- package/dist/lib/core/base-provider.d.ts +423 -0
- package/dist/lib/core/base-provider.js +365 -0
- package/dist/lib/core/constants.d.ts +1 -1
- package/dist/lib/core/constants.js +1 -1
- package/dist/lib/core/dynamic-models.d.ts +6 -6
- package/dist/lib/core/evaluation.d.ts +19 -80
- package/dist/lib/core/evaluation.js +185 -484
- package/dist/lib/core/factory.d.ts +3 -3
- package/dist/lib/core/factory.js +30 -91
- package/dist/lib/core/service-registry.d.ts +47 -0
- package/dist/lib/core/service-registry.js +112 -0
- package/dist/lib/core/types.d.ts +49 -49
- package/dist/lib/core/types.js +1 -0
- package/dist/lib/factories/compatibility-factory.d.ts +20 -0
- package/dist/lib/factories/compatibility-factory.js +69 -0
- package/dist/lib/factories/provider-factory.d.ts +72 -0
- package/dist/lib/factories/provider-factory.js +144 -0
- package/dist/lib/factories/provider-generate-factory.d.ts +20 -0
- package/dist/lib/factories/provider-generate-factory.js +87 -0
- package/dist/lib/factories/provider-registry.d.ts +38 -0
- package/dist/lib/factories/provider-registry.js +107 -0
- package/dist/lib/index.d.ts +8 -5
- package/dist/lib/index.js +5 -5
- package/dist/lib/mcp/client.js +5 -5
- package/dist/lib/mcp/config.js +28 -3
- package/dist/lib/mcp/dynamic-orchestrator.js +8 -8
- package/dist/lib/mcp/external-client.js +2 -2
- package/dist/lib/mcp/factory.d.ts +1 -1
- package/dist/lib/mcp/factory.js +1 -1
- package/dist/lib/mcp/function-calling.js +1 -1
- package/dist/lib/mcp/initialize-tools.d.ts +1 -1
- package/dist/lib/mcp/initialize-tools.js +45 -1
- package/dist/lib/mcp/initialize.js +16 -6
- package/dist/lib/mcp/neurolink-mcp-client.js +10 -10
- package/dist/lib/mcp/orchestrator.js +4 -4
- package/dist/lib/mcp/servers/agent/direct-tools-server.d.ts +8 -0
- package/dist/lib/mcp/servers/agent/direct-tools-server.js +109 -0
- package/dist/lib/mcp/servers/ai-providers/ai-analysis-tools.js +10 -10
- package/dist/lib/mcp/servers/ai-providers/ai-core-server.js +8 -6
- package/dist/lib/mcp/servers/ai-providers/ai-workflow-tools.d.ts +2 -2
- package/dist/lib/mcp/servers/ai-providers/ai-workflow-tools.js +16 -16
- package/dist/lib/mcp/unified-registry.d.ts +4 -0
- package/dist/lib/mcp/unified-registry.js +42 -9
- package/dist/lib/neurolink.d.ts +161 -174
- package/dist/lib/neurolink.js +723 -397
- package/dist/lib/providers/amazon-bedrock.d.ts +32 -0
- package/dist/lib/providers/amazon-bedrock.js +143 -0
- package/dist/lib/providers/analytics-helper.js +7 -4
- package/dist/lib/providers/anthropic-baseprovider.d.ts +23 -0
- package/dist/lib/providers/anthropic-baseprovider.js +114 -0
- package/dist/lib/providers/anthropic.d.ts +19 -39
- package/dist/lib/providers/anthropic.js +84 -378
- package/dist/lib/providers/azure-openai.d.ts +20 -0
- package/dist/lib/providers/azure-openai.js +89 -0
- package/dist/lib/providers/function-calling-provider.d.ts +14 -12
- package/dist/lib/providers/function-calling-provider.js +114 -64
- package/dist/lib/providers/google-ai-studio.d.ts +23 -0
- package/dist/lib/providers/google-ai-studio.js +107 -0
- package/dist/lib/providers/google-vertex.d.ts +47 -0
- package/dist/lib/providers/google-vertex.js +205 -0
- package/dist/lib/providers/huggingFace.d.ts +33 -27
- package/dist/lib/providers/huggingFace.js +103 -400
- package/dist/lib/providers/index.d.ts +9 -9
- package/dist/lib/providers/index.js +9 -9
- package/dist/lib/providers/mcp-provider.d.ts +13 -8
- package/dist/lib/providers/mcp-provider.js +63 -18
- package/dist/lib/providers/mistral.d.ts +42 -0
- package/dist/lib/providers/mistral.js +160 -0
- package/dist/lib/providers/ollama.d.ts +52 -35
- package/dist/lib/providers/ollama.js +297 -477
- package/dist/lib/providers/openAI.d.ts +21 -21
- package/dist/lib/providers/openAI.js +81 -245
- package/dist/lib/sdk/tool-extension.d.ts +181 -0
- package/dist/lib/sdk/tool-extension.js +283 -0
- package/dist/lib/sdk/tool-registration.d.ts +95 -0
- package/dist/lib/sdk/tool-registration.js +167 -0
- package/dist/lib/types/generate-types.d.ts +80 -0
- package/dist/lib/types/generate-types.js +1 -0
- package/dist/lib/types/mcp-types.d.ts +116 -0
- package/dist/lib/types/mcp-types.js +5 -0
- package/dist/lib/types/stream-types.d.ts +95 -0
- package/dist/lib/types/stream-types.js +1 -0
- package/dist/lib/types/universal-provider-options.d.ts +87 -0
- package/dist/lib/types/universal-provider-options.js +53 -0
- package/dist/lib/utils/providerUtils-fixed.js +1 -1
- package/dist/lib/utils/streaming-utils.d.ts +14 -2
- package/dist/lib/utils/streaming-utils.js +0 -3
- package/dist/mcp/client.js +5 -5
- package/dist/mcp/config.js +28 -3
- package/dist/mcp/dynamic-orchestrator.js +8 -8
- package/dist/mcp/external-client.js +2 -2
- package/dist/mcp/factory.d.ts +1 -1
- package/dist/mcp/factory.js +1 -1
- package/dist/mcp/function-calling.js +1 -1
- package/dist/mcp/initialize-tools.d.ts +1 -1
- package/dist/mcp/initialize-tools.js +45 -1
- package/dist/mcp/initialize.js +16 -6
- package/dist/mcp/neurolink-mcp-client.js +10 -10
- package/dist/mcp/orchestrator.js +4 -4
- package/dist/mcp/servers/agent/direct-tools-server.d.ts +8 -0
- package/dist/mcp/servers/agent/direct-tools-server.js +109 -0
- package/dist/mcp/servers/ai-providers/ai-analysis-tools.js +10 -10
- package/dist/mcp/servers/ai-providers/ai-core-server.js +8 -6
- package/dist/mcp/servers/ai-providers/ai-workflow-tools.d.ts +2 -2
- package/dist/mcp/servers/ai-providers/ai-workflow-tools.js +16 -16
- package/dist/mcp/unified-registry.d.ts +4 -0
- package/dist/mcp/unified-registry.js +42 -9
- package/dist/neurolink.d.ts +161 -174
- package/dist/neurolink.js +723 -397
- package/dist/providers/amazon-bedrock.d.ts +32 -0
- package/dist/providers/amazon-bedrock.js +143 -0
- package/dist/providers/analytics-helper.js +7 -4
- package/dist/providers/anthropic-baseprovider.d.ts +23 -0
- package/dist/providers/anthropic-baseprovider.js +114 -0
- package/dist/providers/anthropic.d.ts +19 -39
- package/dist/providers/anthropic.js +83 -377
- package/dist/providers/azure-openai.d.ts +20 -0
- package/dist/providers/azure-openai.js +89 -0
- package/dist/providers/function-calling-provider.d.ts +14 -12
- package/dist/providers/function-calling-provider.js +114 -64
- package/dist/providers/google-ai-studio.d.ts +23 -0
- package/dist/providers/google-ai-studio.js +108 -0
- package/dist/providers/google-vertex.d.ts +47 -0
- package/dist/providers/google-vertex.js +205 -0
- package/dist/providers/huggingFace.d.ts +33 -27
- package/dist/providers/huggingFace.js +102 -399
- package/dist/providers/index.d.ts +9 -9
- package/dist/providers/index.js +9 -9
- package/dist/providers/mcp-provider.d.ts +13 -8
- package/dist/providers/mcp-provider.js +63 -18
- package/dist/providers/mistral.d.ts +42 -0
- package/dist/providers/mistral.js +160 -0
- package/dist/providers/ollama.d.ts +52 -35
- package/dist/providers/ollama.js +297 -476
- package/dist/providers/openAI.d.ts +21 -21
- package/dist/providers/openAI.js +81 -246
- package/dist/sdk/tool-extension.d.ts +181 -0
- package/dist/sdk/tool-extension.js +283 -0
- package/dist/sdk/tool-registration.d.ts +95 -0
- package/dist/sdk/tool-registration.js +168 -0
- package/dist/types/generate-types.d.ts +80 -0
- package/dist/types/generate-types.js +1 -0
- package/dist/types/mcp-types.d.ts +116 -0
- package/dist/types/mcp-types.js +5 -0
- package/dist/types/stream-types.d.ts +95 -0
- package/dist/types/stream-types.js +1 -0
- package/dist/types/universal-provider-options.d.ts +87 -0
- package/dist/types/universal-provider-options.js +53 -0
- package/dist/utils/providerUtils-fixed.js +1 -1
- package/dist/utils/streaming-utils.d.ts +14 -2
- package/dist/utils/streaming-utils.js +0 -3
- package/package.json +15 -10
- package/dist/lib/providers/agent-enhanced-provider.d.ts +0 -89
- package/dist/lib/providers/agent-enhanced-provider.js +0 -614
- package/dist/lib/providers/amazonBedrock.d.ts +0 -19
- package/dist/lib/providers/amazonBedrock.js +0 -334
- package/dist/lib/providers/azureOpenAI.d.ts +0 -39
- package/dist/lib/providers/azureOpenAI.js +0 -436
- package/dist/lib/providers/googleAIStudio.d.ts +0 -49
- package/dist/lib/providers/googleAIStudio.js +0 -333
- package/dist/lib/providers/googleVertexAI.d.ts +0 -38
- package/dist/lib/providers/googleVertexAI.js +0 -519
- package/dist/lib/providers/mistralAI.d.ts +0 -34
- package/dist/lib/providers/mistralAI.js +0 -294
- package/dist/providers/agent-enhanced-provider.d.ts +0 -89
- package/dist/providers/agent-enhanced-provider.js +0 -614
- package/dist/providers/amazonBedrock.d.ts +0 -19
- package/dist/providers/amazonBedrock.js +0 -334
- package/dist/providers/azureOpenAI.d.ts +0 -39
- package/dist/providers/azureOpenAI.js +0 -437
- package/dist/providers/googleAIStudio.d.ts +0 -49
- package/dist/providers/googleAIStudio.js +0 -333
- package/dist/providers/googleVertexAI.d.ts +0 -38
- package/dist/providers/googleVertexAI.js +0 -519
- package/dist/providers/mistralAI.d.ts +0 -34
- package/dist/providers/mistralAI.js +0 -294
package/dist/neurolink.d.ts
CHANGED
|
@@ -1,72 +1,48 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* NeuroLink - Unified AI Interface with Real MCP Tool Integration
|
|
3
3
|
*
|
|
4
|
+
* REDESIGNED FALLBACK CHAIN - NO CIRCULAR DEPENDENCIES
|
|
4
5
|
* Enhanced AI provider system with natural MCP tool access.
|
|
5
6
|
* Uses real MCP infrastructure for tool discovery and execution.
|
|
6
7
|
*/
|
|
7
|
-
import type {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
import type { TextGenerationOptions, TextGenerationResult } from "./core/types.js";
|
|
9
|
+
import type { GenerateOptions, GenerateResult } from "./types/generate-types.js";
|
|
10
|
+
import type { StreamOptions, StreamResult } from "./types/stream-types.js";
|
|
11
|
+
import type { SimpleTool } from "./sdk/tool-registration.js";
|
|
12
|
+
import type { InMemoryMCPServerConfig } from "./types/mcp-types.js";
|
|
13
|
+
export interface ProviderStatus {
|
|
14
|
+
provider: string;
|
|
15
|
+
status: "working" | "failed" | "not-configured";
|
|
16
|
+
configured: boolean;
|
|
17
|
+
authenticated: boolean;
|
|
18
|
+
error?: string;
|
|
19
|
+
responseTime?: number;
|
|
11
20
|
model?: string;
|
|
12
|
-
temperature?: number;
|
|
13
|
-
maxTokens?: number;
|
|
14
|
-
systemPrompt?: string;
|
|
15
|
-
schema?: any;
|
|
16
|
-
timeout?: number | string;
|
|
17
|
-
disableTools?: boolean;
|
|
18
|
-
enableAnalytics?: boolean;
|
|
19
|
-
enableEvaluation?: boolean;
|
|
20
|
-
context?: Record<string, any>;
|
|
21
|
-
evaluationDomain?: string;
|
|
22
|
-
toolUsageContext?: string;
|
|
23
|
-
conversationHistory?: Array<{
|
|
24
|
-
role: string;
|
|
25
|
-
content: string;
|
|
26
|
-
}>;
|
|
27
21
|
}
|
|
28
|
-
export interface
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
enableAnalytics?: boolean;
|
|
39
|
-
enableEvaluation?: boolean;
|
|
40
|
-
context?: Record<string, any>;
|
|
22
|
+
export interface MCPStatus {
|
|
23
|
+
mcpInitialized: boolean;
|
|
24
|
+
totalServers: number;
|
|
25
|
+
availableServers: number;
|
|
26
|
+
autoDiscoveredCount: number;
|
|
27
|
+
totalTools: number;
|
|
28
|
+
autoDiscoveredServers: MCPServerInfo[];
|
|
29
|
+
customToolsCount: number;
|
|
30
|
+
inMemoryServersCount: number;
|
|
31
|
+
error?: string;
|
|
41
32
|
}
|
|
42
|
-
export interface
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
totalTokens?: number;
|
|
50
|
-
};
|
|
51
|
-
responseTime?: number;
|
|
52
|
-
toolsUsed?: string[];
|
|
53
|
-
toolExecutions?: Array<{
|
|
54
|
-
toolName: string;
|
|
55
|
-
executionTime: number;
|
|
56
|
-
success: boolean;
|
|
57
|
-
serverId?: string;
|
|
58
|
-
}>;
|
|
59
|
-
enhancedWithTools?: boolean;
|
|
60
|
-
availableTools?: Array<{
|
|
61
|
-
name: string;
|
|
62
|
-
description: string;
|
|
63
|
-
server: string;
|
|
64
|
-
category?: string;
|
|
65
|
-
}>;
|
|
33
|
+
export interface MCPServerInfo {
|
|
34
|
+
id: string;
|
|
35
|
+
name: string;
|
|
36
|
+
source: string;
|
|
37
|
+
status: "connected" | "discovered" | "failed";
|
|
38
|
+
hasServer: boolean;
|
|
39
|
+
metadata?: any;
|
|
66
40
|
}
|
|
67
41
|
export declare class NeuroLink {
|
|
68
42
|
private mcpInitialized;
|
|
69
43
|
private contextManager;
|
|
44
|
+
private customTools;
|
|
45
|
+
private inMemoryServers;
|
|
70
46
|
constructor();
|
|
71
47
|
/**
|
|
72
48
|
* Initialize MCP registry with enhanced error handling and resource cleanup
|
|
@@ -74,146 +50,157 @@ export declare class NeuroLink {
|
|
|
74
50
|
*/
|
|
75
51
|
private initializeMCP;
|
|
76
52
|
/**
|
|
77
|
-
*
|
|
53
|
+
* MAIN ENTRY POINT: Enhanced generate method with new function signature
|
|
54
|
+
* Replaces both generateText and legacy methods
|
|
78
55
|
*/
|
|
79
|
-
|
|
56
|
+
generate(optionsOrPrompt: GenerateOptions | string): Promise<GenerateResult>;
|
|
80
57
|
/**
|
|
81
|
-
*
|
|
82
|
-
*
|
|
58
|
+
* BACKWARD COMPATIBILITY: Legacy generateText method
|
|
59
|
+
* Internally calls generate() and converts result format
|
|
83
60
|
*/
|
|
84
61
|
generateText(options: TextGenerationOptions): Promise<TextGenerationResult>;
|
|
85
62
|
/**
|
|
86
|
-
*
|
|
63
|
+
* REDESIGNED INTERNAL GENERATION - NO CIRCULAR DEPENDENCIES
|
|
64
|
+
*
|
|
65
|
+
* This method implements a clean fallback chain:
|
|
66
|
+
* 1. Try MCP-enhanced generation if available
|
|
67
|
+
* 2. Fall back to direct provider generation
|
|
68
|
+
* 3. No recursive calls - each method has a specific purpose
|
|
69
|
+
*/
|
|
70
|
+
private generateTextInternal;
|
|
71
|
+
/**
|
|
72
|
+
* Try MCP-enhanced generation (no fallback recursion)
|
|
87
73
|
*/
|
|
88
|
-
private
|
|
74
|
+
private tryMCPGeneration;
|
|
89
75
|
/**
|
|
90
|
-
*
|
|
76
|
+
* Direct provider generation (no MCP, no recursion)
|
|
91
77
|
*/
|
|
92
|
-
private
|
|
78
|
+
private directProviderGeneration;
|
|
93
79
|
/**
|
|
94
80
|
* Create tool-aware system prompt that informs AI about available tools
|
|
95
81
|
*/
|
|
96
82
|
private createToolAwareSystemPrompt;
|
|
97
83
|
/**
|
|
98
|
-
*
|
|
84
|
+
* BACKWARD COMPATIBILITY: Legacy streamText method
|
|
85
|
+
* Internally calls stream() and converts result format
|
|
99
86
|
*/
|
|
100
|
-
|
|
101
|
-
content: string;
|
|
102
|
-
}>>;
|
|
87
|
+
streamText(prompt: string, options?: Partial<StreamOptions>): Promise<AsyncIterable<string>>;
|
|
103
88
|
/**
|
|
104
|
-
*
|
|
89
|
+
* PRIMARY METHOD: Stream content using AI (recommended for new code)
|
|
90
|
+
* Future-ready for multi-modal capabilities with current text focus
|
|
105
91
|
*/
|
|
106
|
-
|
|
92
|
+
stream(options: StreamOptions): Promise<StreamResult>;
|
|
107
93
|
/**
|
|
108
|
-
*
|
|
94
|
+
* Register a custom tool that will be available to all AI providers
|
|
95
|
+
* @param name - Unique name for the tool
|
|
96
|
+
* @param tool - Tool configuration
|
|
109
97
|
*/
|
|
110
|
-
|
|
98
|
+
registerTool(name: string, tool: SimpleTool): void;
|
|
111
99
|
/**
|
|
112
|
-
*
|
|
100
|
+
* Register multiple tools at once
|
|
101
|
+
* @param tools - Object mapping tool names to configurations
|
|
113
102
|
*/
|
|
114
|
-
|
|
103
|
+
registerTools(tools: Record<string, SimpleTool>): void;
|
|
115
104
|
/**
|
|
116
|
-
*
|
|
105
|
+
* Unregister a custom tool
|
|
106
|
+
* @param name - Name of the tool to remove
|
|
107
|
+
* @returns true if the tool was removed, false if it didn't exist
|
|
117
108
|
*/
|
|
118
|
-
|
|
119
|
-
mcpInitialized: boolean;
|
|
120
|
-
totalServers: number;
|
|
121
|
-
availableServers: number;
|
|
122
|
-
autoDiscoveredCount: number;
|
|
123
|
-
totalTools: number;
|
|
124
|
-
autoDiscoveredServers: {
|
|
125
|
-
id: string;
|
|
126
|
-
name: string;
|
|
127
|
-
source: "core" | "project" | "installed";
|
|
128
|
-
status: string;
|
|
129
|
-
hasServer: boolean;
|
|
130
|
-
}[];
|
|
131
|
-
}>;
|
|
109
|
+
unregisterTool(name: string): boolean;
|
|
132
110
|
/**
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
* @param
|
|
141
|
-
* @
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
* args: ['./custom-db-mcp-server.js'],
|
|
159
|
-
* env: { DB_CONNECTION_STRING: 'postgresql://...' }
|
|
160
|
-
* });
|
|
161
|
-
* ```
|
|
162
|
-
*/
|
|
163
|
-
addMCPServer(serverId: string, config: {
|
|
164
|
-
command: string;
|
|
165
|
-
args?: string[];
|
|
166
|
-
env?: Record<string, string>;
|
|
167
|
-
cwd?: string;
|
|
168
|
-
type?: "stdio" | "sse" | "http";
|
|
169
|
-
url?: string;
|
|
170
|
-
headers?: Record<string, string>;
|
|
111
|
+
* Get all registered custom tools
|
|
112
|
+
* @returns Map of tool names to configurations
|
|
113
|
+
*/
|
|
114
|
+
getCustomTools(): Map<string, SimpleTool>;
|
|
115
|
+
/**
|
|
116
|
+
* Add an in-memory MCP server (from git diff)
|
|
117
|
+
* Allows registration of pre-instantiated server objects
|
|
118
|
+
* @param serverId - Unique identifier for the server
|
|
119
|
+
* @param config - Server configuration
|
|
120
|
+
*/
|
|
121
|
+
addInMemoryMCPServer(serverId: string, config: InMemoryMCPServerConfig): Promise<void>;
|
|
122
|
+
/**
|
|
123
|
+
* Get all registered in-memory servers
|
|
124
|
+
* @returns Map of server IDs to configurations
|
|
125
|
+
*/
|
|
126
|
+
getInMemoryServers(): Map<string, InMemoryMCPServerConfig>;
|
|
127
|
+
/**
|
|
128
|
+
* Execute a specific tool by name (from git diff)
|
|
129
|
+
* Supports both custom tools and MCP server tools
|
|
130
|
+
* @param toolName - Name of the tool to execute
|
|
131
|
+
* @param params - Parameters to pass to the tool
|
|
132
|
+
* @param options - Execution options
|
|
133
|
+
* @returns Tool execution result
|
|
134
|
+
*/
|
|
135
|
+
executeTool<T = any>(toolName: string, params?: any, options?: {
|
|
171
136
|
timeout?: number;
|
|
172
|
-
}): Promise<
|
|
173
|
-
/**
|
|
174
|
-
*
|
|
175
|
-
* @
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* Get
|
|
187
|
-
*
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
*
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
137
|
+
}): Promise<T>;
|
|
138
|
+
/**
|
|
139
|
+
* Get all available tools including custom and in-memory ones
|
|
140
|
+
* @returns Array of available tools with metadata
|
|
141
|
+
*/
|
|
142
|
+
getAllAvailableTools(): Promise<{
|
|
143
|
+
serverId: string;
|
|
144
|
+
serverTitle: string;
|
|
145
|
+
toolName: string;
|
|
146
|
+
namespacedName: string;
|
|
147
|
+
description: string;
|
|
148
|
+
isImplemented: boolean;
|
|
149
|
+
}[]>;
|
|
150
|
+
/**
|
|
151
|
+
* Get comprehensive status of all AI providers
|
|
152
|
+
* Primary method for provider health checking and diagnostics
|
|
153
|
+
*/
|
|
154
|
+
getProviderStatus(): Promise<ProviderStatus[]>;
|
|
155
|
+
/**
|
|
156
|
+
* Test a specific AI provider's connectivity and authentication
|
|
157
|
+
* @param providerName - Name of the provider to test
|
|
158
|
+
* @returns Promise resolving to true if provider is working
|
|
159
|
+
*/
|
|
160
|
+
testProvider(providerName: string): Promise<boolean>;
|
|
161
|
+
/**
|
|
162
|
+
* Internal method to test provider connection with minimal generation call
|
|
163
|
+
*/
|
|
164
|
+
private testProviderConnection;
|
|
165
|
+
/**
|
|
166
|
+
* Check if a provider has required environment variables configured
|
|
167
|
+
* @param providerName - Name of the provider to check
|
|
168
|
+
* @returns True if provider has required environment variables
|
|
169
|
+
*/
|
|
170
|
+
hasProviderEnvVars(providerName: string): Promise<boolean>;
|
|
171
|
+
/**
|
|
172
|
+
* Get the best available AI provider based on configuration and availability
|
|
173
|
+
* @param requestedProvider - Optional preferred provider name
|
|
174
|
+
* @returns Promise resolving to the best provider name
|
|
175
|
+
*/
|
|
176
|
+
getBestProvider(requestedProvider?: string): Promise<string>;
|
|
177
|
+
/**
|
|
178
|
+
* Get list of all available AI provider names
|
|
179
|
+
* @returns Array of supported provider names
|
|
180
|
+
*/
|
|
181
|
+
getAvailableProviders(): Promise<string[]>;
|
|
182
|
+
/**
|
|
183
|
+
* Validate if a provider name is supported
|
|
184
|
+
* @param providerName - Provider name to validate
|
|
185
|
+
* @returns True if provider name is valid
|
|
186
|
+
*/
|
|
187
|
+
isValidProvider(providerName: string): Promise<boolean>;
|
|
188
|
+
/**
|
|
189
|
+
* Get comprehensive MCP (Model Context Protocol) status information
|
|
190
|
+
* @returns Promise resolving to MCP status details
|
|
191
|
+
*/
|
|
192
|
+
getMCPStatus(): Promise<MCPStatus>;
|
|
193
|
+
/**
|
|
194
|
+
* List all configured MCP servers with their status
|
|
195
|
+
* @returns Promise resolving to array of MCP server information
|
|
196
|
+
*/
|
|
197
|
+
listMCPServers(): Promise<MCPServerInfo[]>;
|
|
198
|
+
/**
|
|
199
|
+
* Test connectivity to a specific MCP server
|
|
200
|
+
* @param serverId - ID of the MCP server to test
|
|
201
|
+
* @returns Promise resolving to true if server is reachable
|
|
202
|
+
*/
|
|
203
|
+
testMCPServer(serverId: string): Promise<boolean>;
|
|
219
204
|
}
|
|
205
|
+
export declare const neurolink: NeuroLink;
|
|
206
|
+
export default neurolink;
|