@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.
Files changed (242) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +12 -9
  3. package/dist/adapters/providerImageAdapter.js +82 -10
  4. package/dist/agent/directTools.d.ts +10 -10
  5. package/dist/agent/directTools.js +5 -3
  6. package/dist/cli/commands/config.js +1 -0
  7. package/dist/cli/commands/mcp.js +1 -0
  8. package/dist/cli/commands/models.js +1 -0
  9. package/dist/cli/commands/ollama.js +1 -0
  10. package/dist/cli/commands/setup-anthropic.js +1 -0
  11. package/dist/cli/commands/setup-azure.js +1 -0
  12. package/dist/cli/commands/setup-bedrock.js +1 -0
  13. package/dist/cli/commands/setup-gcp.js +1 -0
  14. package/dist/cli/commands/setup-google-ai.js +1 -0
  15. package/dist/cli/commands/setup-huggingface.js +1 -0
  16. package/dist/cli/commands/setup-mistral.js +1 -0
  17. package/dist/cli/commands/setup-openai.js +1 -0
  18. package/dist/cli/commands/setup.js +1 -0
  19. package/dist/cli/errorHandler.js +1 -0
  20. package/dist/cli/factories/commandFactory.d.ts +1 -0
  21. package/dist/cli/factories/commandFactory.js +23 -6
  22. package/dist/cli/factories/ollamaCommandFactory.js +1 -0
  23. package/dist/cli/factories/sagemakerCommandFactory.js +1 -0
  24. package/dist/cli/factories/setupCommandFactory.js +1 -0
  25. package/dist/cli/index.js +1 -0
  26. package/dist/cli/loop/conversationSelector.js +1 -0
  27. package/dist/cli/loop/optionsSchema.js +1 -0
  28. package/dist/cli/loop/session.js +1 -0
  29. package/dist/cli/parser.js +1 -0
  30. package/dist/cli/utils/completeSetup.js +1 -0
  31. package/dist/cli/utils/envManager.js +1 -0
  32. package/dist/cli/utils/interactiveSetup.js +1 -0
  33. package/dist/cli/utils/ollamaUtils.js +1 -0
  34. package/dist/constants/index.js +1 -1
  35. package/dist/core/baseProvider.d.ts +5 -0
  36. package/dist/core/baseProvider.js +70 -20
  37. package/dist/index.d.ts +3 -3
  38. package/dist/lib/adapters/providerImageAdapter.js +83 -10
  39. package/dist/lib/agent/directTools.d.ts +10 -10
  40. package/dist/lib/agent/directTools.js +6 -3
  41. package/dist/lib/config/configManager.js +1 -0
  42. package/dist/lib/config/conversationMemory.js +1 -0
  43. package/dist/lib/config/taskClassificationConfig.js +1 -0
  44. package/dist/lib/constants/index.js +2 -1
  45. package/dist/lib/constants/performance.js +1 -0
  46. package/dist/lib/constants/retry.js +1 -0
  47. package/dist/lib/constants/timeouts.js +1 -0
  48. package/dist/lib/constants/tokens.js +1 -0
  49. package/dist/lib/core/analytics.js +1 -0
  50. package/dist/lib/core/baseProvider.d.ts +5 -0
  51. package/dist/lib/core/baseProvider.js +71 -20
  52. package/dist/lib/core/constants.js +1 -0
  53. package/dist/lib/core/conversationMemoryFactory.js +1 -0
  54. package/dist/lib/core/conversationMemoryInitializer.js +1 -0
  55. package/dist/lib/core/conversationMemoryManager.js +1 -0
  56. package/dist/lib/core/dynamicModels.js +1 -0
  57. package/dist/lib/core/evaluation.js +1 -0
  58. package/dist/lib/core/evaluationProviders.js +1 -0
  59. package/dist/lib/core/factory.js +1 -0
  60. package/dist/lib/core/modelConfiguration.js +1 -0
  61. package/dist/lib/core/redisConversationMemoryManager.js +1 -0
  62. package/dist/lib/core/serviceRegistry.js +1 -0
  63. package/dist/lib/core/streamAnalytics.js +1 -0
  64. package/dist/lib/evaluation/contextBuilder.js +1 -0
  65. package/dist/lib/evaluation/index.js +1 -0
  66. package/dist/lib/evaluation/prompts.js +1 -0
  67. package/dist/lib/evaluation/ragasEvaluator.js +1 -0
  68. package/dist/lib/evaluation/retryManager.js +1 -0
  69. package/dist/lib/evaluation/scoring.js +1 -0
  70. package/dist/lib/factories/providerFactory.js +1 -0
  71. package/dist/lib/factories/providerRegistry.js +1 -0
  72. package/dist/lib/hitl/hitlErrors.js +1 -0
  73. package/dist/lib/hitl/hitlManager.js +1 -0
  74. package/dist/lib/hitl/index.js +1 -0
  75. package/dist/lib/hitl/types.js +1 -0
  76. package/dist/lib/index.d.ts +3 -3
  77. package/dist/lib/index.js +1 -0
  78. package/dist/lib/mcp/externalServerManager.js +1 -0
  79. package/dist/lib/mcp/factory.js +1 -0
  80. package/dist/lib/mcp/flexibleToolValidator.js +1 -0
  81. package/dist/lib/mcp/index.js +1 -0
  82. package/dist/lib/mcp/mcpCircuitBreaker.js +1 -0
  83. package/dist/lib/mcp/mcpClientFactory.js +2 -1
  84. package/dist/lib/mcp/registry.js +1 -0
  85. package/dist/lib/mcp/servers/agent/directToolsServer.js +2 -0
  86. package/dist/lib/mcp/servers/aiProviders/aiAnalysisTools.js +1 -0
  87. package/dist/lib/mcp/servers/aiProviders/aiCoreServer.js +1 -0
  88. package/dist/lib/mcp/servers/aiProviders/aiWorkflowTools.js +1 -0
  89. package/dist/lib/mcp/servers/utilities/utilityServer.js +1 -0
  90. package/dist/lib/mcp/toolDiscoveryService.js +1 -0
  91. package/dist/lib/mcp/toolRegistry.js +1 -0
  92. package/dist/lib/memory/mem0Initializer.js +1 -0
  93. package/dist/lib/middleware/builtin/analytics.js +1 -0
  94. package/dist/lib/middleware/builtin/autoEvaluation.js +1 -0
  95. package/dist/lib/middleware/builtin/guardrails.js +1 -0
  96. package/dist/lib/middleware/factory.js +1 -0
  97. package/dist/lib/middleware/index.js +1 -0
  98. package/dist/lib/middleware/registry.js +1 -0
  99. package/dist/lib/middleware/utils/guardrailsUtils.js +1 -0
  100. package/dist/lib/models/modelRegistry.js +1 -0
  101. package/dist/lib/models/modelResolver.js +2 -0
  102. package/dist/lib/neurolink.d.ts +6 -0
  103. package/dist/lib/neurolink.js +135 -5
  104. package/dist/lib/providers/amazonBedrock.d.ts +1 -0
  105. package/dist/lib/providers/amazonBedrock.js +166 -14
  106. package/dist/lib/providers/amazonSagemaker.js +1 -0
  107. package/dist/lib/providers/anthropic.js +7 -21
  108. package/dist/lib/providers/anthropicBaseProvider.js +1 -0
  109. package/dist/lib/providers/azureOpenai.js +5 -21
  110. package/dist/lib/providers/googleAiStudio.js +5 -21
  111. package/dist/lib/providers/googleVertex.js +8 -1
  112. package/dist/lib/providers/huggingFace.js +34 -3
  113. package/dist/lib/providers/index.js +1 -0
  114. package/dist/lib/providers/litellm.js +34 -3
  115. package/dist/lib/providers/mistral.js +32 -2
  116. package/dist/lib/providers/ollama.d.ts +37 -1
  117. package/dist/lib/providers/ollama.js +544 -58
  118. package/dist/lib/providers/openAI.js +5 -21
  119. package/dist/lib/providers/openaiCompatible.js +41 -4
  120. package/dist/lib/providers/sagemaker/adaptive-semaphore.js +1 -0
  121. package/dist/lib/providers/sagemaker/client.js +1 -0
  122. package/dist/lib/providers/sagemaker/config.js +1 -0
  123. package/dist/lib/providers/sagemaker/detection.js +1 -0
  124. package/dist/lib/providers/sagemaker/diagnostics.js +1 -0
  125. package/dist/lib/providers/sagemaker/error-constants.js +1 -0
  126. package/dist/lib/providers/sagemaker/errors.js +1 -0
  127. package/dist/lib/providers/sagemaker/index.js +1 -0
  128. package/dist/lib/providers/sagemaker/language-model.js +1 -0
  129. package/dist/lib/providers/sagemaker/parsers.js +1 -0
  130. package/dist/lib/providers/sagemaker/streaming.js +1 -0
  131. package/dist/lib/providers/sagemaker/structured-parser.js +1 -0
  132. package/dist/lib/proxy/awsProxyIntegration.js +1 -0
  133. package/dist/lib/proxy/proxyFetch.js +1 -0
  134. package/dist/lib/proxy/utils/noProxyUtils.js +1 -0
  135. package/dist/lib/sdk/toolRegistration.js +2 -0
  136. package/dist/lib/services/server/ai/observability/instrumentation.js +1 -0
  137. package/dist/lib/session/globalSessionState.js +1 -0
  138. package/dist/lib/telemetry/index.js +1 -0
  139. package/dist/lib/telemetry/telemetryService.js +1 -0
  140. package/dist/lib/types/analytics.js +1 -0
  141. package/dist/lib/types/cli.js +1 -0
  142. package/dist/lib/types/common.js +1 -0
  143. package/dist/lib/types/configTypes.js +1 -0
  144. package/dist/lib/types/content.d.ts +14 -1
  145. package/dist/lib/types/content.js +1 -0
  146. package/dist/lib/types/contextTypes.js +1 -0
  147. package/dist/lib/types/conversation.js +1 -0
  148. package/dist/lib/types/domainTypes.js +1 -0
  149. package/dist/lib/types/errors.js +1 -0
  150. package/dist/lib/types/evaluation.js +1 -0
  151. package/dist/lib/types/evaluationProviders.js +1 -0
  152. package/dist/lib/types/evaluationTypes.js +1 -0
  153. package/dist/lib/types/externalMcp.js +1 -0
  154. package/dist/lib/types/fileTypes.d.ts +44 -0
  155. package/dist/lib/types/fileTypes.js +1 -0
  156. package/dist/lib/types/generateTypes.d.ts +1 -0
  157. package/dist/lib/types/generateTypes.js +1 -0
  158. package/dist/lib/types/guardrails.js +1 -0
  159. package/dist/lib/types/index.js +1 -0
  160. package/dist/lib/types/mcpTypes.js +1 -0
  161. package/dist/lib/types/middlewareTypes.js +1 -0
  162. package/dist/lib/types/modelTypes.js +1 -0
  163. package/dist/lib/types/observability.js +1 -0
  164. package/dist/lib/types/providers.d.ts +44 -0
  165. package/dist/lib/types/providers.js +1 -0
  166. package/dist/lib/types/sdkTypes.js +1 -0
  167. package/dist/lib/types/serviceTypes.js +1 -0
  168. package/dist/lib/types/streamTypes.d.ts +1 -0
  169. package/dist/lib/types/streamTypes.js +1 -0
  170. package/dist/lib/types/taskClassificationTypes.js +1 -0
  171. package/dist/lib/types/tools.js +2 -0
  172. package/dist/lib/types/typeAliases.js +1 -0
  173. package/dist/lib/types/universalProviderOptions.js +1 -0
  174. package/dist/lib/utils/analyticsUtils.js +1 -0
  175. package/dist/lib/utils/conversationMemory.js +1 -0
  176. package/dist/lib/utils/conversationMemoryUtils.js +1 -0
  177. package/dist/lib/utils/csvProcessor.js +1 -0
  178. package/dist/lib/utils/errorHandling.js +1 -0
  179. package/dist/lib/utils/evaluationUtils.js +1 -0
  180. package/dist/lib/utils/factoryProcessing.js +1 -0
  181. package/dist/lib/utils/fileDetector.js +7 -3
  182. package/dist/lib/utils/imageProcessor.js +1 -0
  183. package/dist/lib/utils/logger.js +1 -0
  184. package/dist/lib/utils/loopUtils.js +1 -0
  185. package/dist/lib/utils/mcpDefaults.js +1 -0
  186. package/dist/lib/utils/messageBuilder.js +96 -9
  187. package/dist/lib/utils/modelRouter.js +1 -0
  188. package/dist/lib/utils/multimodalOptionsBuilder.d.ts +67 -0
  189. package/dist/lib/utils/multimodalOptionsBuilder.js +65 -0
  190. package/dist/lib/utils/optionsConversion.js +1 -0
  191. package/dist/lib/utils/optionsUtils.js +1 -0
  192. package/dist/lib/utils/parameterValidation.js +1 -0
  193. package/dist/lib/utils/pdfProcessor.d.ts +10 -0
  194. package/dist/lib/utils/pdfProcessor.js +199 -0
  195. package/dist/lib/utils/performance.js +1 -0
  196. package/dist/lib/utils/promptRedaction.js +1 -0
  197. package/dist/lib/utils/providerConfig.js +1 -0
  198. package/dist/lib/utils/providerHealth.js +1 -0
  199. package/dist/lib/utils/providerSetupMessages.js +1 -0
  200. package/dist/lib/utils/providerUtils.js +1 -0
  201. package/dist/lib/utils/redis.js +1 -0
  202. package/dist/lib/utils/retryHandler.js +1 -0
  203. package/dist/lib/utils/schemaConversion.js +1 -0
  204. package/dist/lib/utils/taskClassificationUtils.js +1 -0
  205. package/dist/lib/utils/taskClassifier.js +1 -0
  206. package/dist/lib/utils/timeout.js +1 -0
  207. package/dist/lib/utils/tokenLimits.js +1 -0
  208. package/dist/lib/utils/toolUtils.js +1 -0
  209. package/dist/lib/utils/transformationUtils.js +1 -0
  210. package/dist/lib/utils/typeUtils.js +1 -0
  211. package/dist/mcp/mcpClientFactory.js +1 -1
  212. package/dist/mcp/servers/agent/directToolsServer.js +1 -0
  213. package/dist/models/modelResolver.js +1 -0
  214. package/dist/neurolink.d.ts +6 -0
  215. package/dist/neurolink.js +134 -5
  216. package/dist/providers/amazonBedrock.d.ts +1 -0
  217. package/dist/providers/amazonBedrock.js +165 -14
  218. package/dist/providers/anthropic.js +6 -21
  219. package/dist/providers/azureOpenai.js +4 -21
  220. package/dist/providers/googleAiStudio.js +4 -21
  221. package/dist/providers/googleVertex.js +7 -1
  222. package/dist/providers/huggingFace.js +33 -3
  223. package/dist/providers/litellm.js +33 -3
  224. package/dist/providers/mistral.js +31 -2
  225. package/dist/providers/ollama.d.ts +37 -1
  226. package/dist/providers/ollama.js +543 -58
  227. package/dist/providers/openAI.js +4 -21
  228. package/dist/providers/openaiCompatible.js +40 -4
  229. package/dist/sdk/toolRegistration.js +1 -0
  230. package/dist/types/content.d.ts +14 -1
  231. package/dist/types/fileTypes.d.ts +44 -0
  232. package/dist/types/generateTypes.d.ts +1 -0
  233. package/dist/types/providers.d.ts +44 -0
  234. package/dist/types/streamTypes.d.ts +1 -0
  235. package/dist/types/tools.js +1 -0
  236. package/dist/utils/fileDetector.js +6 -3
  237. package/dist/utils/messageBuilder.js +95 -9
  238. package/dist/utils/multimodalOptionsBuilder.d.ts +67 -0
  239. package/dist/utils/multimodalOptionsBuilder.js +64 -0
  240. package/dist/utils/pdfProcessor.d.ts +10 -0
  241. package/dist/utils/pdfProcessor.js +198 -0
  242. package/package.json +3 -3
