@juspay/neurolink 6.2.0 → 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.
Files changed (182) hide show
  1. package/CHANGELOG.md +33 -16
  2. package/README.md +3 -3
  3. package/dist/agent/{direct-tools.js → directTools.js} +6 -5
  4. package/dist/cli/index.js +6 -6
  5. package/dist/cli/utils/{complete-setup.d.ts → completeSetup.d.ts} +1 -1
  6. package/dist/cli/utils/{complete-setup.js → completeSetup.js} +2 -2
  7. package/dist/config/configManager.js +11 -10
  8. package/dist/{lib/core/base-provider.d.ts → core/baseProvider.d.ts} +1 -1
  9. package/dist/core/{base-provider.js → baseProvider.js} +2 -2
  10. package/dist/core/{dynamic-models.js → dynamicModels.js} +1 -1
  11. package/dist/core/evaluation.js +1 -1
  12. package/dist/core/factory.js +5 -5
  13. package/dist/core/types.d.ts +2 -2
  14. package/dist/{lib/factories/provider-registry.js → factories/providerRegistry.js} +9 -9
  15. package/dist/index.d.ts +4 -4
  16. package/dist/index.js +1 -1
  17. package/dist/lib/agent/{direct-tools.js → directTools.js} +6 -5
  18. package/dist/lib/config/configManager.js +11 -10
  19. package/dist/{core/base-provider.d.ts → lib/core/baseProvider.d.ts} +1 -1
  20. package/dist/lib/core/{base-provider.js → baseProvider.js} +2 -2
  21. package/dist/lib/core/{dynamic-models.js → dynamicModels.js} +1 -1
  22. package/dist/lib/core/evaluation.js +1 -1
  23. package/dist/lib/core/factory.js +3 -3
  24. package/dist/lib/core/types.d.ts +2 -2
  25. package/dist/{factories/provider-registry.js → lib/factories/providerRegistry.js} +9 -9
  26. package/dist/lib/index.d.ts +4 -4
  27. package/dist/lib/index.js +1 -1
  28. package/dist/lib/mcp/factory.d.ts +2 -2
  29. package/dist/lib/mcp/factory.js +2 -2
  30. package/dist/lib/mcp/index.d.ts +2 -2
  31. package/dist/lib/mcp/index.js +1 -1
  32. package/dist/lib/mcp/registry.js +1 -1
  33. package/dist/lib/mcp/servers/agent/{direct-tools-server.js → directToolsServer.js} +1 -1
  34. package/dist/lib/mcp/servers/{ai-providers/ai-analysis-tools.js → aiProviders/aiAnalysisTools.js} +2 -1
  35. package/dist/lib/mcp/servers/{ai-providers/ai-core-server.js → aiProviders/aiCoreServer.js} +1 -1
  36. package/dist/lib/mcp/{tool-registry.js → toolRegistry.js} +1 -1
  37. package/dist/lib/neurolink.d.ts +4 -4
  38. package/dist/lib/neurolink.js +5 -5
  39. package/dist/lib/providers/{amazon-bedrock.d.ts → amazonBedrock.d.ts} +2 -2
  40. package/dist/lib/providers/{amazon-bedrock.js → amazonBedrock.js} +1 -1
  41. package/dist/lib/providers/anthropic.d.ts +2 -2
  42. package/dist/lib/providers/anthropic.js +1 -1
  43. package/dist/{providers/anthropic-baseprovider.d.ts → lib/providers/anthropicBaseProvider.d.ts} +2 -2
  44. package/dist/lib/providers/{anthropic-baseprovider.js → anthropicBaseProvider.js} +1 -1
  45. package/dist/{providers/azure-openai.d.ts → lib/providers/azureOpenai.d.ts} +2 -2
  46. package/dist/{providers/azure-openai.js → lib/providers/azureOpenai.js} +3 -2
  47. package/dist/{providers/google-ai-studio.d.ts → lib/providers/googleAiStudio.d.ts} +2 -2
  48. package/dist/lib/providers/{google-ai-studio.js → googleAiStudio.js} +1 -1
  49. package/dist/{providers/google-vertex.d.ts → lib/providers/googleVertex.d.ts} +2 -2
  50. package/dist/lib/providers/{google-vertex.js → googleVertex.js} +1 -1
  51. package/dist/lib/providers/huggingFace.d.ts +2 -2
  52. package/dist/lib/providers/huggingFace.js +1 -1
  53. package/dist/lib/providers/index.d.ts +4 -4
  54. package/dist/lib/providers/index.js +4 -4
  55. package/dist/lib/providers/mistral.d.ts +2 -2
  56. package/dist/lib/providers/mistral.js +1 -1
  57. package/dist/lib/providers/ollama.d.ts +2 -2
  58. package/dist/lib/providers/ollama.js +1 -1
  59. package/dist/lib/providers/openAI.d.ts +2 -2
  60. package/dist/lib/providers/openAI.js +1 -1
  61. package/dist/{sdk/tool-registration.d.ts → lib/sdk/toolRegistration.d.ts} +1 -1
  62. package/dist/lib/telemetry/index.d.ts +2 -2
  63. package/dist/lib/telemetry/index.js +5 -4
  64. package/dist/lib/utils/logger.d.ts +62 -2
  65. package/dist/lib/utils/logger.js +174 -9
  66. package/dist/lib/utils/providerConfig.js +1 -1
  67. package/dist/lib/utils/{provider-setup-messages.js → providerSetupMessages.js} +1 -1
  68. package/dist/lib/utils/providerUtils.js +1 -1
  69. package/dist/mcp/factory.d.ts +2 -2
  70. package/dist/mcp/factory.js +2 -2
  71. package/dist/mcp/index.d.ts +2 -2
  72. package/dist/mcp/index.js +1 -1
  73. package/dist/mcp/registry.js +1 -1
  74. package/dist/mcp/servers/agent/{direct-tools-server.js → directToolsServer.js} +1 -1
  75. package/dist/mcp/servers/{ai-providers/ai-analysis-tools.js → aiProviders/aiAnalysisTools.js} +2 -1
  76. package/dist/mcp/servers/{ai-providers/ai-core-server.js → aiProviders/aiCoreServer.js} +2 -2
  77. package/dist/mcp/{tool-registry.js → toolRegistry.js} +1 -1
  78. package/dist/neurolink.d.ts +5 -5
  79. package/dist/neurolink.js +5 -5
  80. package/dist/providers/{amazon-bedrock.d.ts → amazonBedrock.d.ts} +2 -2
  81. package/dist/providers/{amazon-bedrock.js → amazonBedrock.js} +1 -1
  82. package/dist/providers/anthropic.d.ts +2 -2
  83. package/dist/providers/anthropic.js +1 -1
  84. package/dist/{lib/providers/anthropic-baseprovider.d.ts → providers/anthropicBaseProvider.d.ts} +2 -2
  85. package/dist/providers/{anthropic-baseprovider.js → anthropicBaseProvider.js} +1 -1
  86. package/dist/{lib/providers/azure-openai.d.ts → providers/azureOpenai.d.ts} +2 -2
  87. package/dist/{lib/providers/azure-openai.js → providers/azureOpenai.js} +3 -2
  88. package/dist/{lib/providers/google-ai-studio.d.ts → providers/googleAiStudio.d.ts} +2 -2
  89. package/dist/providers/{google-ai-studio.js → googleAiStudio.js} +2 -2
  90. package/dist/{lib/providers/google-vertex.d.ts → providers/googleVertex.d.ts} +2 -2
  91. package/dist/providers/{google-vertex.js → googleVertex.js} +1 -1
  92. package/dist/providers/huggingFace.d.ts +2 -2
  93. package/dist/providers/huggingFace.js +1 -1
  94. package/dist/providers/index.d.ts +4 -4
  95. package/dist/providers/index.js +4 -4
  96. package/dist/providers/mistral.d.ts +2 -2
  97. package/dist/providers/mistral.js +1 -1
  98. package/dist/providers/ollama.d.ts +2 -2
  99. package/dist/providers/ollama.js +1 -1
  100. package/dist/providers/openAI.d.ts +2 -2
  101. package/dist/providers/openAI.js +1 -1
  102. package/dist/{lib/sdk/tool-registration.d.ts → sdk/toolRegistration.d.ts} +1 -1
  103. package/dist/telemetry/index.d.ts +2 -2
  104. package/dist/telemetry/index.js +5 -4
  105. package/dist/utils/logger.d.ts +62 -2
  106. package/dist/utils/logger.js +174 -9
  107. package/dist/utils/providerConfig.js +1 -1
  108. package/dist/utils/{provider-setup-messages.js → providerSetupMessages.js} +1 -1
  109. package/dist/utils/providerUtils.js +1 -1
  110. package/package.json +23 -22
  111. package/dist/lib/mcp/logging.d.ts +0 -38
  112. package/dist/lib/mcp/logging.js +0 -100
  113. package/dist/mcp/logging.d.ts +0 -38
  114. package/dist/mcp/logging.js +0 -100
  115. /package/dist/agent/{direct-tools.d.ts → directTools.d.ts} +0 -0
  116. /package/dist/cli/factories/{command-factory.d.ts → commandFactory.d.ts} +0 -0
  117. /package/dist/cli/factories/{command-factory.js → commandFactory.js} +0 -0
  118. /package/dist/cli/utils/{env-manager.d.ts → envManager.d.ts} +0 -0
  119. /package/dist/cli/utils/{env-manager.js → envManager.js} +0 -0
  120. /package/dist/cli/utils/{interactive-setup.d.ts → interactiveSetup.d.ts} +0 -0
  121. /package/dist/cli/utils/{interactive-setup.js → interactiveSetup.js} +0 -0
  122. /package/dist/core/{dynamic-models.d.ts → dynamicModels.d.ts} +0 -0
  123. /package/dist/core/{evaluation-providers.d.ts → evaluationProviders.d.ts} +0 -0
  124. /package/dist/core/{evaluation-providers.js → evaluationProviders.js} +0 -0
  125. /package/dist/core/{service-registry.d.ts → serviceRegistry.d.ts} +0 -0
  126. /package/dist/core/{service-registry.js → serviceRegistry.js} +0 -0
  127. /package/dist/factories/{provider-factory.d.ts → providerFactory.d.ts} +0 -0
  128. /package/dist/factories/{provider-factory.js → providerFactory.js} +0 -0
  129. /package/dist/factories/{provider-registry.d.ts → providerRegistry.d.ts} +0 -0
  130. /package/dist/lib/agent/{direct-tools.d.ts → directTools.d.ts} +0 -0
  131. /package/dist/lib/core/{dynamic-models.d.ts → dynamicModels.d.ts} +0 -0
  132. /package/dist/lib/core/{evaluation-providers.d.ts → evaluationProviders.d.ts} +0 -0
  133. /package/dist/lib/core/{evaluation-providers.js → evaluationProviders.js} +0 -0
  134. /package/dist/lib/core/{service-registry.d.ts → serviceRegistry.d.ts} +0 -0
  135. /package/dist/lib/core/{service-registry.js → serviceRegistry.js} +0 -0
  136. /package/dist/lib/factories/{provider-factory.d.ts → providerFactory.d.ts} +0 -0
  137. /package/dist/lib/factories/{provider-factory.js → providerFactory.js} +0 -0
  138. /package/dist/lib/factories/{provider-registry.d.ts → providerRegistry.d.ts} +0 -0
  139. /package/dist/lib/mcp/servers/agent/{direct-tools-server.d.ts → directToolsServer.d.ts} +0 -0
  140. /package/dist/lib/mcp/servers/{ai-providers/ai-analysis-tools.d.ts → aiProviders/aiAnalysisTools.d.ts} +0 -0
  141. /package/dist/lib/mcp/servers/{ai-providers/ai-core-server.d.ts → aiProviders/aiCoreServer.d.ts} +0 -0
  142. /package/dist/lib/mcp/servers/{ai-providers/ai-workflow-tools.d.ts → aiProviders/aiWorkflowTools.d.ts} +0 -0
  143. /package/dist/lib/mcp/servers/{ai-providers/ai-workflow-tools.js → aiProviders/aiWorkflowTools.js} +0 -0
  144. /package/dist/lib/mcp/servers/utilities/{utility-server.d.ts → utilityServer.d.ts} +0 -0
  145. /package/dist/lib/mcp/servers/utilities/{utility-server.js → utilityServer.js} +0 -0
  146. /package/dist/lib/mcp/{tool-registry.d.ts → toolRegistry.d.ts} +0 -0
  147. /package/dist/lib/proxy/{proxy-fetch.d.ts → proxyFetch.d.ts} +0 -0
  148. /package/dist/lib/proxy/{proxy-fetch.js → proxyFetch.js} +0 -0
  149. /package/dist/lib/sdk/{tool-registration.js → toolRegistration.js} +0 -0
  150. /package/dist/lib/telemetry/{telemetry-service.d.ts → telemetryService.d.ts} +0 -0
  151. /package/dist/lib/telemetry/{telemetry-service.js → telemetryService.js} +0 -0
  152. /package/dist/lib/types/{generate-types.d.ts → generateTypes.d.ts} +0 -0
  153. /package/dist/lib/types/{generate-types.js → generateTypes.js} +0 -0
  154. /package/dist/lib/types/{mcp-types.d.ts → mcpTypes.d.ts} +0 -0
  155. /package/dist/lib/types/{mcp-types.js → mcpTypes.js} +0 -0
  156. /package/dist/lib/types/{stream-types.d.ts → streamTypes.d.ts} +0 -0
  157. /package/dist/lib/types/{stream-types.js → streamTypes.js} +0 -0
  158. /package/dist/lib/types/{universal-provider-options.d.ts → universalProviderOptions.d.ts} +0 -0
  159. /package/dist/lib/types/{universal-provider-options.js → universalProviderOptions.js} +0 -0
  160. /package/dist/lib/utils/{provider-setup-messages.d.ts → providerSetupMessages.d.ts} +0 -0
  161. /package/dist/mcp/servers/agent/{direct-tools-server.d.ts → directToolsServer.d.ts} +0 -0
  162. /package/dist/mcp/servers/{ai-providers/ai-analysis-tools.d.ts → aiProviders/aiAnalysisTools.d.ts} +0 -0
  163. /package/dist/mcp/servers/{ai-providers/ai-core-server.d.ts → aiProviders/aiCoreServer.d.ts} +0 -0
  164. /package/dist/mcp/servers/{ai-providers/ai-workflow-tools.d.ts → aiProviders/aiWorkflowTools.d.ts} +0 -0
  165. /package/dist/mcp/servers/{ai-providers/ai-workflow-tools.js → aiProviders/aiWorkflowTools.js} +0 -0
  166. /package/dist/mcp/servers/utilities/{utility-server.d.ts → utilityServer.d.ts} +0 -0
  167. /package/dist/mcp/servers/utilities/{utility-server.js → utilityServer.js} +0 -0
  168. /package/dist/mcp/{tool-registry.d.ts → toolRegistry.d.ts} +0 -0
  169. /package/dist/proxy/{proxy-fetch.d.ts → proxyFetch.d.ts} +0 -0
  170. /package/dist/proxy/{proxy-fetch.js → proxyFetch.js} +0 -0
  171. /package/dist/sdk/{tool-registration.js → toolRegistration.js} +0 -0
  172. /package/dist/telemetry/{telemetry-service.d.ts → telemetryService.d.ts} +0 -0
  173. /package/dist/telemetry/{telemetry-service.js → telemetryService.js} +0 -0
  174. /package/dist/types/{generate-types.d.ts → generateTypes.d.ts} +0 -0
  175. /package/dist/types/{generate-types.js → generateTypes.js} +0 -0
  176. /package/dist/types/{mcp-types.d.ts → mcpTypes.d.ts} +0 -0
  177. /package/dist/types/{mcp-types.js → mcpTypes.js} +0 -0
  178. /package/dist/types/{stream-types.d.ts → streamTypes.d.ts} +0 -0
  179. /package/dist/types/{stream-types.js → streamTypes.js} +0 -0
  180. /package/dist/types/{universal-provider-options.d.ts → universalProviderOptions.d.ts} +0 -0
  181. /package/dist/types/{universal-provider-options.js → universalProviderOptions.js} +0 -0
  182. /package/dist/utils/{provider-setup-messages.d.ts → providerSetupMessages.d.ts} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { logger } from "../utils/logger.js";
