@juspay/neurolink 7.50.0 → 7.51.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 +7 -0
- package/README.md +12 -9
- package/dist/adapters/providerImageAdapter.js +82 -10
- package/dist/agent/directTools.d.ts +10 -10
- package/dist/agent/directTools.js +5 -3
- package/dist/cli/commands/config.js +1 -0
- package/dist/cli/commands/mcp.js +1 -0
- package/dist/cli/commands/models.js +1 -0
- package/dist/cli/commands/ollama.js +1 -0
- package/dist/cli/commands/setup-anthropic.js +1 -0
- package/dist/cli/commands/setup-azure.js +1 -0
- package/dist/cli/commands/setup-bedrock.js +1 -0
- package/dist/cli/commands/setup-gcp.js +1 -0
- package/dist/cli/commands/setup-google-ai.js +1 -0
- package/dist/cli/commands/setup-huggingface.js +1 -0
- package/dist/cli/commands/setup-mistral.js +1 -0
- package/dist/cli/commands/setup-openai.js +1 -0
- package/dist/cli/commands/setup.js +1 -0
- package/dist/cli/errorHandler.js +1 -0
- package/dist/cli/factories/commandFactory.d.ts +1 -0
- package/dist/cli/factories/commandFactory.js +23 -6
- package/dist/cli/factories/ollamaCommandFactory.js +1 -0
- package/dist/cli/factories/sagemakerCommandFactory.js +1 -0
- package/dist/cli/factories/setupCommandFactory.js +1 -0
- package/dist/cli/index.js +1 -0
- package/dist/cli/loop/conversationSelector.js +1 -0
- package/dist/cli/loop/optionsSchema.js +1 -0
- package/dist/cli/loop/session.js +1 -0
- package/dist/cli/parser.js +1 -0
- package/dist/cli/utils/completeSetup.js +1 -0
- package/dist/cli/utils/envManager.js +1 -0
- package/dist/cli/utils/interactiveSetup.js +1 -0
- package/dist/cli/utils/ollamaUtils.js +1 -0
- package/dist/constants/index.js +1 -1
- package/dist/core/baseProvider.d.ts +5 -0
- package/dist/core/baseProvider.js +70 -20
- package/dist/index.d.ts +3 -3
- package/dist/lib/adapters/providerImageAdapter.js +83 -10
- package/dist/lib/agent/directTools.d.ts +10 -10
- package/dist/lib/agent/directTools.js +6 -3
- package/dist/lib/config/configManager.js +1 -0
- package/dist/lib/config/conversationMemory.js +1 -0
- package/dist/lib/config/taskClassificationConfig.js +1 -0
- package/dist/lib/constants/index.js +2 -1
- package/dist/lib/constants/performance.js +1 -0
- package/dist/lib/constants/retry.js +1 -0
- package/dist/lib/constants/timeouts.js +1 -0
- package/dist/lib/constants/tokens.js +1 -0
- package/dist/lib/core/analytics.js +1 -0
- package/dist/lib/core/baseProvider.d.ts +5 -0
- package/dist/lib/core/baseProvider.js +71 -20
- package/dist/lib/core/constants.js +1 -0
- package/dist/lib/core/conversationMemoryFactory.js +1 -0
- package/dist/lib/core/conversationMemoryInitializer.js +1 -0
- package/dist/lib/core/conversationMemoryManager.js +1 -0
- package/dist/lib/core/dynamicModels.js +1 -0
- package/dist/lib/core/evaluation.js +1 -0
- package/dist/lib/core/evaluationProviders.js +1 -0
- package/dist/lib/core/factory.js +1 -0
- package/dist/lib/core/modelConfiguration.js +1 -0
- package/dist/lib/core/redisConversationMemoryManager.js +1 -0
- package/dist/lib/core/serviceRegistry.js +1 -0
- package/dist/lib/core/streamAnalytics.js +1 -0
- package/dist/lib/evaluation/contextBuilder.js +1 -0
- package/dist/lib/evaluation/index.js +1 -0
- package/dist/lib/evaluation/prompts.js +1 -0
- package/dist/lib/evaluation/ragasEvaluator.js +1 -0
- package/dist/lib/evaluation/retryManager.js +1 -0
- package/dist/lib/evaluation/scoring.js +1 -0
- package/dist/lib/factories/providerFactory.js +1 -0
- package/dist/lib/factories/providerRegistry.js +1 -0
- package/dist/lib/hitl/hitlErrors.js +1 -0
- package/dist/lib/hitl/hitlManager.js +1 -0
- package/dist/lib/hitl/index.js +1 -0
- package/dist/lib/hitl/types.js +1 -0
- package/dist/lib/index.d.ts +3 -3
- package/dist/lib/index.js +1 -0
- package/dist/lib/mcp/externalServerManager.js +1 -0
- package/dist/lib/mcp/factory.js +1 -0
- package/dist/lib/mcp/flexibleToolValidator.js +1 -0
- package/dist/lib/mcp/index.js +1 -0
- package/dist/lib/mcp/mcpCircuitBreaker.js +1 -0
- package/dist/lib/mcp/mcpClientFactory.js +2 -1
- package/dist/lib/mcp/registry.js +1 -0
- package/dist/lib/mcp/servers/agent/directToolsServer.js +2 -0
- package/dist/lib/mcp/servers/aiProviders/aiAnalysisTools.js +1 -0
- package/dist/lib/mcp/servers/aiProviders/aiCoreServer.js +1 -0
- package/dist/lib/mcp/servers/aiProviders/aiWorkflowTools.js +1 -0
- package/dist/lib/mcp/servers/utilities/utilityServer.js +1 -0
- package/dist/lib/mcp/toolDiscoveryService.js +1 -0
- package/dist/lib/mcp/toolRegistry.js +1 -0
- package/dist/lib/memory/mem0Initializer.js +1 -0
- package/dist/lib/middleware/builtin/analytics.js +1 -0
- package/dist/lib/middleware/builtin/autoEvaluation.js +1 -0
- package/dist/lib/middleware/builtin/guardrails.js +1 -0
- package/dist/lib/middleware/factory.js +1 -0
- package/dist/lib/middleware/index.js +1 -0
- package/dist/lib/middleware/registry.js +1 -0
- package/dist/lib/middleware/utils/guardrailsUtils.js +1 -0
- package/dist/lib/models/modelRegistry.js +1 -0
- package/dist/lib/models/modelResolver.js +2 -0
- package/dist/lib/neurolink.d.ts +6 -0
- package/dist/lib/neurolink.js +135 -5
- package/dist/lib/providers/amazonBedrock.d.ts +1 -0
- package/dist/lib/providers/amazonBedrock.js +166 -14
- package/dist/lib/providers/amazonSagemaker.js +1 -0
- package/dist/lib/providers/anthropic.js +7 -21
- package/dist/lib/providers/anthropicBaseProvider.js +1 -0
- package/dist/lib/providers/azureOpenai.js +5 -21
- package/dist/lib/providers/googleAiStudio.js +5 -21
- package/dist/lib/providers/googleVertex.js +8 -1
- package/dist/lib/providers/huggingFace.js +34 -3
- package/dist/lib/providers/index.js +1 -0
- package/dist/lib/providers/litellm.js +34 -3
- package/dist/lib/providers/mistral.js +32 -2
- package/dist/lib/providers/ollama.d.ts +37 -1
- package/dist/lib/providers/ollama.js +544 -58
- package/dist/lib/providers/openAI.js +5 -21
- package/dist/lib/providers/openaiCompatible.js +41 -4
- package/dist/lib/providers/sagemaker/adaptive-semaphore.js +1 -0
- package/dist/lib/providers/sagemaker/client.js +1 -0
- package/dist/lib/providers/sagemaker/config.js +1 -0
- package/dist/lib/providers/sagemaker/detection.js +1 -0
- package/dist/lib/providers/sagemaker/diagnostics.js +1 -0
- package/dist/lib/providers/sagemaker/error-constants.js +1 -0
- package/dist/lib/providers/sagemaker/errors.js +1 -0
- package/dist/lib/providers/sagemaker/index.js +1 -0
- package/dist/lib/providers/sagemaker/language-model.js +1 -0
- package/dist/lib/providers/sagemaker/parsers.js +1 -0
- package/dist/lib/providers/sagemaker/streaming.js +1 -0
- package/dist/lib/providers/sagemaker/structured-parser.js +1 -0
- package/dist/lib/proxy/awsProxyIntegration.js +1 -0
- package/dist/lib/proxy/proxyFetch.js +1 -0
- package/dist/lib/proxy/utils/noProxyUtils.js +1 -0
- package/dist/lib/sdk/toolRegistration.js +2 -0
- package/dist/lib/services/server/ai/observability/instrumentation.js +1 -0
- package/dist/lib/session/globalSessionState.js +1 -0
- package/dist/lib/telemetry/index.js +1 -0
- package/dist/lib/telemetry/telemetryService.js +1 -0
- package/dist/lib/types/analytics.js +1 -0
- package/dist/lib/types/cli.js +1 -0
- package/dist/lib/types/common.js +1 -0
- package/dist/lib/types/configTypes.js +1 -0
- package/dist/lib/types/content.d.ts +14 -1
- package/dist/lib/types/content.js +1 -0
- package/dist/lib/types/contextTypes.js +1 -0
- package/dist/lib/types/conversation.js +1 -0
- package/dist/lib/types/domainTypes.js +1 -0
- package/dist/lib/types/errors.js +1 -0
- package/dist/lib/types/evaluation.js +1 -0
- package/dist/lib/types/evaluationProviders.js +1 -0
- package/dist/lib/types/evaluationTypes.js +1 -0
- package/dist/lib/types/externalMcp.js +1 -0
- package/dist/lib/types/fileTypes.d.ts +44 -0
- package/dist/lib/types/fileTypes.js +1 -0
- package/dist/lib/types/generateTypes.d.ts +1 -0
- package/dist/lib/types/generateTypes.js +1 -0
- package/dist/lib/types/guardrails.js +1 -0
- package/dist/lib/types/index.js +1 -0
- package/dist/lib/types/mcpTypes.js +1 -0
- package/dist/lib/types/middlewareTypes.js +1 -0
- package/dist/lib/types/modelTypes.js +1 -0
- package/dist/lib/types/observability.js +1 -0
- package/dist/lib/types/providers.d.ts +44 -0
- package/dist/lib/types/providers.js +1 -0
- package/dist/lib/types/sdkTypes.js +1 -0
- package/dist/lib/types/serviceTypes.js +1 -0
- package/dist/lib/types/streamTypes.d.ts +1 -0
- package/dist/lib/types/streamTypes.js +1 -0
- package/dist/lib/types/taskClassificationTypes.js +1 -0
- package/dist/lib/types/tools.js +2 -0
- package/dist/lib/types/typeAliases.js +1 -0
- package/dist/lib/types/universalProviderOptions.js +1 -0
- package/dist/lib/utils/analyticsUtils.js +1 -0
- package/dist/lib/utils/conversationMemory.js +1 -0
- package/dist/lib/utils/conversationMemoryUtils.js +1 -0
- package/dist/lib/utils/csvProcessor.js +1 -0
- package/dist/lib/utils/errorHandling.js +1 -0
- package/dist/lib/utils/evaluationUtils.js +1 -0
- package/dist/lib/utils/factoryProcessing.js +1 -0
- package/dist/lib/utils/fileDetector.js +7 -3
- package/dist/lib/utils/imageProcessor.js +1 -0
- package/dist/lib/utils/logger.js +1 -0
- package/dist/lib/utils/loopUtils.js +1 -0
- package/dist/lib/utils/mcpDefaults.js +1 -0
- package/dist/lib/utils/messageBuilder.js +96 -9
- package/dist/lib/utils/modelRouter.js +1 -0
- package/dist/lib/utils/multimodalOptionsBuilder.d.ts +67 -0
- package/dist/lib/utils/multimodalOptionsBuilder.js +65 -0
- package/dist/lib/utils/optionsConversion.js +1 -0
- package/dist/lib/utils/optionsUtils.js +1 -0
- package/dist/lib/utils/parameterValidation.js +1 -0
- package/dist/lib/utils/pdfProcessor.d.ts +10 -0
- package/dist/lib/utils/pdfProcessor.js +199 -0
- package/dist/lib/utils/performance.js +1 -0
- package/dist/lib/utils/promptRedaction.js +1 -0
- package/dist/lib/utils/providerConfig.js +1 -0
- package/dist/lib/utils/providerHealth.js +1 -0
- package/dist/lib/utils/providerSetupMessages.js +1 -0
- package/dist/lib/utils/providerUtils.js +1 -0
- package/dist/lib/utils/redis.js +1 -0
- package/dist/lib/utils/retryHandler.js +1 -0
- package/dist/lib/utils/schemaConversion.js +1 -0
- package/dist/lib/utils/taskClassificationUtils.js +1 -0
- package/dist/lib/utils/taskClassifier.js +1 -0
- package/dist/lib/utils/timeout.js +1 -0
- package/dist/lib/utils/tokenLimits.js +1 -0
- package/dist/lib/utils/toolUtils.js +1 -0
- package/dist/lib/utils/transformationUtils.js +1 -0
- package/dist/lib/utils/typeUtils.js +1 -0
- package/dist/mcp/mcpClientFactory.js +1 -1
- package/dist/mcp/servers/agent/directToolsServer.js +1 -0
- package/dist/models/modelResolver.js +1 -0
- package/dist/neurolink.d.ts +6 -0
- package/dist/neurolink.js +134 -5
- package/dist/providers/amazonBedrock.d.ts +1 -0
- package/dist/providers/amazonBedrock.js +165 -14
- package/dist/providers/anthropic.js +6 -21
- package/dist/providers/azureOpenai.js +4 -21
- package/dist/providers/googleAiStudio.js +4 -21
- package/dist/providers/googleVertex.js +7 -1
- package/dist/providers/huggingFace.js +33 -3
- package/dist/providers/litellm.js +33 -3
- package/dist/providers/mistral.js +31 -2
- package/dist/providers/ollama.d.ts +37 -1
- package/dist/providers/ollama.js +543 -58
- package/dist/providers/openAI.js +4 -21
- package/dist/providers/openaiCompatible.js +40 -4
- package/dist/sdk/toolRegistration.js +1 -0
- package/dist/types/content.d.ts +14 -1
- package/dist/types/fileTypes.d.ts +44 -0
- package/dist/types/generateTypes.d.ts +1 -0
- package/dist/types/providers.d.ts +44 -0
- package/dist/types/streamTypes.d.ts +1 -0
- package/dist/types/tools.js +1 -0
- package/dist/utils/fileDetector.js +6 -3
- package/dist/utils/messageBuilder.js +95 -9
- package/dist/utils/multimodalOptionsBuilder.d.ts +67 -0
- package/dist/utils/multimodalOptionsBuilder.js +64 -0
- package/dist/utils/pdfProcessor.d.ts +10 -0
- package/dist/utils/pdfProcessor.js +198 -0
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { generateText } from "ai";
|
|
2
|
+
import { generateText, tool as createAISDKTool, jsonSchema } from "ai";
|
|
3
3
|
import { MiddlewareFactory } from "../middleware/factory.js";
|
|
4
4
|
import { logger } from "../utils/logger.js";
|
|
5
5
|
import { DEFAULT_MAX_STEPS, STEP_LIMITS } from "../core/constants.js";
|
|
@@ -234,8 +234,9 @@ export class BaseProvider {
|
|
|
234
234
|
const hasImages = !!input?.images?.length;
|
|
235
235
|
const hasContent = !!input?.content?.length;
|
|
236
236
|
const hasCSVFiles = !!input?.csvFiles?.length;
|
|
237
|
+
const hasPdfFiles = !!input?.pdfFiles?.length;
|
|
237
238
|
const hasFiles = !!input?.files?.length;
|
|
238
|
-
return hasImages || hasContent || hasCSVFiles || hasFiles;
|
|
239
|
+
return hasImages || hasContent || hasCSVFiles || hasPdfFiles || hasFiles;
|
|
239
240
|
};
|
|
240
241
|
let messages;
|
|
241
242
|
if (hasMultimodalInput(options)) {
|
|
@@ -249,6 +250,7 @@ export class BaseProvider {
|
|
|
249
250
|
images: input?.images,
|
|
250
251
|
content: input?.content,
|
|
251
252
|
csvFiles: input?.csvFiles,
|
|
253
|
+
pdfFiles: input?.pdfFiles,
|
|
252
254
|
files: input?.files,
|
|
253
255
|
},
|
|
254
256
|
csvOptions: options.csvOptions,
|
|
@@ -767,22 +769,24 @@ export class BaseProvider {
|
|
|
767
769
|
async createCustomToolFromDefinition(toolName, toolInfo) {
|
|
768
770
|
try {
|
|
769
771
|
logger.debug(`[BaseProvider] Converting custom tool: ${toolName}`);
|
|
770
|
-
// Convert to AI SDK tool format
|
|
771
|
-
const { tool: createAISDKTool } = await import("ai");
|
|
772
|
-
const { z } = await import("zod");
|
|
773
772
|
let finalSchema;
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
773
|
+
let originalInputSchema;
|
|
774
|
+
// Prioritize parameters (Zod), then inputSchema (JSON Schema)
|
|
775
|
+
if (toolInfo.parameters && this.isZodSchema(toolInfo.parameters)) {
|
|
776
|
+
finalSchema = toolInfo.parameters;
|
|
778
777
|
}
|
|
779
|
-
else if (
|
|
780
|
-
|
|
781
|
-
|
|
778
|
+
else if (toolInfo.inputSchema &&
|
|
779
|
+
typeof toolInfo.inputSchema === "object") {
|
|
780
|
+
// Use original JSON Schema with jsonSchema() wrapper - NO CONVERSION!
|
|
781
|
+
originalInputSchema = toolInfo.inputSchema;
|
|
782
|
+
finalSchema = jsonSchema(originalInputSchema);
|
|
783
|
+
}
|
|
784
|
+
else if (toolInfo.parameters &&
|
|
785
|
+
typeof toolInfo.parameters === "object") {
|
|
786
|
+
finalSchema = convertJsonSchemaToZod(toolInfo.parameters);
|
|
782
787
|
}
|
|
783
788
|
else {
|
|
784
789
|
finalSchema = z.object({});
|
|
785
|
-
logger.debug(`[BaseProvider] ${toolName}: No schema found, using empty object`);
|
|
786
790
|
}
|
|
787
791
|
return createAISDKTool({
|
|
788
792
|
description: toolInfo.description || `Tool ${toolName}`,
|
|
@@ -976,7 +980,7 @@ export class BaseProvider {
|
|
|
976
980
|
{};
|
|
977
981
|
if (toolInfo && typeof toolInfo.execute === "function") {
|
|
978
982
|
const tool = await this.createCustomToolFromDefinition(toolName, toolInfo);
|
|
979
|
-
if (tool) {
|
|
983
|
+
if (tool && !tools[toolName]) {
|
|
980
984
|
tools[toolName] = tool;
|
|
981
985
|
}
|
|
982
986
|
}
|
|
@@ -985,17 +989,58 @@ export class BaseProvider {
|
|
|
985
989
|
customToolsProcessed: this.customTools.size,
|
|
986
990
|
});
|
|
987
991
|
}
|
|
992
|
+
/**
|
|
993
|
+
* Recursively fix JSON Schema for OpenAI strict mode compatibility
|
|
994
|
+
* OpenAI requires additionalProperties: false at ALL levels and preserves required array
|
|
995
|
+
*/
|
|
996
|
+
fixSchemaForOpenAIStrictMode(schema) {
|
|
997
|
+
const fixedSchema = JSON.parse(JSON.stringify(schema));
|
|
998
|
+
if (fixedSchema.type === "object" &&
|
|
999
|
+
fixedSchema.properties &&
|
|
1000
|
+
typeof fixedSchema.properties === "object") {
|
|
1001
|
+
const allPropertyNames = Object.keys(fixedSchema.properties);
|
|
1002
|
+
if (!fixedSchema.required || !Array.isArray(fixedSchema.required)) {
|
|
1003
|
+
fixedSchema.required = [];
|
|
1004
|
+
}
|
|
1005
|
+
fixedSchema.additionalProperties = false;
|
|
1006
|
+
for (const propName of allPropertyNames) {
|
|
1007
|
+
const propValue = fixedSchema.properties[propName];
|
|
1008
|
+
if (propValue && typeof propValue === "object") {
|
|
1009
|
+
if (propValue.type === "object") {
|
|
1010
|
+
fixedSchema.properties[propName] =
|
|
1011
|
+
this.fixSchemaForOpenAIStrictMode(propValue);
|
|
1012
|
+
}
|
|
1013
|
+
else if (propValue.type === "array" &&
|
|
1014
|
+
propValue.items &&
|
|
1015
|
+
typeof propValue.items === "object") {
|
|
1016
|
+
fixedSchema.properties[propName].items =
|
|
1017
|
+
this.fixSchemaForOpenAIStrictMode(propValue.items);
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
return fixedSchema;
|
|
1023
|
+
}
|
|
988
1024
|
/**
|
|
989
1025
|
* Create an external MCP tool
|
|
990
1026
|
*/
|
|
991
1027
|
async createExternalMCPTool(tool) {
|
|
992
1028
|
try {
|
|
993
1029
|
logger.debug(`[BaseProvider] Converting external MCP tool: ${tool.name}`);
|
|
994
|
-
//
|
|
995
|
-
|
|
1030
|
+
// Use original JSON Schema from MCP tool if available, otherwise use permissive schema
|
|
1031
|
+
let finalSchema;
|
|
1032
|
+
if (tool.inputSchema && typeof tool.inputSchema === "object") {
|
|
1033
|
+
// Clone and fix the schema for OpenAI strict mode compatibility
|
|
1034
|
+
const originalSchema = tool.inputSchema;
|
|
1035
|
+
const fixedSchema = this.fixSchemaForOpenAIStrictMode(originalSchema);
|
|
1036
|
+
finalSchema = jsonSchema(fixedSchema);
|
|
1037
|
+
}
|
|
1038
|
+
else {
|
|
1039
|
+
finalSchema = this.createPermissiveZodSchema();
|
|
1040
|
+
}
|
|
996
1041
|
return createAISDKTool({
|
|
997
1042
|
description: tool.description || `External MCP tool ${tool.name}`,
|
|
998
|
-
parameters:
|
|
1043
|
+
parameters: finalSchema,
|
|
999
1044
|
execute: async (params) => {
|
|
1000
1045
|
logger.debug(`Executing external MCP tool: ${tool.name}`, {
|
|
1001
1046
|
toolName: tool.name,
|
|
@@ -1118,7 +1163,7 @@ export class BaseProvider {
|
|
|
1118
1163
|
logger.debug(`[BaseProvider] Found ${externalTools.length} external MCP tools`);
|
|
1119
1164
|
for (const tool of externalTools) {
|
|
1120
1165
|
const mcpTool = await this.createExternalMCPTool(tool);
|
|
1121
|
-
if (mcpTool) {
|
|
1166
|
+
if (mcpTool && !tools[tool.name]) {
|
|
1122
1167
|
tools[tool.name] = mcpTool;
|
|
1123
1168
|
logger.debug(`[BaseProvider] Successfully added external MCP tool: ${tool.name}`);
|
|
1124
1169
|
}
|
|
@@ -1141,9 +1186,14 @@ export class BaseProvider {
|
|
|
1141
1186
|
// Set empty tools object - MCP tools are handled at a higher level
|
|
1142
1187
|
this.mcpTools = {};
|
|
1143
1188
|
}
|
|
1144
|
-
// Add MCP tools if available
|
|
1189
|
+
// Add MCP tools if available, but don't overwrite existing direct tools
|
|
1190
|
+
// Direct tools (Zod-based) take precedence over MCP tools (JSON Schema)
|
|
1145
1191
|
if (this.mcpTools) {
|
|
1146
|
-
Object.
|
|
1192
|
+
for (const [name, tool] of Object.entries(this.mcpTools)) {
|
|
1193
|
+
if (!tools[name]) {
|
|
1194
|
+
tools[name] = tool;
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1147
1197
|
}
|
|
1148
1198
|
}
|
|
1149
1199
|
/**
|
|
@@ -1599,3 +1649,4 @@ export class BaseProvider {
|
|
|
1599
1649
|
};
|
|
1600
1650
|
}
|
|
1601
1651
|
}
|
|
1652
|
+
//# sourceMappingURL=baseProvider.js.map
|
package/dist/lib/core/factory.js
CHANGED
package/dist/lib/hitl/index.js
CHANGED
package/dist/lib/hitl/types.js
CHANGED
package/dist/lib/index.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export declare const VERSION = "1.0.0";
|
|
|
38
38
|
* const result = await provider.stream({ input: { text: 'Hello, AI!' } });
|
|
39
39
|
* ```
|
|
40
40
|
*/
|
|
41
|
-
export declare function createAIProvider(providerName?: string, modelName?: string): Promise<import("./
|
|
41
|
+
export declare function createAIProvider(providerName?: string, modelName?: string): Promise<import("./types/providers.js").AIProvider>;
|
|
42
42
|
/**
|
|
43
43
|
* Create provider with automatic fallback
|
|
44
44
|
*
|
|
@@ -49,7 +49,7 @@ export declare function createAIProvider(providerName?: string, modelName?: stri
|
|
|
49
49
|
* const { primary, fallback } = await createAIProviderWithFallback('bedrock', 'vertex');
|
|
50
50
|
* ```
|
|
51
51
|
*/
|
|
52
|
-
export declare function createAIProviderWithFallback(primaryProvider?: string, fallbackProvider?: string, modelName?: string): Promise<import("./types/typeAliases.js").ProviderPairResult<import("./
|
|
52
|
+
export declare function createAIProviderWithFallback(primaryProvider?: string, fallbackProvider?: string, modelName?: string): Promise<import("./types/typeAliases.js").ProviderPairResult<import("./types/providers.js").AIProvider>>;
|
|
53
53
|
/**
|
|
54
54
|
* Create the best available provider based on configuration
|
|
55
55
|
*
|
|
@@ -60,7 +60,7 @@ export declare function createAIProviderWithFallback(primaryProvider?: string, f
|
|
|
60
60
|
* const provider = await createBestAIProvider();
|
|
61
61
|
* ```
|
|
62
62
|
*/
|
|
63
|
-
export declare function createBestAIProvider(requestedProvider?: string, modelName?: string): Promise<import("./
|
|
63
|
+
export declare function createBestAIProvider(requestedProvider?: string, modelName?: string): Promise<import("./types/providers.js").AIProvider>;
|
|
64
64
|
/**
|
|
65
65
|
* MCP (Model Context Protocol) Plugin Ecosystem
|
|
66
66
|
*
|
package/dist/lib/index.js
CHANGED
package/dist/lib/mcp/factory.js
CHANGED
package/dist/lib/mcp/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
|
7
7
|
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
|
|
8
8
|
import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js";
|
|
9
9
|
import { WebSocketClientTransport } from "@modelcontextprotocol/sdk/client/websocket.js";
|
|
10
|
-
import { spawn } from "child_process";
|
|
10
|
+
import { spawn, ChildProcess } from "child_process";
|
|
11
11
|
import { mcpLogger } from "../utils/logger.js";
|
|
12
12
|
import { globalCircuitBreakerManager } from "./mcpCircuitBreaker.js";
|
|
13
13
|
/**
|
|
@@ -470,3 +470,4 @@ export class MCPClientFactory {
|
|
|
470
470
|
return { ...this.DEFAULT_CAPABILITIES };
|
|
471
471
|
}
|
|
472
472
|
}
|
|
473
|
+
//# sourceMappingURL=mcpClientFactory.js.map
|
package/dist/lib/mcp/registry.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* NeuroLink Direct Tools Server
|
|
3
3
|
* Wraps the agent direct tools as an MCP server for proper registration
|
|
4
4
|
*/
|
|
5
|
+
import { z } from "zod";
|
|
5
6
|
import { createMCPServer } from "../../factory.js";
|
|
6
7
|
import { directAgentTools } from "../../../agent/directTools.js";
|
|
7
8
|
import { logger } from "../../../utils/logger.js";
|
|
@@ -142,3 +143,4 @@ function getToolCategory(toolName) {
|
|
|
142
143
|
return "utility";
|
|
143
144
|
}
|
|
144
145
|
}
|
|
146
|
+
//# sourceMappingURL=directToolsServer.js.map
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Provides model resolution, search, and recommendation functionality
|
|
4
4
|
* Part of Phase 4.1 - Models Command System
|
|
5
5
|
*/
|
|
6
|
+
import { AIProviderName } from "../types/index.js";
|
|
6
7
|
import { MODEL_REGISTRY, MODEL_ALIASES, USE_CASE_RECOMMENDATIONS, getAllModels, getModelById, getModelsByProvider, getAvailableProviders, calculateCost, formatModelForDisplay, } from "./modelRegistry.js";
|
|
7
8
|
import { isNonNullObject } from "../utils/typeUtils.js";
|
|
8
9
|
/**
|
|
@@ -466,3 +467,4 @@ export function formatComparison(comparison) {
|
|
|
466
467
|
},
|
|
467
468
|
};
|
|
468
469
|
}
|
|
470
|
+
//# sourceMappingURL=modelResolver.js.map
|
package/dist/lib/neurolink.d.ts
CHANGED
|
@@ -1076,6 +1076,12 @@ export declare class NeuroLink {
|
|
|
1076
1076
|
* Unregister all external MCP tools from the main registry
|
|
1077
1077
|
*/
|
|
1078
1078
|
private unregisterAllExternalMCPToolsFromRegistry;
|
|
1079
|
+
/**
|
|
1080
|
+
* Dispose of all resources and cleanup connections
|
|
1081
|
+
* Call this method when done using the NeuroLink instance to prevent resource leaks
|
|
1082
|
+
* Especially important in test environments where multiple instances are created
|
|
1083
|
+
*/
|
|
1084
|
+
dispose(): Promise<void>;
|
|
1079
1085
|
}
|
|
1080
1086
|
export declare const neurolink: NeuroLink;
|
|
1081
1087
|
export default neurolink;
|