@@ -9,6 +9,7 @@ import { DEFAULT_MAX_STEPS } from "../core/constants.js";
9
9
  import { validateApiKey, createOpenAIConfig, getProviderModel, } from "../utils/providerConfig.js";
10
10
  import { streamAnalyticsCollector } from "../core/streamAnalytics.js";
11
11
  import { buildMessagesArray, buildMultimodalMessagesArray, convertToCoreMessages, } from "../utils/messageBuilder.js";
12
+ import { buildMultimodalOptions } from "../utils/multimodalOptionsBuilder.js";
12
13
  import { createProxyFetch } from "../proxy/proxyFetch.js";
13
14
  import { isZodSchema } from "../utils/schemaConversion.js";
14
15
  // Configuration helpers - now using consolidated utility
@@ -248,7 +249,8 @@ export class OpenAIProvider extends BaseProvider {
248
249
  const hasMultimodalInput = !!(options.input?.images?.length ||
249
250
  options.input?.content?.length ||
250
251
  options.input?.files?.length ||
251
- options.input?.csvFiles?.length);
252
+ options.input?.csvFiles?.length ||
253
+ options.input?.pdfFiles?.length);
252
254
  let messages;
253
255
  if (hasMultimodalInput) {
254
256
  logger.debug(`OpenAI: Detected multimodal input, using multimodal message builder`, {
@@ -261,26 +263,7 @@ export class OpenAIProvider extends BaseProvider {
261
263
  hasCSVFiles: !!options.input?.csvFiles?.length,
262
264
  csvFileCount: options.input?.csvFiles?.length || 0,
263
265
  });
264
- // Create multimodal options for buildMultimodalMessagesArray
265
- const multimodalOptions = {
266
- input: {
267
- text: options.input?.text || "",
268
- images: options.input?.images,
269
- content: options.input?.content,
270
- files: options.input?.files,
271
- csvFiles: options.input?.csvFiles,
272
- },
273
- csvOptions: options.csvOptions,
274
- systemPrompt: options.systemPrompt,
275
- conversationHistory: options.conversationMessages,
276
- provider: this.providerName,
277
- model: this.modelName,
278
- temperature: options.temperature,
279
- maxTokens: options.maxTokens,
280
- enableAnalytics: options.enableAnalytics,
281
- enableEvaluation: options.enableEvaluation,
282
- context: options.context,
283
- };
266
+ const multimodalOptions = buildMultimodalOptions(options, this.providerName, this.modelName);
284
267
  const mm = await buildMultimodalMessagesArray(multimodalOptions, this.providerName, this.modelName);
285
268
  // Convert multimodal messages to Vercel AI SDK format (CoreMessage[])
286
269
  messages = convertToCoreMessages(mm);
@@ -492,3 +475,4 @@ export class OpenAIProvider extends BaseProvider {
492
475
  }
493
476
  // Export for factory registration
494
477
  export default OpenAIProvider;
478
+ //# sourceMappingURL=openAI.js.map
@@ -5,6 +5,9 @@ import { logger } from "../utils/logger.js";
5
5
  import { createTimeoutController, TimeoutError } from "../utils/timeout.js";
6
6
  import { streamAnalyticsCollector } from "../core/streamAnalytics.js";
7
7
  import { createProxyFetch } from "../proxy/proxyFetch.js";
8
+ import { DEFAULT_MAX_STEPS } from "../core/constants.js";
9
+ import { buildMessagesArray, buildMultimodalMessagesArray, convertToCoreMessages, } from "../utils/messageBuilder.js";
10
+ import { buildMultimodalOptions } from "../utils/multimodalOptionsBuilder.js";
8
11
  // Constants
9
12
  const FALLBACK_OPENAI_COMPATIBLE_MODEL = "gpt-3.5-turbo";
10
13
  // Configuration helpers
@@ -157,13 +160,46 @@ export class OpenAICompatibleProvider extends BaseProvider {
157
160
  const timeout = this.getTimeout(options);
158
161
  const timeoutController = createTimeoutController(timeout, this.providerName, "stream");
159
162
  try {
163
+ // Check for multimodal input (images, PDFs, CSVs, files)
164
+ const hasMultimodalInput = !!(options.input?.images?.length ||
165
+ options.input?.content?.length ||
166
+ options.input?.files?.length ||
167
+ options.input?.csvFiles?.length ||
168
+ options.input?.pdfFiles?.length);
169
+ let messages;
170
+ if (hasMultimodalInput) {
171
+ logger.debug(`OpenAI Compatible: Detected multimodal input, using multimodal message builder`, {
172
+ hasImages: !!options.input?.images?.length,
173
+ imageCount: options.input?.images?.length || 0,
174
+ hasContent: !!options.input?.content?.length,
175
+ contentCount: options.input?.content?.length || 0,
176
+ hasFiles: !!options.input?.files?.length,
177
+ fileCount: options.input?.files?.length || 0,
178
+ hasCSVFiles: !!options.input?.csvFiles?.length,
179
+ csvFileCount: options.input?.csvFiles?.length || 0,
180
+ hasPDFFiles: !!options.input?.pdfFiles?.length,
181
+ pdfFileCount: options.input?.pdfFiles?.length || 0,
182
+ });
183
+ const multimodalOptions = buildMultimodalOptions(options, this.providerName, this.modelName);
184
+ const mm = await buildMultimodalMessagesArray(multimodalOptions, this.providerName, this.modelName);
185
+ // Convert multimodal messages to Vercel AI SDK format (CoreMessage[])
186
+ messages = convertToCoreMessages(mm);
187
+ }
188
+ else {
189
+ logger.debug(`OpenAI Compatible: Text-only input, using standard message builder`);
190
+ messages = await buildMessagesArray(options);
191
+ }
160
192
  const model = await this.getAISDKModelWithMiddleware(options); // This is where network connection happens!
161
193
  const result = streamText({
162
194
  model,
163
- prompt: options.input.text,
164
- system: options.systemPrompt,
165
- temperature: options.temperature,
166
- maxTokens: options.maxTokens, // No default limit - unlimited unless specified
195
+ messages: messages,
196
+ ...(options.maxTokens !== null && options.maxTokens !== undefined
197
+ ? { maxTokens: options.maxTokens }
198
+ : {}),
199
+ ...(options.temperature !== null && options.temperature !== undefined
200
+ ? { temperature: options.temperature }
201
+ : {}),
202
+ maxSteps: options.maxSteps || DEFAULT_MAX_STEPS,
167
203
  tools: options.tools,
168
204
  toolChoice: "auto",
169
205
  abortSignal: timeoutController?.controller.signal,
@@ -265,3 +301,4 @@ export class OpenAICompatibleProvider extends BaseProvider {
265
301
  ];
266
302
  }
267
303
  }
304
+ //# sourceMappingURL=openaiCompatible.js.map
@@ -213,3 +213,4 @@ export function createAdaptiveSemaphore(initialConcurrency, maxConcurrency = 10,
213
213
  minConcurrency,
214
214
  });
215
215
  }
216
+ //# sourceMappingURL=adaptive-semaphore.js.map
@@ -470,3 +470,4 @@ export async function testSageMakerConnectivity(config, endpointName) {
470
470
  client.dispose();
471
471
  }
472
472
  }
473
+ //# sourceMappingURL=client.js.map
@@ -315,3 +315,4 @@ export function checkSageMakerConfiguration() {
315
315
  summary: getConfigurationSummary(),
316
316
  };
317
317
  }