2
- import { directAgentTools } from "../agent/direct-tools.js";
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 function-calling dependency
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("function-calling", {
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/provider-registry.js";
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),
@@ -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/provider-factory.js";
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 - function-calling removed`);
106
- // MCP wrapping simplified - removed function-calling dependency
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`, {
@@ -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/generate-types.js";
4
- import type { StreamOptions, StreamResult } from "../types/stream-types.js";
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 "./provider-factory.js";
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("./provider-factory.js");
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/google-ai-studio.js");
28
+ const { GoogleAIStudioProvider } = await import("../providers/googleAiStudio.js");
29
29
  return new GoogleAIStudioProvider(modelName, sdk);
30
- }, GoogleAIModels.GEMINI_2_5_FLASH, ["google-ai-studio", "google", "gemini", "google-ai"]);
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/amazon-bedrock.js");
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/azure-openai.js");
49
+ const { AzureOpenAIProvider } = await import("../providers/azureOpenai.js");
50
50
  return new AzureOpenAIProvider(modelName);
51
- }, "gpt-4o-mini", ["azure", "azure-openai"]);
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/google-vertex.js");
54
+ const { GoogleVertexProvider } = await import("../providers/googleVertex.js");
55
55
  return new GoogleVertexProvider(modelName);
56
- }, "gemini-2.5-pro", ["vertex", "google-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");
@@ -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/generate-types.js";
13
- export type { SimpleTool, ToolContext } from "./sdk/tool-registration.js";
14
- export { createTool, createTypedTool, validateTool, } from "./sdk/tool-registration.js";
15
- export type { InMemoryMCPServerConfig, InMemoryToolInfo, InMemoryToolResult, } from "./types/mcp-types.js";
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/tool-registration.js";
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 = "ai-providers" | "frameworks" | "development" | "business" | "content" | "data" | "integrations" | "automation" | "analysis" | "custom";
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: 'ai-providers'
133
+ * category: 'aiProviders'
134
134
  * });
