@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/dist/core/types.js
CHANGED
|
@@ -58,14 +58,14 @@ export var GoogleAIModels;
|
|
|
58
58
|
export const DEFAULT_PROVIDER_CONFIGS = [
|
|
59
59
|
{
|
|
60
60
|
provider: AIProviderName.BEDROCK,
|
|
61
|
-
models: [BedrockModels.CLAUDE_3_7_SONNET, BedrockModels.CLAUDE_3_5_SONNET]
|
|
61
|
+
models: [BedrockModels.CLAUDE_3_7_SONNET, BedrockModels.CLAUDE_3_5_SONNET],
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
64
|
provider: AIProviderName.VERTEX,
|
|
65
|
-
models: [VertexModels.CLAUDE_4_0_SONNET, VertexModels.GEMINI_2_5_FLASH]
|
|
65
|
+
models: [VertexModels.CLAUDE_4_0_SONNET, VertexModels.GEMINI_2_5_FLASH],
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
provider: AIProviderName.OPENAI,
|
|
69
|
-
models: [OpenAIModels.GPT_4O, OpenAIModels.GPT_4O_MINI]
|
|
70
|
-
}
|
|
69
|
+
models: [OpenAIModels.GPT_4O, OpenAIModels.GPT_4O_MINI],
|
|
70
|
+
},
|
|
71
71
|
];
|
package/dist/index.d.ts
CHANGED
|
@@ -6,16 +6,16 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Extracted from lighthouse project's proven AI functionality.
|
|
8
8
|
*/
|
|
9
|
-
import { AIProviderFactory } from
|
|
9
|
+
import { AIProviderFactory } from "./core/factory.js";
|
|
10
10
|
export { AIProviderFactory };
|
|
11
|
-
export type { AIProvider, AIProviderName, ProviderConfig, StreamingOptions, ProviderAttempt, SupportedModelName } from
|
|
12
|
-
export { BedrockModels, OpenAIModels, VertexModels, DEFAULT_PROVIDER_CONFIGS } from
|
|
13
|
-
export { GoogleVertexAI, AmazonBedrock, OpenAI, AnthropicProvider, AzureOpenAIProvider } from
|
|
14
|
-
export type { ProviderName } from
|
|
15
|
-
export { PROVIDERS, AVAILABLE_PROVIDERS } from
|
|
16
|
-
export { getBestProvider, getAvailableProviders, isValidProvider } from
|
|
17
|
-
export { NeuroLink } from
|
|
18
|
-
export type { TextGenerationOptions, StreamTextOptions, TextGenerationResult } from
|
|
11
|
+
export type { AIProvider, AIProviderName, ProviderConfig, StreamingOptions, ProviderAttempt, SupportedModelName, } from "./core/types.js";
|
|
12
|
+
export { BedrockModels, OpenAIModels, VertexModels, DEFAULT_PROVIDER_CONFIGS, } from "./core/types.js";
|
|
13
|
+
export { GoogleVertexAI, AmazonBedrock, OpenAI, AnthropicProvider, AzureOpenAIProvider, } from "./providers/index.js";
|
|
14
|
+
export type { ProviderName } from "./providers/index.js";
|
|
15
|
+
export { PROVIDERS, AVAILABLE_PROVIDERS } from "./providers/index.js";
|
|
16
|
+
export { getBestProvider, getAvailableProviders, isValidProvider, } from "./utils/providerUtils.js";
|
|
17
|
+
export { NeuroLink } from "./neurolink.js";
|
|
18
|
+
export type { TextGenerationOptions, StreamTextOptions, TextGenerationResult, } from "./neurolink.js";
|
|
19
19
|
export declare const VERSION = "1.0.0";
|
|
20
20
|
/**
|
|
21
21
|
* Quick start factory function
|
|
@@ -24,11 +24,11 @@ export declare const VERSION = "1.0.0";
|
|
|
24
24
|
* ```typescript
|
|
25
25
|
* import { createAIProvider } from 'neurolink';
|
|
26
26
|
*
|
|
27
|
-
* const provider = createAIProvider('bedrock');
|
|
27
|
+
* const provider = await createAIProvider('bedrock');
|
|
28
28
|
* const result = await provider.streamText('Hello, AI!');
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
|
-
export declare function createAIProvider(providerName?: string, modelName?: string): import("./core/types.js").AIProvider
|
|
31
|
+
export declare function createAIProvider(providerName?: string, modelName?: string): Promise<import("./core/types.js").AIProvider>;
|
|
32
32
|
/**
|
|
33
33
|
* Create provider with automatic fallback
|
|
34
34
|
*
|
|
@@ -36,13 +36,13 @@ export declare function createAIProvider(providerName?: string, modelName?: stri
|
|
|
36
36
|
* ```typescript
|
|
37
37
|
* import { createAIProviderWithFallback } from 'neurolink';
|
|
38
38
|
*
|
|
39
|
-
* const { primary, fallback } = createAIProviderWithFallback('bedrock', 'vertex');
|
|
39
|
+
* const { primary, fallback } = await createAIProviderWithFallback('bedrock', 'vertex');
|
|
40
40
|
* ```
|
|
41
41
|
*/
|
|
42
|
-
export declare function createAIProviderWithFallback(primaryProvider?: string, fallbackProvider?: string, modelName?: string): {
|
|
42
|
+
export declare function createAIProviderWithFallback(primaryProvider?: string, fallbackProvider?: string, modelName?: string): Promise<{
|
|
43
43
|
primary: import("./core/types.js").AIProvider;
|
|
44
44
|
fallback: import("./core/types.js").AIProvider;
|
|
45
|
-
}
|
|
45
|
+
}>;
|
|
46
46
|
/**
|
|
47
47
|
* Create the best available provider based on configuration
|
|
48
48
|
*
|
|
@@ -50,7 +50,7 @@ export declare function createAIProviderWithFallback(primaryProvider?: string, f
|
|
|
50
50
|
* ```typescript
|
|
51
51
|
* import { createBestAIProvider } from 'neurolink';
|
|
52
52
|
*
|
|
53
|
-
* const provider = createBestAIProvider();
|
|
53
|
+
* const provider = await createBestAIProvider();
|
|
54
54
|
* ```
|
|
55
55
|
*/
|
|
56
|
-
export declare function createBestAIProvider(requestedProvider?: string, modelName?: string): import("./core/types.js").AIProvider
|
|
56
|
+
export declare function createBestAIProvider(requestedProvider?: string, modelName?: string): Promise<import("./core/types.js").AIProvider>;
|
package/dist/index.js
CHANGED
|
@@ -7,19 +7,19 @@
|
|
|
7
7
|
* Extracted from lighthouse project's proven AI functionality.
|
|
8
8
|
*/
|
|
9
9
|
// Core exports
|
|
10
|
-
import { AIProviderFactory } from
|
|
10
|
+
import { AIProviderFactory } from "./core/factory.js";
|
|
11
11
|
export { AIProviderFactory };
|
|
12
12
|
// Model enums
|
|
13
|
-
export { BedrockModels, OpenAIModels, VertexModels, DEFAULT_PROVIDER_CONFIGS } from
|
|
13
|
+
export { BedrockModels, OpenAIModels, VertexModels, DEFAULT_PROVIDER_CONFIGS, } from "./core/types.js";
|
|
14
14
|
// Provider exports
|
|
15
|
-
export { GoogleVertexAI, AmazonBedrock, OpenAI, AnthropicProvider, AzureOpenAIProvider } from
|
|
16
|
-
export { PROVIDERS, AVAILABLE_PROVIDERS } from
|
|
15
|
+
export { GoogleVertexAI, AmazonBedrock, OpenAI, AnthropicProvider, AzureOpenAIProvider, } from "./providers/index.js";
|
|
16
|
+
export { PROVIDERS, AVAILABLE_PROVIDERS } from "./providers/index.js";
|
|
17
17
|
// Utility exports
|
|
18
|
-
export { getBestProvider, getAvailableProviders, isValidProvider } from
|
|
18
|
+
export { getBestProvider, getAvailableProviders, isValidProvider, } from "./utils/providerUtils.js";
|
|
19
19
|
// Main NeuroLink wrapper class
|
|
20
|
-
export { NeuroLink } from
|
|
20
|
+
export { NeuroLink } from "./neurolink.js";
|
|
21
21
|
// Version
|
|
22
|
-
export const VERSION =
|
|
22
|
+
export const VERSION = "1.0.0";
|
|
23
23
|
/**
|
|
24
24
|
* Quick start factory function
|
|
25
25
|
*
|
|
@@ -27,12 +27,12 @@ export const VERSION = '1.0.0';
|
|
|
27
27
|
* ```typescript
|
|
28
28
|
* import { createAIProvider } from 'neurolink';
|
|
29
29
|
*
|
|
30
|
-
* const provider = createAIProvider('bedrock');
|
|
30
|
+
* const provider = await createAIProvider('bedrock');
|
|
31
31
|
* const result = await provider.streamText('Hello, AI!');
|
|
32
32
|
* ```
|
|
33
33
|
*/
|
|
34
|
-
export function createAIProvider(providerName, modelName) {
|
|
35
|
-
return AIProviderFactory.createProvider(providerName ||
|
|
34
|
+
export async function createAIProvider(providerName, modelName) {
|
|
35
|
+
return await AIProviderFactory.createProvider(providerName || "bedrock", modelName);
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
38
|
* Create provider with automatic fallback
|
|
@@ -41,11 +41,11 @@ export function createAIProvider(providerName, modelName) {
|
|
|
41
41
|
* ```typescript
|
|
42
42
|
* import { createAIProviderWithFallback } from 'neurolink';
|
|
43
43
|
*
|
|
44
|
-
* const { primary, fallback } = createAIProviderWithFallback('bedrock', 'vertex');
|
|
44
|
+
* const { primary, fallback } = await createAIProviderWithFallback('bedrock', 'vertex');
|
|
45
45
|
* ```
|
|
46
46
|
*/
|
|
47
|
-
export function createAIProviderWithFallback(primaryProvider, fallbackProvider, modelName) {
|
|
48
|
-
return AIProviderFactory.createProviderWithFallback(primaryProvider ||
|
|
47
|
+
export async function createAIProviderWithFallback(primaryProvider, fallbackProvider, modelName) {
|
|
48
|
+
return await AIProviderFactory.createProviderWithFallback(primaryProvider || "bedrock", fallbackProvider || "vertex", modelName);
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
51
51
|
* Create the best available provider based on configuration
|
|
@@ -54,9 +54,9 @@ export function createAIProviderWithFallback(primaryProvider, fallbackProvider,
|
|
|
54
54
|
* ```typescript
|
|
55
55
|
* import { createBestAIProvider } from 'neurolink';
|
|
56
56
|
*
|
|
57
|
-
* const provider = createBestAIProvider();
|
|
57
|
+
* const provider = await createBestAIProvider();
|
|
58
58
|
* ```
|
|
59
59
|
*/
|
|
60
|
-
export function createBestAIProvider(requestedProvider, modelName) {
|
|
61
|
-
return AIProviderFactory.createBestProvider(requestedProvider, modelName);
|
|
60
|
+
export async function createBestAIProvider(requestedProvider, modelName) {
|
|
61
|
+
return await AIProviderFactory.createBestProvider(requestedProvider, modelName);
|
|
62
62
|
}
|