318
+ //# sourceMappingURL=config.js.map
@@ -604,3 +604,4 @@ export class SageMakerDetector {
604
604
  export function createSageMakerDetector(config) {
605
605
  return new SageMakerDetector(config);
606
606
  }
607
+ //# sourceMappingURL=detection.js.map
@@ -135,3 +135,4 @@ export function formatDiagnosticReport(report) {
135
135
  lines.push(`${statusIcon} Overall Status: ${statusColor(report.overallStatus.toUpperCase())}`);
136
136
  return lines.join("\n");
137
137
  }
138
+ //# sourceMappingURL=diagnostics.js.map
@@ -225,3 +225,4 @@ export const ERROR_KEYWORDS = {
225
225
  NETWORK: ["network"],
226
226
  ENDPOINT_NOT_FOUND: ["endpoint", "not found"],
227
227
  };
228
+ //# sourceMappingURL=error-constants.js.map
@@ -297,3 +297,4 @@ export function getRetryDelay(error, attempt = 1) {
297
297
  // Default exponential backoff
298
298
  return 1000 * Math.pow(2, attempt - 1);
299
299
  }
300
+ //# sourceMappingURL=errors.js.map
@@ -65,3 +65,4 @@ export async function validateSageMakerSetup() {
65
65
  * Default export for convenience
66
66
  */
67
67
  export { AmazonSageMakerProvider as default };
68
+ //# sourceMappingURL=index.js.map
@@ -761,3 +761,4 @@ export class SageMakerLanguageModel {
761
761
  }
762
762
  }
763
763
  export default SageMakerLanguageModel;
764
+ //# sourceMappingURL=language-model.js.map
@@ -632,3 +632,4 @@ export function estimateTokenUsage(prompt, completion) {
632
632
  total: promptTokens + completionTokens,
633
633
  };
634
634
  }