135
135
  *
136
136
  * aiCoreServer.registerTool({
@@ -14,7 +14,7 @@ const ServerConfigSchema = z.object({
14
14
  version: z.string().optional(),
15
15
  category: z
16
16
  .enum([
17
- "ai-providers",
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: 'ai-providers'
49
+ * category: 'aiProviders'
50
50
  * });
51
51
  *
52
52
  * aiCoreServer.registerTool({
@@ -4,8 +4,8 @@
4
4
  * Implementation based on research blueprint
5
5
  */
6
6
  export type { McpMetadata, ExecutionContext, DiscoveredMcp, ToolInfo, ToolExecutionResult, } from "./contracts/mcpContract.js";
7
- export { mcpLogger } from "./logging.js";
8
- export type { LogLevel } from "./logging.js";
7
+ export { mcpLogger } from "../utils/logger.js";
8
+ export type { LogLevel } from "../utils/logger.js";
9
9
  import type { McpMetadata } from "./contracts/mcpContract.js";
10
10
  /**
11
11
  * Initialize the MCP ecosystem - simplified
@@ -4,7 +4,7 @@
4
4
  * Implementation based on research blueprint
5
5
  */
6
6
  // Core functionality exports
7
- export { mcpLogger } from "./logging.js";
7
+ export { mcpLogger } from "../utils/logger.js";
8
8
  /**
9
9
  * Initialize the MCP ecosystem - simplified
10
10
  */
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * MCP Registry - Industry Standard Interface with camelCase
3
3
  */
4
- import { registryLogger } from "./logging.js";
4
+ import { registryLogger } from "../utils/logger.js";
5
5
  /**
6
6
  * Simple MCP registry for plugin management
7
7
  * Maintains backward compatibility with existing code
@@ -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/direct-tools.js";
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
@@ -6,6 +6,7 @@
6
6
  import { z } from "zod";
7
7
  import { AIProviderFactory } from "../../../core/factory.js";
8
8
  import { getBestProvider, getAvailableProviders, } from "../../../utils/providerUtils.js";
9
+ import { logger } from "../../../utils/logger.js";
9
10
  /**
10
11
  * Input Schemas for AI Analysis Tools
11
12
  */
@@ -89,7 +90,7 @@ const analyzeAIUsageTool = {
89
90
  const typedParams = params;
90
91
  const startTime = Date.now();
91
92
  try {
92
- console.log(`[AI-Analysis] Starting real AI-powered usage analysis for timeRange: ${typedParams.timeRange}`);
93
+ logger.debug(`[AI-Analysis] Starting real AI-powered usage analysis for timeRange: ${typedParams.timeRange}`);
93
94
  const providerName = await getBestProvider();
94
95
  const provider = await AIProviderFactory.createProvider(providerName);
95
96
  if (!provider) {
@@ -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: "ai-providers",
18
+ category: "aiProviders",
19
19
  version: "1.2.0",
20
20
  capabilities: [
21
21
  "provider-selection",
@@ -3,7 +3,7 @@
3
3
  * Updated to match industry standard camelCase interfaces
4
4
  */
5
5
  import { MCPRegistry } from "./registry.js";
6
- import { registryLogger } from "./logging.js";
6
+ import { registryLogger } from "../utils/logger.js";
7
7
  import { randomUUID } from "crypto";
8
8
  export class MCPToolRegistry extends MCPRegistry {
9
9
  tools = new Map();
@@ -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/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";
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";
@@ -14,12 +14,12 @@ catch (error) {
14
14
  // Environment variables should be set externally in production
15
15
  }
16
16
  import { AIProviderFactory } from "./core/factory.js";
17
- import { mcpLogger } from "./mcp/logging.js";
18
- import { toolRegistry } from "./mcp/tool-registry.js";
17
+ import { mcpLogger } from "./utils/logger.js";
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/provider-registry.js";
22
- import { validateTool, createMCPServerFromTools, } from "./sdk/tool-registration.js";
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
- "google-vertex",
670
+ "googleVertex",
671
671
  "anthropic",
672
672
  "azure",
673
673
  "google-ai",
@@ -1,8 +1,8 @@
1
1
  import type { ZodType, ZodTypeDef } from "zod";
2
2
  import { type Schema, type LanguageModelV1 } from "ai";
3
3
  import type { AIProviderName } from "../core/types.js";
4
- import type { StreamOptions, StreamResult } from "../types/stream-types.js";
5
- import { BaseProvider } from "../core/base-provider.js";
4
+ import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
5
+ import { BaseProvider } from "../core/baseProvider.js";
6
6
  /**
7
7
  * Amazon Bedrock Provider v2 - BaseProvider Implementation
8
8
  *
@@ -1,6 +1,6 @@
1
1
  import { createAmazonBedrock } from "@ai-sdk/amazon-bedrock";
2
2
  import { streamText } from "ai";
3
- import { BaseProvider } from "../core/base-provider.js";
3
+ import { BaseProvider } from "../core/baseProvider.js";
4
4
  import { logger } from "../utils/logger.js";
5
5
  import { TimeoutError, } from "../utils/timeout.js";
6
6
  import { DEFAULT_MAX_TOKENS } from "../core/constants.js";
@@ -1,8 +1,8 @@
1
1
  import type { ZodType, ZodTypeDef } from "zod";
2
2
  import { type Schema, type LanguageModelV1 } from "ai";
3
3
  import type { AIProviderName } from "../core/types.js";
4
- import type { StreamOptions, StreamResult } from "../types/stream-types.js";
5
- import { BaseProvider } from "../core/base-provider.js";
4
+ import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
5
+ import { BaseProvider } from "../core/baseProvider.js";
6
6
  /**
7
7
  * Anthropic Provider v2 - BaseProvider Implementation
8
8
  * Fixed syntax and enhanced with proper error handling
@@ -1,6 +1,6 @@
1
1
  import { anthropic } from "@ai-sdk/anthropic";
2
2
  import { streamText } from "ai";
3
- import { BaseProvider } from "../core/base-provider.js";
3
+ import { BaseProvider } from "../core/baseProvider.js";
4
4
  import { logger } from "../utils/logger.js";
5
5
  import { createTimeoutController, TimeoutError, } from "../utils/timeout.js";
6
6
  import { DEFAULT_MAX_TOKENS } from "../core/constants.js";
@@ -1,8 +1,8 @@
1
1
  import type { ZodType, ZodTypeDef } from "zod";
2
2
  import { type Schema, type LanguageModelV1 } from "ai";
3
3
  import type { AIProviderName } from "../core/types.js";
4
- import type { StreamOptions, StreamResult } from "../types/stream-types.js";
5
- import { BaseProvider } from "../core/base-provider.js";
4
+ import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
5
+ import { BaseProvider } from "../core/baseProvider.js";
6
6
  /**
7
7
  * Anthropic provider implementation using BaseProvider pattern
8
8
  * Migrated from direct API calls to Vercel AI SDK (@ai-sdk/anthropic)
@@ -1,6 +1,6 @@
1
1
  import { createAnthropic } from "@ai-sdk/anthropic";
2
2
  import { streamText } from "ai";
3
- import { BaseProvider } from "../core/base-provider.js";
3
+ import { BaseProvider } from "../core/baseProvider.js";
4
4
  import { logger } from "../utils/logger.js";
5
5
  import { createTimeoutController, TimeoutError, } from "../utils/timeout.js";
6
6
  import { DEFAULT_MAX_TOKENS } from "../core/constants.js";
@@ -1,7 +1,7 @@
1
1
  import { type LanguageModelV1 } from "ai";
2
- import { BaseProvider } from "../core/base-provider.js";
2
+ import { BaseProvider } from "../core/baseProvider.js";
3
3
  import type { AIProviderName } from "../core/types.js";
4
- import type { StreamOptions, StreamResult } from "../types/stream-types.js";
4
+ import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
5
5
  export declare class AzureOpenAIProvider extends BaseProvider {
6
6
  private apiKey;
7
7
  private resourceName;
@@ -1,7 +1,8 @@
1
1
  import { createAzure } from "@ai-sdk/azure";
2
2
  import { streamText } from "ai";
3
- import { BaseProvider } from "../core/base-provider.js";
3
+ import { BaseProvider } from "../core/baseProvider.js";
4
4
  import { validateApiKey, createAzureAPIKeyConfig, createAzureEndpointConfig, } from "../utils/providerConfig.js";
5
+ import { logger } from "../utils/logger.js";
5
6
  export class AzureOpenAIProvider extends BaseProvider {
6
7
  apiKey;
7
8
  resourceName;
@@ -35,7 +36,7 @@ export class AzureOpenAIProvider extends BaseProvider {
35
36
  apiKey: this.apiKey,
36
37
  apiVersion: this.apiVersion,
37
38
  });
38
- console.log("Azure Vercel Provider initialized", {
39
+ logger.debug("Azure Vercel Provider initialized", {
39
40
  deployment: this.deployment,
40
41
  resourceName: this.resourceName,
41
42
  provider: "azure-vercel",
@@ -1,8 +1,8 @@
1
1
  import type { ZodType, ZodTypeDef } from "zod";
2
2
  import { type Schema, type LanguageModelV1 } from "ai";
3
3
  import type { AIProviderName } from "../core/types.js";
4
- import type { StreamOptions, StreamResult } from "../types/stream-types.js";
5
- import { BaseProvider } from "../core/base-provider.js";
4
+ import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
5
+ import { BaseProvider } from "../core/baseProvider.js";
6
6
  /**
7
7
  * Google AI Studio provider implementation using BaseProvider
8
8
  * Migrated from original GoogleAIStudio class to new factory pattern
@@ -1,7 +1,7 @@
1
1
  import { createGoogleGenerativeAI } from "@ai-sdk/google";
2
2
  import { streamText } from "ai";
3
3
  import { GoogleAIModels } from "../core/types.js";
4
- import { BaseProvider } from "../core/base-provider.js";
4
+ import { BaseProvider } from "../core/baseProvider.js";
5
5
  import { logger } from "../utils/logger.js";
6
6
  import { createTimeoutController, TimeoutError, } from "../utils/timeout.js";
7
7
  import { DEFAULT_MAX_TOKENS } from "../core/constants.js";
@@ -1,8 +1,8 @@
1
1
  import type { ZodType, ZodTypeDef } from "zod";
2
2
  import { type Schema, type LanguageModelV1 } from "ai";
3
3
  import type { AIProviderName } from "../core/types.js";
4
- import type { StreamOptions, StreamResult } from "../types/stream-types.js";
5
- import { BaseProvider } from "../core/base-provider.js";
4
+ import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
5
+ import { BaseProvider } from "../core/baseProvider.js";
6
6
  /**
7
7
  * Google Vertex AI Provider v2 - BaseProvider Implementation
8
8
  *
@@ -1,6 +1,6 @@
1
1
  import { createVertex, } from "@ai-sdk/google-vertex";
2
2
  import { streamText } from "ai";
3
- import { BaseProvider } from "../core/base-provider.js";
3
+ import { BaseProvider } from "../core/baseProvider.js";
4
4
  import { logger } from "../utils/logger.js";
5
5
  import { TimeoutError, } from "../utils/timeout.js";
6
6
  import { DEFAULT_MAX_TOKENS } from "../core/constants.js";
@@ -1,8 +1,8 @@
1
1
  import type { ZodType, ZodTypeDef } from "zod";
2
2
  import { type Schema, type LanguageModelV1 } from "ai";
3
3
  import type { AIProviderName } from "../core/types.js";
4
- import type { StreamOptions, StreamResult } from "../types/stream-types.js";
5
- import { BaseProvider } from "../core/base-provider.js";
4
+ import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
5
+ import { BaseProvider } from "../core/baseProvider.js";
6
6
  /**
7
7
  * HuggingFace Provider - BaseProvider Implementation
8
8
  * Using AI SDK with HuggingFace's OpenAI-compatible endpoint
@@ -1,6 +1,6 @@
1
1
  import { createOpenAI } from "@ai-sdk/openai";
2
2
  import { streamText } from "ai";
3
- import { BaseProvider } from "../core/base-provider.js";
3
+ import { BaseProvider } from "../core/baseProvider.js";
4
4
  import { logger } from "../utils/logger.js";
5
5
  import { createTimeoutController, TimeoutError, } from "../utils/timeout.js";
6
6
  import { DEFAULT_MAX_TOKENS } from "../core/constants.js";
@@ -2,12 +2,12 @@
2
2
  * Provider exports for Vercel AI SDK integration
3
3
  * This file centralizes all AI provider classes for easy import and usage
4
4
  */
5
- export { GoogleVertexProvider as GoogleVertexAI } from "./google-vertex.js";
6
- export { AmazonBedrockProvider as AmazonBedrock } from "./amazon-bedrock.js";
5
+ export { GoogleVertexProvider as GoogleVertexAI } from "./googleVertex.js";
6
+ export { AmazonBedrockProvider as AmazonBedrock } from "./amazonBedrock.js";
7
7
  export { OpenAIProvider as OpenAI } from "./openAI.js";
8
8
  export { AnthropicProvider as AnthropicProvider } from "./anthropic.js";
9
- export { AzureOpenAIProvider } from "./azure-openai.js";
10
- export { GoogleAIStudioProvider as GoogleAIStudio } from "./google-ai-studio.js";
9
+ export { AzureOpenAIProvider } from "./azureOpenai.js";
10
+ export { GoogleAIStudioProvider as GoogleAIStudio } from "./googleAiStudio.js";
11
11
  export { HuggingFaceProvider as HuggingFace } from "./huggingFace.js";
12
12
  export { OllamaProvider as Ollama } from "./ollama.js";
13
13
  export { MistralProvider as MistralAI } from "./mistral.js";
@@ -2,12 +2,12 @@
2
2
  * Provider exports for Vercel AI SDK integration
3
3
  * This file centralizes all AI provider classes for easy import and usage
4
4
  */
5
- export { GoogleVertexProvider as GoogleVertexAI } from "./google-vertex.js";
6
- export { AmazonBedrockProvider as AmazonBedrock } from "./amazon-bedrock.js";
5
+ export { GoogleVertexProvider as GoogleVertexAI } from "./googleVertex.js";
6
+ export { AmazonBedrockProvider as AmazonBedrock } from "./amazonBedrock.js";
7
7
  export { OpenAIProvider as OpenAI } from "./openAI.js";
8
8
  export { AnthropicProvider as AnthropicProvider } from "./anthropic.js";
9
- export { AzureOpenAIProvider } from "./azure-openai.js";
10
- export { GoogleAIStudioProvider as GoogleAIStudio } from "./google-ai-studio.js";
9
+ export { AzureOpenAIProvider } from "./azureOpenai.js";
10
+ export { GoogleAIStudioProvider as GoogleAIStudio } from "./googleAiStudio.js";
11
11
  export { HuggingFaceProvider as HuggingFace } from "./huggingFace.js";
12
12
  export { OllamaProvider as Ollama } from "./ollama.js";
13
13
  export { MistralProvider as MistralAI } from "./mistral.js";
@@ -1,7 +1,7 @@
1
1
  import { type LanguageModelV1 } from "ai";
2
2
  import type { AIProviderName, TextGenerationOptions, EnhancedGenerateResult } from "../core/types.js";
3
- import type { StreamOptions, StreamResult } from "../types/stream-types.js";
4
- import { BaseProvider } from "../core/base-provider.js";
3
+ import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
4
+ import { BaseProvider } from "../core/baseProvider.js";
5
5
  /**
6
6
  * Mistral AI Provider v2 - BaseProvider Implementation
7
7
  * Supports official AI-SDK integration with all Mistral models
@@ -1,6 +1,6 @@
1
1
  import { createMistral } from "@ai-sdk/mistral";
2
2
  import { streamText } from "ai";
3
- import { BaseProvider } from "../core/base-provider.js";
3
+ import { BaseProvider } from "../core/baseProvider.js";
4
4
  import { logger } from "../utils/logger.js";
5
5
  import { createAnalytics } from "../core/analytics.js";
6
6
  import { validateApiKey, createMistralConfig, getProviderModel, } from "../utils/providerConfig.js";
@@ -1,9 +1,9 @@
1
1
  import type { AIProviderName } from "../core/types.js";
2
2
  import type { LanguageModelV1 } from "ai";
3
- import type { StreamOptions, StreamResult } from "../types/stream-types.js";
3
+ import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
4
4
  import type { ZodType, ZodTypeDef } from "zod";
5
5
  import type { Schema } from "ai";
6
- import { BaseProvider } from "../core/base-provider.js";
6
+ import { BaseProvider } from "../core/baseProvider.js";
7
7
  /**
8
8
  * Ollama Provider v2 - BaseProvider Implementation
9
9
  *
@@ -1,4 +1,4 @@
1
- import { BaseProvider } from "../core/base-provider.js";
1
+ import { BaseProvider } from "../core/baseProvider.js";
2
2
  import { logger } from "../utils/logger.js";
3
3
  import { TimeoutError } from "../utils/timeout.js";
4
4
  import { DEFAULT_MAX_TOKENS } from "../core/constants.js";
@@ -1,8 +1,8 @@
1
1
  import type { ZodType, ZodTypeDef } from "zod";
2
2
  import { type Schema, type LanguageModelV1 } from "ai";
3
3
  import { AIProviderName } from "../core/types.js";
4
- import type { StreamOptions, StreamResult } from "../types/stream-types.js";
5
- import { BaseProvider } from "../core/base-provider.js";
4
+ import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
5
+ import { BaseProvider } from "../core/baseProvider.js";
6
6
  /**
7
7
  * OpenAI Provider v2 - BaseProvider Implementation
8
8
  * Migrated to use factory pattern with exact Google AI provider pattern
@@ -1,7 +1,7 @@
1
1
  import { openai } from "@ai-sdk/openai";
2
2
  import { streamText } from "ai";
3
3
  import { AIProviderName } from "../core/types.js";
4
- import { BaseProvider } from "../core/base-provider.js";
4
+ import { BaseProvider } from "../core/baseProvider.js";
5
5
  import { logger } from "../utils/logger.js";
6
6
  import { createTimeoutController, TimeoutError, } from "../utils/timeout.js";
7
7
  import { DEFAULT_MAX_TOKENS } from "../core/constants.js";
@@ -5,7 +5,7 @@
5
5
  import { z } from "zod";
6
6
  import type { Tool } from "ai";
7
7
  import { logger } from "../utils/logger.js";
8
- import type { InMemoryMCPServerConfig, InMemoryToolInfo } from "../types/mcp-types.js";
8
+ import type { InMemoryMCPServerConfig, InMemoryToolInfo } from "../types/mcpTypes.js";
9
9
  import type { ToolArgs, ToolContext as CoreToolContext, ToolResult, SimpleTool as CoreSimpleTool } from "../types/tools.js";
10
10
  import type { JsonValue } from "../types/common.js";
11
11
  /**
@@ -1,9 +1,9 @@
1
- export { TelemetryService, type HealthMetrics } from "./telemetry-service.js";
1
+ export { TelemetryService, type HealthMetrics } from "./telemetryService.js";
2
2
  /**
3
3
  * Initialize telemetry for NeuroLink
4
4
  * OPTIONAL - Only works when NEUROLINK_TELEMETRY_ENABLED=true
5
5
  */
6
- export declare function initializeTelemetry(): Promise<import("./telemetry-service.js").TelemetryService>;
6
+ export declare function initializeTelemetry(): Promise<import("./telemetryService.js").TelemetryService>;
7
7
  /**
8
8
  * Get telemetry status
9
9
  */