635
+ //# sourceMappingURL=parsers.js.map
@@ -329,3 +329,4 @@ export function estimateTokenUsage(prompt, completion) {
329
329
  total: promptTokens + completionTokens,
330
330
  };
331
331
  }
332
+ //# sourceMappingURL=streaming.js.map
@@ -623,3 +623,4 @@ export function extractSchemaFromResponseFormat(responseFormat) {
623
623
  }
624
624
  return undefined;
625
625
  }
626
+ //# sourceMappingURL=structured-parser.js.map
@@ -283,3 +283,4 @@ export async function testAWSProxyConnectivity() {
283
283
  return false;
284
284
  }
285
285
  }
286
+ //# sourceMappingURL=awsProxyIntegration.js.map
@@ -322,3 +322,4 @@ export function getProxyStatus() {
322
322
  ],
323
323
  };
324
324
  }
325
+ //# sourceMappingURL=proxyFetch.js.map
@@ -147,3 +147,4 @@ export function shouldBypassProxySimple(targetUrl, noProxyValue) {
147
147
  return false;
148
148
  }
149
149
  }
150
+ //# sourceMappingURL=noProxyUtils.js.map
@@ -2,6 +2,7 @@
2
2
  * NeuroLink SDK Tool Registration API
3
3
  * Simple interface for developers to register custom tools
4
4
  */
5
+ import { z } from "zod";
5
6
  import { logger } from "../utils/logger.js";
6
7
  import { createMCPServerInfo } from "../utils/mcpDefaults.js";
7
8
  import { validateToolName, validateToolDescription, } from "../utils/parameterValidation.js";
@@ -364,3 +365,4 @@ export function suggestToolNames(baseName) {
364
365
  }
365
366
  return suggestions.slice(0, 5); // Limit to 5 suggestions
366
367
  }
368
+ //# sourceMappingURL=toolRegistration.js.map
@@ -168,3 +168,4 @@ export function getLangfuseHealthStatus() {
168
168
  : undefined,
169
169
  };
170
170
  }
171
+ //# sourceMappingURL=instrumentation.js.map
@@ -160,3 +160,4 @@ export class GlobalSessionManager {
160
160
  }
161
161
  }
162
162
  export const globalSession = GlobalSessionManager.getInstance();
163
+ //# sourceMappingURL=globalSessionState.js.map
@@ -21,3 +21,4 @@ export async function getTelemetryStatus() {
21
21
  const { TelemetryService } = await import("./telemetryService.js");
22
22
  return TelemetryService.getInstance().getStatus();
23
23
  }
24
+ //# sourceMappingURL=index.js.map
@@ -293,3 +293,4 @@ export class TelemetryService {
293
293
  }
294
294
  }
295
295
  }
296
+ //# sourceMappingURL=telemetryService.js.map
@@ -3,3 +3,4 @@
3
3
  * Comprehensive usage tracking, performance metrics, and cost analysis types
4
4
  */
5
5
  export {};
6
+ //# sourceMappingURL=analytics.js.map
@@ -19,3 +19,4 @@ export function isCommandResult(value) {
19
19
  "success" in value &&
20
20
  typeof value.success === "boolean");
21
21
  }
22
+ //# sourceMappingURL=cli.js.map
@@ -49,3 +49,4 @@ export function toErrorInfo(error) {
49
49
  message: getErrorMessage(error),
50
50
  };
51
51
  }
52
+ //# sourceMappingURL=common.js.map
@@ -47,3 +47,4 @@ export const DEFAULT_CONFIG = {
47
47
  },
48
48
  configVersion: "3.0.1",
49
49
  };
50
+ //# sourceMappingURL=configTypes.js.map
@@ -39,10 +39,23 @@ export type CSVContent = {
39
39
  description?: string;
40
40
  };
41
41
  };
42
+ /**
43
+ * PDF document content type for multimodal messages
44
+ */
45
+ export type PDFContent = {
46
+ type: "pdf";
47
+ data: Buffer | string;
48
+ metadata?: {
49
+ filename?: string;
50
+ pages?: number;
51
+ version?: string;
52
+ description?: string;
53
+ };
54
+ };
42
55
  /**
43
56
  * Union type for all content types
44
57
  */
45
- export type Content = TextContent | ImageContent | CSVContent;
58
+ export type Content = TextContent | ImageContent | CSVContent | PDFContent;
46
59
  /**
47
60
  * Vision capability information for providers
48
61
  */
@@ -3,3 +3,4 @@
3
3
  * Supports text and image content with provider-specific formatting
4
4
  */
5
5
  export {};
6
+ //# sourceMappingURL=content.js.map
@@ -400,3 +400,4 @@ export class ContextConverter {
400
400
  }
401
401
  // Framework fields configuration loading moved to lazy initialization
402
402
  // Call ContextFactory.loadFrameworkFieldsFromEnv() explicitly in application entrypoint or test setup
403
+ //# sourceMappingURL=contextTypes.js.map
@@ -15,3 +15,4 @@ export class ConversationMemoryError extends Error {
15
15
  this.name = "ConversationMemoryError";
16
16
  }
17
17
  }
18
+ //# sourceMappingURL=conversation.js.map
@@ -3,3 +3,4 @@
3
3
  * Provides type-safe domain configuration and factory pattern support
4
4
  */
5
5
  export {};
6
+ //# sourceMappingURL=domainTypes.js.map
@@ -58,3 +58,4 @@ export class InvalidModelError extends ProviderError {
58
58
  super(message, provider);
59
59
  }
60
60
  }
61
+ //# sourceMappingURL=errors.js.map
@@ -3,3 +3,4 @@
3
3
  * Provider performance tracking, evaluation configurations, and provider optimization types
4
4
  */
5
5
  export {};
6
+ //# sourceMappingURL=evaluation.js.map
@@ -3,3 +3,4 @@
3
3
  * Provider performance tracking, evaluation configurations, and provider optimization types
4
4
  */
5
5
  export {};
6
+ //# sourceMappingURL=evaluationProviders.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=evaluationTypes.js.map
@@ -5,3 +5,4 @@
5
5
  */
6
6
  export {};
7
7
  // Note: In Phase 2, these interfaces will be consolidated into MCPServerInfo
8
+ //# sourceMappingURL=externalMcp.js.map
@@ -43,6 +43,10 @@ export type FileProcessingResult = {
43
43
  columnNames?: string[];
44
44
  sampleData?: string;
45
45
  hasEmptyColumns?: boolean;
46
+ version?: string;
47
+ estimatedPages?: number | null;
48
+ provider?: string;
49
+ apiType?: PDFAPIType;
46
50
  };
47
51
  };
48
52
  /**
@@ -53,6 +57,29 @@ export type CSVProcessorOptions = {
53
57
  formatStyle?: "raw" | "markdown" | "json";
54
58
  includeHeaders?: boolean;
55
59
  };
60
+ /**
61
+ * PDF API types for different providers
62
+ */
63
+ export type PDFAPIType = "document" | "files-api" | "unsupported";
64
+ /**
65
+ * PDF provider configuration
66
+ */
67
+ export interface PDFProviderConfig {
68
+ maxSizeMB: number;
69
+ maxPages: number;
70
+ supportsNative: boolean;
71
+ requiresCitations: boolean | "auto";
72
+ apiType: PDFAPIType;
73
+ }
74
+ /**
75
+ * PDF processor options
76
+ */
77
+ export type PDFProcessorOptions = {
78
+ provider?: string;
79
+ model?: string;
80
+ maxSizeMB?: number;
81
+ bedrockApiMode?: "converse" | "invokeModel";
82
+ };
56
83
  /**
57
84
  * File detector options
58
85
  */
@@ -62,4 +89,21 @@ export type FileDetectorOptions = {
62
89
  allowedTypes?: FileType[];
63
90
  csvOptions?: CSVProcessorOptions;
64
91
  confidenceThreshold?: number;
92
+ provider?: string;
65
93
  };
94
+ /**
95
+ * Google AI Studio Files API types
96
+ */
97
+ export interface GoogleFilesAPIUploadResult {
98
+ file: {
99
+ name: string;
100
+ displayName: string;
101
+ mimeType: string;
102
+ sizeBytes: string;
103
+ createTime: string;
104
+ updateTime: string;
105
+ expirationTime: string;
106
+ sha256Hash: string;
107
+ uri: string;
108
+ };
109
+ }
@@ -2,3 +2,4 @@
2
2
  * File detection and processing types for unified file handling
3
3
  */
4
4
  export {};
5
+ //# sourceMappingURL=fileTypes.js.map
@@ -16,6 +16,7 @@ export type GenerateOptions = {
16
16
  text: string;
17
17
  images?: Array<Buffer | string>;
18
18
  csvFiles?: Array<Buffer | string>;
19
+ pdfFiles?: Array<Buffer | string>;
19
20
  files?: Array<Buffer | string>;
20
21
  content?: Array<TextContent | ImageContent>;
21
22
  };
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=generateTypes.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=guardrails.js.map
@@ -29,3 +29,4 @@ export * from "./sdkTypes.js";
29
29
  export * from "./fileTypes.js";
30
30
  // Content types for multimodal support
31
31
  export * from "./content.js";
32
+ //# sourceMappingURL=index.js.map
@@ -3,3 +3,4 @@
3
3
  * Enables various integrations to register tools directly
4
4
  */
5
5
  export {};
6
+ //# sourceMappingURL=mcpTypes.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=middlewareTypes.js.map
@@ -28,3 +28,4 @@ export const ModelRegistrySchema = z.object({
28
28
  aliases: z.record(z.string()).optional(),
29
29
  defaults: z.record(z.string()).optional(),
30
30
  });
31
+ //# sourceMappingURL=modelTypes.js.map
@@ -4,3 +4,4 @@
4
4
  * to enable telemetry and observability features in Neurolink SDK
5
5
  */
6
6
  export {};
7
+ //# sourceMappingURL=observability.js.map
@@ -441,6 +441,19 @@ export type BedrockToolResult = {
441
441
  */
442
442
  export type BedrockContentBlock = {
443
443
  text?: string;
444
+ image?: {
445
+ format: "png" | "jpeg" | "gif" | "webp";
446
+ source: {
447
+ bytes?: Uint8Array | Buffer;
448
+ };
449
+ };
450
+ document?: {
451
+ format: "pdf" | "csv" | "doc" | "docx" | "xls" | "xlsx" | "html" | "txt" | "md";
452
+ name: string;
453
+ source: {
454
+ bytes?: Uint8Array | Buffer;
455
+ };
456
+ };
444
457
  toolUse?: BedrockToolUse;
445
458
  toolResult?: BedrockToolResult;
446
459
  };
@@ -555,6 +568,37 @@ export type ModelsResponse = {
555
568
  owned_by?: string;
556
569
  }>;
557
570
  };
571
+ /**
572
+ * Ollama tool call structure
573
+ */
574
+ export type OllamaToolCall = {
575
+ id: string;
576
+ type: "function";
577
+ function: {
578
+ name: string;
579
+ arguments: string;
580
+ };
581
+ };
582
+ /**
583
+ * Ollama tool result structure
584
+ */
585
+ export type OllamaToolResult = {
586
+ tool_call_id: string;
587
+ content: string;
588
+ };
589
+ /**
590
+ * Ollama message structure for conversation and tool execution
591
+ */
592
+ export type OllamaMessage = {
593
+ role: "system" | "user" | "assistant" | "tool";
594
+ content: string | Array<{
595
+ type: string;
596
+ text?: string;
597
+ [key: string]: unknown;
598
+ }>;
599
+ tool_calls?: OllamaToolCall[];
600
+ images?: string[];
601
+ };
558
602
  /**
559
603
  * Default model aliases for easy reference
560
604
  */
@@ -154,3 +154,4 @@ export const DEFAULT_PROVIDER_CONFIGS = [
154
154
  models: [OpenAIModels.GPT_4O, OpenAIModels.GPT_4O_MINI],
155
155
  },
156
156
  ];
157
+ //# sourceMappingURL=providers.js.map
@@ -6,3 +6,4 @@
6
6
  * comprehensive TypeScript support across the NeuroLink ecosystem.
7
7
  */
8
8
  export {};
9
+ //# sourceMappingURL=sdkTypes.js.map
@@ -3,3 +3,4 @@
3
3
  * Service registry, dependency injection, and service management types
4
4
  */
5
5
  export {};
6
+ //# sourceMappingURL=serviceTypes.js.map
@@ -126,6 +126,7 @@ export interface StreamOptions {
126
126
  audio?: AudioInputSpec;
127
127
  images?: Array<Buffer | string>;
128
128
  csvFiles?: Array<Buffer | string>;
129
+ pdfFiles?: Array<Buffer | string>;
129
130
  files?: Array<Buffer | string>;
130
131
  content?: Array<TextContent | ImageContent>;
131
132
  };
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=streamTypes.js.map
@@ -3,3 +3,4 @@
3
3
  * Type definitions for the task classification system
4
4
  */
5
5
  export {};
6
+ //# sourceMappingURL=taskClassificationTypes.js.map
@@ -2,6 +2,7 @@
2
2
  * Type definitions for NeuroLink tool system, including parameter schemas,
3
3
  * argument patterns, execution metadata, context, and result types.
4
4
  */
5
+ import { z } from "zod";
5
6
  /**
6
7
  * Type guard for tool result
7
8
  */
@@ -22,3 +23,4 @@ export function isToolDefinition(value) {
22
23
  typeof value.description === "string" &&
23
24
  typeof value.execute === "function");
24
25
  }
26
+ //# sourceMappingURL=tools.js.map
@@ -46,3 +46,4 @@ export function isStringArray(value) {
46
46
  export function isAsyncFunction(value) {
47
47
  return typeof value === "function";
48
48
  }
49
+ //# sourceMappingURL=typeAliases.js.map
@@ -52,3 +52,4 @@ export class ParameterNormalizer {
52
52
  };
53
53
  }
54
54
  }
55
+ //# sourceMappingURL=universalProviderOptions.js.map
@@ -87,3 +87,4 @@ export function isTokenUsage(value) {
87
87
  typeof value.output === "number" &&
88
88
  typeof value.total === "number");
89
89
  }
90
+ //# sourceMappingURL=analyticsUtils.js.map
@@ -121,3 +121,4 @@ export async function storeConversationTurn(conversationMemory, originalOptions,
121
121
  });
122
122
  }
123
123
  }
124
+ //# sourceMappingURL=conversationMemory.js.map
@@ -120,3 +120,4 @@ export async function checkRedisAvailability() {
120
120
  }
121
121
  }
122
122
  }
123
+ //# sourceMappingURL=conversationMemoryUtils.js.map
@@ -275,3 +275,4 @@ export class CSVProcessor {
275
275
  return markdown;
276
276
  }
277
277
  }
278
+ //# sourceMappingURL=csvProcessor.js.map
@@ -317,3 +317,4 @@ export function logStructuredError(error, context) {
317
317
  break;
318
318
  }
319
319
  }
320
+ //# sourceMappingURL=errorHandling.js.map
@@ -129,3 +129,4 @@ export function mergeEvaluationData(...partials) {
129
129
  const merged = partials.reduce((acc, partial) => ({ ...acc, ...partial }), {});
130
130
  return normalizeEvaluationData(merged);
131
131
  }
132
+ //# sourceMappingURL=evaluationUtils.js.map
@@ -587,3 +587,4 @@ export function clearFactoryProcessingCache() {
587
587
  export function evictOldFactoryProcessingCache(maxAge) {
588
588
  return factoryProcessingCache.evictOld(maxAge);
589
589
  }
590
+ //# sourceMappingURL=factoryProcessing.js.map