@juspay/neurolink 9.54.2 → 9.54.4

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 (1486) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/action/actionExecutor.d.ts +1 -1
  3. package/dist/action/actionInputs.d.ts +1 -1
  4. package/dist/action/githubIntegration.d.ts +1 -1
  5. package/dist/action/index.d.ts +0 -1
  6. package/dist/action/index.js +1 -0
  7. package/dist/adapters/providerImageAdapter.d.ts +1 -1
  8. package/dist/adapters/tts/googleTTSHandler.d.ts +1 -2
  9. package/dist/adapters/tts/googleTTSHandler.js +1 -2
  10. package/dist/adapters/video/directorPipeline.d.ts +1 -1
  11. package/dist/adapters/video/vertexVideoHandler.d.ts +1 -1
  12. package/dist/agent/directTools.d.ts +7 -6
  13. package/dist/artifacts/artifactStore.d.ts +1 -2
  14. package/dist/artifacts/artifactStore.js +1 -0
  15. package/dist/auth/AuthProviderFactory.d.ts +1 -1
  16. package/dist/auth/anthropicOAuth.d.ts +4 -3
  17. package/dist/auth/anthropicOAuth.js +1 -1
  18. package/dist/auth/authContext.d.ts +1 -1
  19. package/dist/auth/errors.d.ts +1 -1
  20. package/dist/auth/index.d.ts +5 -10
  21. package/dist/auth/index.js +8 -2
  22. package/dist/auth/middleware/AuthMiddleware.d.ts +9 -8
  23. package/dist/auth/middleware/rateLimitByUser.d.ts +7 -7
  24. package/dist/auth/providers/BaseAuthProvider.d.ts +2 -2
  25. package/dist/auth/providers/CognitoProvider.d.ts +1 -1
  26. package/dist/auth/providers/KeycloakProvider.d.ts +1 -1
  27. package/dist/auth/providers/KeycloakProvider.js +1 -2
  28. package/dist/auth/providers/auth0.d.ts +1 -1
  29. package/dist/auth/providers/betterAuth.d.ts +1 -1
  30. package/dist/auth/providers/clerk.d.ts +1 -1
  31. package/dist/auth/providers/custom.d.ts +1 -1
  32. package/dist/auth/providers/firebase.d.ts +1 -1
  33. package/dist/auth/providers/jwt.d.ts +1 -1
  34. package/dist/auth/providers/oauth2.d.ts +1 -1
  35. package/dist/auth/providers/supabase.d.ts +1 -1
  36. package/dist/auth/providers/workos.d.ts +1 -1
  37. package/dist/auth/serverBridge.d.ts +1 -1
  38. package/dist/auth/sessionManager.d.ts +1 -27
  39. package/dist/auth/tokenStore.d.ts +1 -1
  40. package/dist/auth/tokenStore.js +1 -1
  41. package/dist/autoresearch/config.d.ts +1 -1
  42. package/dist/autoresearch/config.js +1 -1
  43. package/dist/autoresearch/phasePolicy.d.ts +1 -1
  44. package/dist/autoresearch/promptCompiler.d.ts +1 -1
  45. package/dist/autoresearch/repoPolicy.d.ts +1 -1
  46. package/dist/autoresearch/resultRecorder.d.ts +1 -1
  47. package/dist/autoresearch/runner.d.ts +1 -1
  48. package/dist/autoresearch/stateStore.d.ts +1 -1
  49. package/dist/autoresearch/summaryParser.d.ts +1 -1
  50. package/dist/autoresearch/tools.d.ts +3 -6
  51. package/dist/autoresearch/worker.d.ts +1 -1
  52. package/dist/browser/neurolink.min.js +370 -370
  53. package/dist/cli/commands/authProviders.d.ts +1 -30
  54. package/dist/cli/commands/config.d.ts +2 -2
  55. package/dist/cli/commands/evaluate.js +1 -1
  56. package/dist/cli/factories/commandFactory.js +43 -4
  57. package/dist/cli/loop/conversationSelector.d.ts +1 -2
  58. package/dist/cli/loop/conversationSelector.js +1 -1
  59. package/dist/cli/loop/optionsSchema.d.ts +1 -2
  60. package/dist/cli/utils/abortHandler.d.ts +22 -0
  61. package/dist/cli/utils/abortHandler.js +53 -0
  62. package/dist/cli/utils/completeSetup.d.ts +1 -1
  63. package/dist/cli/utils/interactiveSetup.d.ts +3 -12
  64. package/dist/cli/utils/videoFileUtils.d.ts +2 -1
  65. package/dist/client/aiSdkAdapter.d.ts +8 -9
  66. package/dist/client/aiSdkAdapter.js +6 -1
  67. package/dist/client/auth.d.ts +6 -6
  68. package/dist/client/auth.js +1 -1
  69. package/dist/client/errors.d.ts +5 -6
  70. package/dist/client/errors.js +1 -1
  71. package/dist/client/httpClient.d.ts +25 -26
  72. package/dist/client/httpClient.js +3 -3
  73. package/dist/client/index.d.ts +0 -9
  74. package/dist/client/index.js +1 -1
  75. package/dist/client/interceptors.d.ts +14 -90
  76. package/dist/client/interceptors.js +18 -0
  77. package/dist/client/reactHooks.d.ts +1 -2
  78. package/dist/client/reactHooks.tsx +44 -64
  79. package/dist/client/sseClient.d.ts +6 -47
  80. package/dist/client/streamingClient.d.ts +9 -83
  81. package/dist/client/streamingClient.js +6 -0
  82. package/dist/client/wsClient.d.ts +8 -16
  83. package/dist/config/configManager.d.ts +2 -2
  84. package/dist/config/configManager.js +1 -1
  85. package/dist/config/conversationMemory.d.ts +1 -1
  86. package/dist/constants/index.d.ts +0 -1
  87. package/dist/constants/index.js +1 -0
  88. package/dist/context/budgetChecker.d.ts +1 -2
  89. package/dist/context/budgetChecker.js +1 -2
  90. package/dist/context/contextCompactor.d.ts +1 -3
  91. package/dist/context/contextCompactor.js +1 -2
  92. package/dist/context/effectiveHistory.d.ts +1 -1
  93. package/dist/context/emergencyTruncation.d.ts +1 -1
  94. package/dist/context/fileSummarizationService.d.ts +2 -3
  95. package/dist/context/fileSummarizer.d.ts +1 -2
  96. package/dist/context/fileTokenBudget.d.ts +1 -2
  97. package/dist/context/prompts/summarizationPrompt.d.ts +1 -2
  98. package/dist/context/stages/fileReadDeduplicator.d.ts +1 -3
  99. package/dist/context/stages/slidingWindowTruncator.d.ts +1 -3
  100. package/dist/context/stages/structuredSummarizer.d.ts +1 -3
  101. package/dist/context/stages/toolOutputPruner.d.ts +1 -3
  102. package/dist/context/summarizationEngine.d.ts +1 -1
  103. package/dist/context/toolOutputLimits.d.ts +1 -2
  104. package/dist/context/toolPairRepair.d.ts +1 -3
  105. package/dist/core/analytics.d.ts +1 -1
  106. package/dist/core/baseProvider.d.ts +8 -6
  107. package/dist/core/baseProvider.js +20 -1
  108. package/dist/core/conversationMemoryFactory.d.ts +1 -2
  109. package/dist/core/conversationMemoryInitializer.d.ts +1 -1
  110. package/dist/core/conversationMemoryManager.d.ts +1 -2
  111. package/dist/core/conversationMemoryManager.js +1 -1
  112. package/dist/core/factory.d.ts +1 -3
  113. package/dist/core/infrastructure/baseRegistry.d.ts +2 -1
  114. package/dist/core/infrastructure/index.d.ts +0 -2
  115. package/dist/core/infrastructure/retry.d.ts +2 -7
  116. package/dist/core/modelConfiguration.d.ts +1 -1
  117. package/dist/core/modules/MessageBuilder.d.ts +1 -2
  118. package/dist/core/modules/StreamHandler.d.ts +1 -3
  119. package/dist/core/modules/TelemetryHandler.d.ts +1 -2
  120. package/dist/core/modules/Utilities.d.ts +1 -4
  121. package/dist/core/redisConversationMemoryManager.d.ts +1 -2
  122. package/dist/core/redisConversationMemoryManager.js +1 -1
  123. package/dist/core/serviceRegistry.d.ts +1 -1
  124. package/dist/core/streamAnalytics.d.ts +1 -2
  125. package/dist/evaluation/BatchEvaluator.d.ts +12 -14
  126. package/dist/evaluation/EvaluationAggregator.d.ts +14 -13
  127. package/dist/evaluation/EvaluatorFactory.d.ts +4 -3
  128. package/dist/evaluation/EvaluatorRegistry.d.ts +7 -7
  129. package/dist/evaluation/contextBuilder.d.ts +1 -2
  130. package/dist/evaluation/errors/EvaluationError.d.ts +5 -8
  131. package/dist/evaluation/errors/index.d.ts +1 -1
  132. package/dist/evaluation/hooks/index.d.ts +2 -2
  133. package/dist/evaluation/hooks/langfuseAdapter.d.ts +3 -2
  134. package/dist/evaluation/hooks/observabilityHooks.d.ts +5 -5
  135. package/dist/evaluation/index.d.ts +5 -8
  136. package/dist/evaluation/index.js +3 -3
  137. package/dist/evaluation/pipeline/evaluationPipeline.d.ts +1 -33
  138. package/dist/evaluation/pipeline/index.d.ts +1 -1
  139. package/dist/evaluation/pipeline/pipelineBuilder.d.ts +1 -1
  140. package/dist/evaluation/pipeline/presets.d.ts +1 -1
  141. package/dist/evaluation/pipeline/strategies/batchStrategy.d.ts +7 -6
  142. package/dist/evaluation/pipeline/strategies/index.d.ts +1 -1
  143. package/dist/evaluation/pipeline/strategies/samplingStrategy.d.ts +1 -1
  144. package/dist/evaluation/prompts.d.ts +1 -1
  145. package/dist/evaluation/ragasEvaluator.d.ts +1 -1
  146. package/dist/evaluation/ragasEvaluator.js +1 -2
  147. package/dist/evaluation/reporting/index.d.ts +2 -2
  148. package/dist/evaluation/reporting/metricsCollector.d.ts +5 -5
  149. package/dist/evaluation/reporting/reportGenerator.d.ts +3 -20
  150. package/dist/evaluation/retryManager.d.ts +1 -2
  151. package/dist/evaluation/scorers/baseScorer.d.ts +1 -2
  152. package/dist/evaluation/scorers/customScorerUtils.d.ts +1 -10
  153. package/dist/evaluation/scorers/index.d.ts +1 -1
  154. package/dist/evaluation/scorers/llm/answerRelevancyScorer.d.ts +1 -1
  155. package/dist/evaluation/scorers/llm/baseLLMScorer.d.ts +1 -3
  156. package/dist/evaluation/scorers/llm/biasDetectionScorer.d.ts +1 -1
  157. package/dist/evaluation/scorers/llm/contextPrecisionScorer.d.ts +1 -1
  158. package/dist/evaluation/scorers/llm/contextRelevancyScorer.d.ts +1 -1
  159. package/dist/evaluation/scorers/llm/faithfulnessScorer.d.ts +1 -1
  160. package/dist/evaluation/scorers/llm/hallucinationScorer.d.ts +1 -1
  161. package/dist/evaluation/scorers/llm/promptAlignmentScorer.d.ts +1 -1
  162. package/dist/evaluation/scorers/llm/summarizationScorer.d.ts +1 -1
  163. package/dist/evaluation/scorers/llm/toneConsistencyScorer.d.ts +1 -1
  164. package/dist/evaluation/scorers/llm/toxicityScorer.d.ts +1 -1
  165. package/dist/evaluation/scorers/rule/baseRuleScorer.d.ts +1 -1
  166. package/dist/evaluation/scorers/rule/contentSimilarityScorer.d.ts +4 -3
  167. package/dist/evaluation/scorers/rule/formatScorer.d.ts +5 -4
  168. package/dist/evaluation/scorers/rule/index.d.ts +4 -4
  169. package/dist/evaluation/scorers/rule/keywordCoverageScorer.d.ts +3 -2
  170. package/dist/evaluation/scorers/rule/lengthScorer.d.ts +5 -4
  171. package/dist/evaluation/scorers/scorerBuilder.d.ts +1 -2
  172. package/dist/evaluation/scorers/scorerBuilder.js +1 -1
  173. package/dist/evaluation/scorers/scorerRegistry.d.ts +1 -1
  174. package/dist/evaluation/scoring.d.ts +1 -2
  175. package/dist/evaluation/scoring.js +1 -2
  176. package/dist/factories/providerFactory.d.ts +1 -2
  177. package/dist/features/ppt/constants.d.ts +1 -1
  178. package/dist/features/ppt/contentPlanner.d.ts +1 -2
  179. package/dist/features/ppt/contentPlanner.js +1 -1
  180. package/dist/features/ppt/index.d.ts +2 -17
  181. package/dist/features/ppt/index.js +6 -14
  182. package/dist/features/ppt/pptError.d.ts +38 -0
  183. package/dist/features/ppt/pptError.js +53 -0
  184. package/dist/features/ppt/presentationOrchestrator.d.ts +1 -1
  185. package/dist/features/ppt/presentationOrchestrator.js +2 -3
  186. package/dist/features/ppt/slideGenerator.d.ts +1 -1
  187. package/dist/features/ppt/slideGenerator.js +2 -3
  188. package/dist/features/ppt/slideRenderers.d.ts +1 -1
  189. package/dist/features/ppt/slideTypeInference.d.ts +1 -1
  190. package/dist/features/ppt/utils.d.ts +1 -2
  191. package/dist/features/ppt/utils.js +1 -1
  192. package/dist/files/fileReferenceRegistry.d.ts +1 -2
  193. package/dist/files/fileReferenceRegistry.js +1 -1
  194. package/dist/files/fileTools.d.ts +5 -5
  195. package/dist/files/index.d.ts +1 -2
  196. package/dist/files/index.js +1 -1
  197. package/dist/files/streamingReader.d.ts +1 -1
  198. package/dist/hitl/hitlManager.d.ts +1 -1
  199. package/dist/image-gen/ImageGenService.d.ts +1 -1
  200. package/dist/image-gen/ImageGenService.js +1 -1
  201. package/dist/image-gen/imageGenTools.d.ts +1 -18
  202. package/dist/image-gen/index.d.ts +1 -2
  203. package/dist/image-gen/index.js +1 -1
  204. package/dist/index.d.ts +6 -25
  205. package/dist/index.js +23 -8
  206. package/dist/lib/action/actionExecutor.d.ts +1 -1
  207. package/dist/lib/action/actionInputs.d.ts +1 -1
  208. package/dist/lib/action/githubIntegration.d.ts +1 -1
  209. package/dist/lib/action/index.d.ts +0 -1
  210. package/dist/lib/action/index.js +1 -0
  211. package/dist/lib/adapters/providerImageAdapter.d.ts +1 -1
  212. package/dist/lib/adapters/tts/googleTTSHandler.d.ts +1 -2
  213. package/dist/lib/adapters/tts/googleTTSHandler.js +1 -2
  214. package/dist/lib/adapters/video/directorPipeline.d.ts +1 -1
  215. package/dist/lib/adapters/video/vertexVideoHandler.d.ts +1 -1
  216. package/dist/lib/agent/directTools.d.ts +7 -6
  217. package/dist/lib/artifacts/artifactStore.d.ts +1 -2
  218. package/dist/lib/artifacts/artifactStore.js +1 -0
  219. package/dist/lib/auth/AuthProviderFactory.d.ts +1 -1
  220. package/dist/lib/auth/anthropicOAuth.d.ts +4 -3
  221. package/dist/lib/auth/anthropicOAuth.js +1 -1
  222. package/dist/lib/auth/authContext.d.ts +1 -1
  223. package/dist/lib/auth/errors.d.ts +1 -1
  224. package/dist/lib/auth/index.d.ts +5 -10
  225. package/dist/lib/auth/index.js +8 -2
  226. package/dist/lib/auth/middleware/AuthMiddleware.d.ts +9 -8
  227. package/dist/lib/auth/middleware/rateLimitByUser.d.ts +7 -7
  228. package/dist/lib/auth/providers/BaseAuthProvider.d.ts +2 -2
  229. package/dist/lib/auth/providers/CognitoProvider.d.ts +1 -1
  230. package/dist/lib/auth/providers/KeycloakProvider.d.ts +1 -1
  231. package/dist/lib/auth/providers/KeycloakProvider.js +1 -2
  232. package/dist/lib/auth/providers/auth0.d.ts +1 -1
  233. package/dist/lib/auth/providers/betterAuth.d.ts +1 -1
  234. package/dist/lib/auth/providers/clerk.d.ts +1 -1
  235. package/dist/lib/auth/providers/custom.d.ts +1 -1
  236. package/dist/lib/auth/providers/firebase.d.ts +1 -1
  237. package/dist/lib/auth/providers/jwt.d.ts +1 -1
  238. package/dist/lib/auth/providers/oauth2.d.ts +1 -1
  239. package/dist/lib/auth/providers/supabase.d.ts +1 -1
  240. package/dist/lib/auth/providers/workos.d.ts +1 -1
  241. package/dist/lib/auth/serverBridge.d.ts +1 -1
  242. package/dist/lib/auth/sessionManager.d.ts +1 -27
  243. package/dist/lib/auth/tokenStore.d.ts +1 -1
  244. package/dist/lib/auth/tokenStore.js +1 -1
  245. package/dist/lib/autoresearch/config.d.ts +1 -1
  246. package/dist/lib/autoresearch/config.js +1 -1
  247. package/dist/lib/autoresearch/phasePolicy.d.ts +1 -1
  248. package/dist/lib/autoresearch/promptCompiler.d.ts +1 -1
  249. package/dist/lib/autoresearch/repoPolicy.d.ts +1 -1
  250. package/dist/lib/autoresearch/resultRecorder.d.ts +1 -1
  251. package/dist/lib/autoresearch/runner.d.ts +1 -1
  252. package/dist/lib/autoresearch/stateStore.d.ts +1 -1
  253. package/dist/lib/autoresearch/summaryParser.d.ts +1 -1
  254. package/dist/lib/autoresearch/tools.d.ts +7 -10
  255. package/dist/lib/autoresearch/worker.d.ts +2 -2
  256. package/dist/lib/client/aiSdkAdapter.d.ts +8 -9
  257. package/dist/lib/client/aiSdkAdapter.js +6 -1
  258. package/dist/lib/client/auth.d.ts +6 -6
  259. package/dist/lib/client/auth.js +1 -1
  260. package/dist/lib/client/errors.d.ts +5 -6
  261. package/dist/lib/client/errors.js +1 -1
  262. package/dist/lib/client/httpClient.d.ts +25 -26
  263. package/dist/lib/client/httpClient.js +3 -3
  264. package/dist/lib/client/index.d.ts +0 -9
  265. package/dist/lib/client/index.js +1 -1
  266. package/dist/lib/client/interceptors.d.ts +14 -90
  267. package/dist/lib/client/interceptors.js +18 -0
  268. package/dist/lib/client/reactHooks.d.ts +1 -2
  269. package/dist/lib/client/sseClient.d.ts +6 -47
  270. package/dist/lib/client/streamingClient.d.ts +9 -83
  271. package/dist/lib/client/streamingClient.js +6 -0
  272. package/dist/lib/client/wsClient.d.ts +8 -16
  273. package/dist/lib/config/configManager.d.ts +2 -2
  274. package/dist/lib/config/configManager.js +1 -1
  275. package/dist/lib/config/conversationMemory.d.ts +1 -1
  276. package/dist/lib/constants/index.d.ts +0 -1
  277. package/dist/lib/constants/index.js +1 -0
  278. package/dist/lib/context/budgetChecker.d.ts +1 -2
  279. package/dist/lib/context/budgetChecker.js +1 -2
  280. package/dist/lib/context/contextCompactor.d.ts +1 -3
  281. package/dist/lib/context/contextCompactor.js +1 -2
  282. package/dist/lib/context/effectiveHistory.d.ts +1 -1
  283. package/dist/lib/context/emergencyTruncation.d.ts +1 -1
  284. package/dist/lib/context/fileSummarizationService.d.ts +2 -3
  285. package/dist/lib/context/fileSummarizer.d.ts +1 -2
  286. package/dist/lib/context/fileTokenBudget.d.ts +1 -2
  287. package/dist/lib/context/prompts/summarizationPrompt.d.ts +1 -2
  288. package/dist/lib/context/stages/fileReadDeduplicator.d.ts +1 -3
  289. package/dist/lib/context/stages/slidingWindowTruncator.d.ts +1 -3
  290. package/dist/lib/context/stages/structuredSummarizer.d.ts +1 -3
  291. package/dist/lib/context/stages/toolOutputPruner.d.ts +1 -3
  292. package/dist/lib/context/summarizationEngine.d.ts +1 -1
  293. package/dist/lib/context/toolOutputLimits.d.ts +1 -2
  294. package/dist/lib/context/toolPairRepair.d.ts +1 -3
  295. package/dist/lib/core/analytics.d.ts +1 -1
  296. package/dist/lib/core/baseProvider.d.ts +8 -6
  297. package/dist/lib/core/baseProvider.js +20 -1
  298. package/dist/lib/core/conversationMemoryFactory.d.ts +1 -2
  299. package/dist/lib/core/conversationMemoryInitializer.d.ts +1 -1
  300. package/dist/lib/core/conversationMemoryManager.d.ts +1 -2
  301. package/dist/lib/core/conversationMemoryManager.js +1 -1
  302. package/dist/lib/core/factory.d.ts +1 -3
  303. package/dist/lib/core/infrastructure/baseRegistry.d.ts +2 -1
  304. package/dist/lib/core/infrastructure/index.d.ts +0 -2
  305. package/dist/lib/core/infrastructure/retry.d.ts +2 -7
  306. package/dist/lib/core/modelConfiguration.d.ts +1 -1
  307. package/dist/lib/core/modules/MessageBuilder.d.ts +1 -2
  308. package/dist/lib/core/modules/StreamHandler.d.ts +1 -3
  309. package/dist/lib/core/modules/TelemetryHandler.d.ts +1 -2
  310. package/dist/lib/core/modules/Utilities.d.ts +1 -4
  311. package/dist/lib/core/redisConversationMemoryManager.d.ts +1 -2
  312. package/dist/lib/core/redisConversationMemoryManager.js +1 -1
  313. package/dist/lib/core/serviceRegistry.d.ts +1 -1
  314. package/dist/lib/core/streamAnalytics.d.ts +1 -2
  315. package/dist/lib/evaluation/BatchEvaluator.d.ts +12 -14
  316. package/dist/lib/evaluation/EvaluationAggregator.d.ts +14 -13
  317. package/dist/lib/evaluation/EvaluatorFactory.d.ts +4 -3
  318. package/dist/lib/evaluation/EvaluatorRegistry.d.ts +7 -7
  319. package/dist/lib/evaluation/contextBuilder.d.ts +1 -2
  320. package/dist/lib/evaluation/errors/EvaluationError.d.ts +5 -8
  321. package/dist/lib/evaluation/errors/index.d.ts +1 -1
  322. package/dist/lib/evaluation/hooks/index.d.ts +2 -2
  323. package/dist/lib/evaluation/hooks/langfuseAdapter.d.ts +3 -2
  324. package/dist/lib/evaluation/hooks/observabilityHooks.d.ts +5 -5
  325. package/dist/lib/evaluation/index.d.ts +5 -8
  326. package/dist/lib/evaluation/index.js +3 -3
  327. package/dist/lib/evaluation/pipeline/evaluationPipeline.d.ts +1 -33
  328. package/dist/lib/evaluation/pipeline/index.d.ts +1 -1
  329. package/dist/lib/evaluation/pipeline/pipelineBuilder.d.ts +1 -1
  330. package/dist/lib/evaluation/pipeline/presets.d.ts +1 -1
  331. package/dist/lib/evaluation/pipeline/strategies/batchStrategy.d.ts +7 -6
  332. package/dist/lib/evaluation/pipeline/strategies/index.d.ts +1 -1
  333. package/dist/lib/evaluation/pipeline/strategies/samplingStrategy.d.ts +1 -1
  334. package/dist/lib/evaluation/prompts.d.ts +1 -1
  335. package/dist/lib/evaluation/ragasEvaluator.d.ts +1 -1
  336. package/dist/lib/evaluation/ragasEvaluator.js +1 -2
  337. package/dist/lib/evaluation/reporting/index.d.ts +2 -2
  338. package/dist/lib/evaluation/reporting/metricsCollector.d.ts +5 -5
  339. package/dist/lib/evaluation/reporting/reportGenerator.d.ts +3 -20
  340. package/dist/lib/evaluation/retryManager.d.ts +1 -2
  341. package/dist/lib/evaluation/scorers/baseScorer.d.ts +1 -2
  342. package/dist/lib/evaluation/scorers/customScorerUtils.d.ts +1 -10
  343. package/dist/lib/evaluation/scorers/index.d.ts +1 -1
  344. package/dist/lib/evaluation/scorers/llm/answerRelevancyScorer.d.ts +1 -1
  345. package/dist/lib/evaluation/scorers/llm/baseLLMScorer.d.ts +1 -3
  346. package/dist/lib/evaluation/scorers/llm/biasDetectionScorer.d.ts +1 -1
  347. package/dist/lib/evaluation/scorers/llm/contextPrecisionScorer.d.ts +1 -1
  348. package/dist/lib/evaluation/scorers/llm/contextRelevancyScorer.d.ts +1 -1
  349. package/dist/lib/evaluation/scorers/llm/faithfulnessScorer.d.ts +1 -1
  350. package/dist/lib/evaluation/scorers/llm/hallucinationScorer.d.ts +1 -1
  351. package/dist/lib/evaluation/scorers/llm/promptAlignmentScorer.d.ts +1 -1
  352. package/dist/lib/evaluation/scorers/llm/summarizationScorer.d.ts +1 -1
  353. package/dist/lib/evaluation/scorers/llm/toneConsistencyScorer.d.ts +1 -1
  354. package/dist/lib/evaluation/scorers/llm/toxicityScorer.d.ts +1 -1
  355. package/dist/lib/evaluation/scorers/rule/baseRuleScorer.d.ts +1 -1
  356. package/dist/lib/evaluation/scorers/rule/contentSimilarityScorer.d.ts +4 -3
  357. package/dist/lib/evaluation/scorers/rule/formatScorer.d.ts +5 -4
  358. package/dist/lib/evaluation/scorers/rule/index.d.ts +4 -4
  359. package/dist/lib/evaluation/scorers/rule/keywordCoverageScorer.d.ts +3 -2
  360. package/dist/lib/evaluation/scorers/rule/lengthScorer.d.ts +5 -4
  361. package/dist/lib/evaluation/scorers/scorerBuilder.d.ts +1 -2
  362. package/dist/lib/evaluation/scorers/scorerBuilder.js +1 -1
  363. package/dist/lib/evaluation/scorers/scorerRegistry.d.ts +1 -1
  364. package/dist/lib/evaluation/scoring.d.ts +1 -2
  365. package/dist/lib/evaluation/scoring.js +1 -2
  366. package/dist/lib/factories/providerFactory.d.ts +1 -2
  367. package/dist/lib/features/ppt/constants.d.ts +1 -1
  368. package/dist/lib/features/ppt/contentPlanner.d.ts +1 -2
  369. package/dist/lib/features/ppt/contentPlanner.js +1 -1
  370. package/dist/lib/features/ppt/index.d.ts +2 -17
  371. package/dist/lib/features/ppt/index.js +6 -14
  372. package/dist/lib/features/ppt/pptError.d.ts +38 -0
  373. package/dist/lib/features/ppt/pptError.js +54 -0
  374. package/dist/lib/features/ppt/presentationOrchestrator.d.ts +1 -1
  375. package/dist/lib/features/ppt/presentationOrchestrator.js +2 -3
  376. package/dist/lib/features/ppt/slideGenerator.d.ts +1 -1
  377. package/dist/lib/features/ppt/slideGenerator.js +2 -3
  378. package/dist/lib/features/ppt/slideRenderers.d.ts +1 -1
  379. package/dist/lib/features/ppt/slideTypeInference.d.ts +1 -1
  380. package/dist/lib/features/ppt/utils.d.ts +1 -2
  381. package/dist/lib/features/ppt/utils.js +1 -1
  382. package/dist/lib/files/fileReferenceRegistry.d.ts +1 -2
  383. package/dist/lib/files/fileReferenceRegistry.js +1 -1
  384. package/dist/lib/files/fileTools.d.ts +5 -5
  385. package/dist/lib/files/index.d.ts +1 -2
  386. package/dist/lib/files/index.js +1 -1
  387. package/dist/lib/files/streamingReader.d.ts +1 -1
  388. package/dist/lib/hitl/hitlManager.d.ts +1 -1
  389. package/dist/lib/image-gen/ImageGenService.d.ts +1 -1
  390. package/dist/lib/image-gen/ImageGenService.js +1 -1
  391. package/dist/lib/image-gen/imageGenTools.d.ts +1 -18
  392. package/dist/lib/image-gen/index.d.ts +1 -2
  393. package/dist/lib/image-gen/index.js +1 -1
  394. package/dist/lib/index.d.ts +6 -25
  395. package/dist/lib/index.js +23 -8
  396. package/dist/lib/mcp/agentExposure.d.ts +1 -146
  397. package/dist/lib/mcp/auth/oauthClientProvider.d.ts +1 -1
  398. package/dist/lib/mcp/auth/tokenStorage.d.ts +1 -1
  399. package/dist/lib/mcp/batching/index.d.ts +0 -10
  400. package/dist/lib/mcp/batching/index.js +0 -9
  401. package/dist/lib/mcp/batching/requestBatcher.d.ts +1 -73
  402. package/dist/lib/mcp/caching/index.d.ts +0 -10
  403. package/dist/lib/mcp/caching/index.js +0 -9
  404. package/dist/lib/mcp/caching/toolCache.d.ts +6 -73
  405. package/dist/lib/mcp/elicitation/elicitationManager.d.ts +1 -1
  406. package/dist/lib/mcp/elicitation/index.d.ts +0 -10
  407. package/dist/lib/mcp/elicitation/index.js +0 -9
  408. package/dist/lib/mcp/elicitationProtocol.d.ts +1 -90
  409. package/dist/lib/mcp/enhancedToolDiscovery.d.ts +2 -82
  410. package/dist/lib/mcp/enhancedToolDiscovery.js +1 -1
  411. package/dist/lib/mcp/externalServerManager.d.ts +1 -5
  412. package/dist/lib/mcp/factory.d.ts +1 -1
  413. package/dist/lib/mcp/flexibleToolValidator.d.ts +1 -1
  414. package/dist/lib/mcp/httpRateLimiter.d.ts +6 -6
  415. package/dist/lib/mcp/httpRateLimiter.js +1 -2
  416. package/dist/lib/mcp/httpRetryHandler.d.ts +1 -1
  417. package/dist/lib/mcp/httpRetryHandler.js +1 -2
  418. package/dist/lib/mcp/index.d.ts +1 -15
  419. package/dist/lib/mcp/index.js +7 -0
  420. package/dist/lib/mcp/mcpCircuitBreaker.d.ts +2 -2
  421. package/dist/lib/mcp/mcpCircuitBreaker.js +2 -2
  422. package/dist/lib/mcp/mcpClientFactory.d.ts +1 -2
  423. package/dist/lib/mcp/mcpClientFactory.js +2 -3
  424. package/dist/lib/mcp/mcpOutputNormalizer.d.ts +1 -3
  425. package/dist/lib/mcp/mcpOutputNormalizer.js +1 -0
  426. package/dist/lib/mcp/mcpRegistryClient.d.ts +13 -216
  427. package/dist/lib/mcp/mcpServerBase.d.ts +1 -66
  428. package/dist/lib/mcp/mcpServerBase.js +3 -0
  429. package/dist/lib/mcp/multiServerManager.d.ts +1 -116
  430. package/dist/lib/mcp/registry.d.ts +1 -3
  431. package/dist/lib/mcp/routing/index.d.ts +0 -10
  432. package/dist/lib/mcp/routing/index.js +0 -9
  433. package/dist/lib/mcp/routing/toolRouter.d.ts +1 -110
  434. package/dist/lib/mcp/serverCapabilities.d.ts +1 -167
  435. package/dist/lib/mcp/servers/agent/directToolsServer.d.ts +1 -1
  436. package/dist/lib/mcp/servers/aiProviders/aiCoreServer.d.ts +1 -1
  437. package/dist/lib/mcp/servers/utilities/utilityServer.d.ts +1 -1
  438. package/dist/lib/mcp/toolAnnotations.d.ts +1 -98
  439. package/dist/lib/mcp/toolConverter.d.ts +1 -92
  440. package/dist/lib/mcp/toolDiscoveryService.d.ts +1 -3
  441. package/dist/lib/mcp/toolIntegration.d.ts +1 -45
  442. package/dist/lib/mcp/toolRegistry.d.ts +1 -3
  443. package/dist/lib/memory/hippocampusInitializer.d.ts +0 -3
  444. package/dist/lib/memory/memoryRetrievalTools.d.ts +1 -1
  445. package/dist/lib/memory/memoryRetrievalTools.js +1 -2
  446. package/dist/lib/middleware/builtin/analytics.d.ts +1 -1
  447. package/dist/lib/middleware/builtin/autoEvaluation.d.ts +1 -1
  448. package/dist/lib/middleware/builtin/guardrails.d.ts +1 -2
  449. package/dist/lib/middleware/builtin/lifecycle.d.ts +1 -1
  450. package/dist/lib/middleware/factory.d.ts +1 -1
  451. package/dist/lib/middleware/index.d.ts +0 -2
  452. package/dist/lib/middleware/index.js +1 -0
  453. package/dist/lib/middleware/registry.d.ts +1 -1
  454. package/dist/lib/middleware/utils/guardrailsUtils.d.ts +1 -1
  455. package/dist/lib/models/anthropicModels.d.ts +2 -2
  456. package/dist/lib/models/anthropicModels.js +1 -1
  457. package/dist/lib/models/modelRegistry.d.ts +1 -2
  458. package/dist/lib/models/modelRegistry.js +1 -1
  459. package/dist/lib/models/modelResolver.d.ts +1 -2
  460. package/dist/lib/neurolink.d.ts +15 -30
  461. package/dist/lib/neurolink.js +20 -6
  462. package/dist/lib/observability/exporterRegistry.d.ts +1 -1
  463. package/dist/lib/observability/exporters/arizeExporter.d.ts +1 -1
  464. package/dist/lib/observability/exporters/baseExporter.d.ts +1 -1
  465. package/dist/lib/observability/exporters/braintrustExporter.d.ts +1 -1
  466. package/dist/lib/observability/exporters/datadogExporter.d.ts +1 -1
  467. package/dist/lib/observability/exporters/datadogExporter.js +1 -1
  468. package/dist/lib/observability/exporters/laminarExporter.d.ts +1 -1
  469. package/dist/lib/observability/exporters/laminarExporter.js +1 -1
  470. package/dist/lib/observability/exporters/langfuseExporter.d.ts +1 -1
  471. package/dist/lib/observability/exporters/langfuseExporter.js +1 -1
  472. package/dist/lib/observability/exporters/langsmithExporter.d.ts +1 -1
  473. package/dist/lib/observability/exporters/otelExporter.d.ts +1 -1
  474. package/dist/lib/observability/exporters/posthogExporter.d.ts +1 -1
  475. package/dist/lib/observability/exporters/posthogExporter.js +1 -1
  476. package/dist/lib/observability/exporters/sentryExporter.d.ts +1 -1
  477. package/dist/lib/observability/exporters/sentryExporter.js +1 -1
  478. package/dist/lib/observability/index.d.ts +6 -8
  479. package/dist/lib/observability/index.js +1 -1
  480. package/dist/lib/observability/metricsAggregator.d.ts +4 -108
  481. package/dist/lib/observability/metricsAggregator.js +0 -4
  482. package/dist/lib/observability/otelBridge.d.ts +2 -2
  483. package/dist/lib/observability/otelBridge.js +1 -1
  484. package/dist/lib/observability/retryPolicy.d.ts +1 -27
  485. package/dist/lib/observability/sampling/index.d.ts +1 -1
  486. package/dist/lib/observability/sampling/samplers.d.ts +1 -3
  487. package/dist/lib/observability/sampling/samplers.js +1 -1
  488. package/dist/lib/observability/spanProcessor.d.ts +1 -2
  489. package/dist/lib/observability/tokenTracker.d.ts +3 -41
  490. package/dist/lib/observability/utils/safeMetadata.d.ts +1 -1
  491. package/dist/lib/observability/utils/spanSerializer.d.ts +1 -1
  492. package/dist/lib/observability/utils/spanSerializer.js +1 -1
  493. package/dist/lib/processors/archive/ArchiveProcessor.d.ts +3 -44
  494. package/dist/lib/processors/archive/ArchiveProcessor.js +3 -0
  495. package/dist/lib/processors/archive/index.d.ts +1 -1
  496. package/dist/lib/processors/archive/index.js +1 -0
  497. package/dist/lib/processors/base/BaseFileProcessor.d.ts +6 -6
  498. package/dist/lib/processors/base/BaseFileProcessor.js +1 -1
  499. package/dist/lib/processors/base/index.d.ts +1 -2
  500. package/dist/lib/processors/base/index.js +4 -1
  501. package/dist/lib/processors/cli/fileProcessorCli.d.ts +1 -40
  502. package/dist/lib/processors/cli/fileProcessorCli.js +3 -0
  503. package/dist/lib/processors/cli/index.d.ts +0 -1
  504. package/dist/lib/processors/cli/index.js +3 -0
  505. package/dist/lib/processors/code/ConfigProcessor.d.ts +2 -4
  506. package/dist/lib/processors/code/ConfigProcessor.js +4 -0
  507. package/dist/lib/processors/code/SourceCodeProcessor.d.ts +2 -4
  508. package/dist/lib/processors/code/SourceCodeProcessor.js +4 -0
  509. package/dist/lib/processors/code/index.d.ts +2 -2
  510. package/dist/lib/processors/code/index.js +6 -2
  511. package/dist/lib/processors/config/fileTypes.d.ts +0 -20
  512. package/dist/lib/processors/config/fileTypes.js +3 -0
  513. package/dist/lib/processors/config/index.d.ts +4 -4
  514. package/dist/lib/processors/config/index.js +10 -3
  515. package/dist/lib/processors/config/languageMap.d.ts +0 -4
  516. package/dist/lib/processors/config/languageMap.js +3 -0
  517. package/dist/lib/processors/config/mimeTypes.d.ts +0 -18
  518. package/dist/lib/processors/config/mimeTypes.js +3 -0
  519. package/dist/lib/processors/config/sizeLimits.d.ts +0 -8
  520. package/dist/lib/processors/config/sizeLimits.js +3 -0
  521. package/dist/lib/processors/data/JsonProcessor.d.ts +2 -4
  522. package/dist/lib/processors/data/JsonProcessor.js +2 -0
  523. package/dist/lib/processors/data/XmlProcessor.d.ts +3 -5
  524. package/dist/lib/processors/data/XmlProcessor.js +4 -0
  525. package/dist/lib/processors/data/YamlProcessor.d.ts +3 -5
  526. package/dist/lib/processors/data/YamlProcessor.js +2 -0
  527. package/dist/lib/processors/data/index.d.ts +3 -3
  528. package/dist/lib/processors/data/index.js +9 -3
  529. package/dist/lib/processors/document/ExcelProcessor.d.ts +3 -5
  530. package/dist/lib/processors/document/ExcelProcessor.js +2 -0
  531. package/dist/lib/processors/document/OpenDocumentProcessor.d.ts +2 -4
  532. package/dist/lib/processors/document/OpenDocumentProcessor.js +1 -0
  533. package/dist/lib/processors/document/RtfProcessor.d.ts +2 -4
  534. package/dist/lib/processors/document/RtfProcessor.js +2 -0
  535. package/dist/lib/processors/document/WordProcessor.d.ts +3 -5
  536. package/dist/lib/processors/document/WordProcessor.js +2 -0
  537. package/dist/lib/processors/document/index.d.ts +4 -4
  538. package/dist/lib/processors/document/index.js +4 -1
  539. package/dist/lib/processors/errors/FileErrorCode.d.ts +3 -15
  540. package/dist/lib/processors/errors/errorHelpers.d.ts +2 -2
  541. package/dist/lib/processors/errors/errorHelpers.js +1 -1
  542. package/dist/lib/processors/errors/errorSerializer.d.ts +3 -2
  543. package/dist/lib/processors/errors/index.d.ts +3 -3
  544. package/dist/lib/processors/index.d.ts +7 -10
  545. package/dist/lib/processors/index.js +11 -2
  546. package/dist/lib/processors/integration/FileProcessorIntegration.d.ts +2 -70
  547. package/dist/lib/processors/integration/FileProcessorIntegration.js +6 -0
  548. package/dist/lib/processors/integration/index.d.ts +0 -1
  549. package/dist/lib/processors/integration/index.js +3 -0
  550. package/dist/lib/processors/markup/HtmlProcessor.d.ts +2 -4
  551. package/dist/lib/processors/markup/HtmlProcessor.js +2 -0
  552. package/dist/lib/processors/markup/MarkdownProcessor.d.ts +2 -4
  553. package/dist/lib/processors/markup/MarkdownProcessor.js +4 -0
  554. package/dist/lib/processors/markup/SvgProcessor.d.ts +2 -4
  555. package/dist/lib/processors/markup/SvgProcessor.js +4 -0
  556. package/dist/lib/processors/markup/TextProcessor.d.ts +2 -4
  557. package/dist/lib/processors/markup/TextProcessor.js +2 -0
  558. package/dist/lib/processors/markup/index.d.ts +4 -4
  559. package/dist/lib/processors/markup/index.js +12 -4
  560. package/dist/lib/processors/media/AudioProcessor.d.ts +3 -64
  561. package/dist/lib/processors/media/AudioProcessor.js +3 -0
  562. package/dist/lib/processors/media/VideoProcessor.d.ts +3 -48
  563. package/dist/lib/processors/media/VideoProcessor.js +3 -0
  564. package/dist/lib/processors/media/index.d.ts +0 -1
  565. package/dist/lib/processors/media/index.js +3 -0
  566. package/dist/lib/processors/registry/ProcessorRegistry.d.ts +2 -3
  567. package/dist/lib/processors/registry/ProcessorRegistry.js +1 -1
  568. package/dist/lib/processors/registry/index.d.ts +1 -11
  569. package/dist/lib/processors/registry/index.js +2 -9
  570. package/dist/lib/providers/amazonBedrock.d.ts +1 -2
  571. package/dist/lib/providers/amazonBedrock.js +1 -1
  572. package/dist/lib/providers/amazonSagemaker.d.ts +1 -1
  573. package/dist/lib/providers/anthropic.d.ts +2 -7
  574. package/dist/lib/providers/anthropic.js +4 -1
  575. package/dist/lib/providers/anthropicBaseProvider.d.ts +1 -1
  576. package/dist/lib/providers/anthropicBaseProvider.js +2 -1
  577. package/dist/lib/providers/azureOpenai.d.ts +1 -2
  578. package/dist/lib/providers/azureOpenai.js +1 -0
  579. package/dist/lib/providers/googleAiStudio.d.ts +1 -3
  580. package/dist/lib/providers/googleAiStudio.js +4 -2
  581. package/dist/lib/providers/googleNativeGemini3.d.ts +1 -2
  582. package/dist/lib/providers/googleVertex.d.ts +1 -3
  583. package/dist/lib/providers/googleVertex.js +4 -3
  584. package/dist/lib/providers/huggingFace.d.ts +1 -2
  585. package/dist/lib/providers/huggingFace.js +1 -0
  586. package/dist/lib/providers/litellm.d.ts +1 -1
  587. package/dist/lib/providers/litellm.js +4 -2
  588. package/dist/lib/providers/mistral.d.ts +1 -3
  589. package/dist/lib/providers/mistral.js +1 -0
  590. package/dist/lib/providers/ollama.d.ts +1 -2
  591. package/dist/lib/providers/ollama.js +1 -1
  592. package/dist/lib/providers/openAI.d.ts +1 -2
  593. package/dist/lib/providers/openAI.js +2 -1
  594. package/dist/lib/providers/openRouter.d.ts +1 -1
  595. package/dist/lib/providers/openRouter.js +1 -0
  596. package/dist/lib/providers/openaiCompatible.d.ts +1 -2
  597. package/dist/lib/providers/openaiCompatible.js +1 -0
  598. package/dist/lib/providers/providerTypeUtils.d.ts +1 -1
  599. package/dist/lib/providers/sagemaker/adaptive-semaphore.d.ts +1 -1
  600. package/dist/lib/providers/sagemaker/client.d.ts +1 -2
  601. package/dist/lib/providers/sagemaker/config.d.ts +1 -1
  602. package/dist/lib/providers/sagemaker/detection.d.ts +4 -27
  603. package/dist/lib/providers/sagemaker/diagnostics.d.ts +3 -2
  604. package/dist/lib/providers/sagemaker/errors.d.ts +1 -1
  605. package/dist/lib/providers/sagemaker/index.d.ts +0 -1
  606. package/dist/lib/providers/sagemaker/index.js +1 -0
  607. package/dist/lib/providers/sagemaker/language-model.d.ts +3 -4
  608. package/dist/lib/providers/sagemaker/parsers.d.ts +1 -26
  609. package/dist/lib/providers/sagemaker/streaming.d.ts +1 -1
  610. package/dist/lib/providers/sagemaker/streaming.js +1 -1
  611. package/dist/lib/providers/sagemaker/structured-parser.d.ts +1 -1
  612. package/dist/lib/providers/sagemaker/structured-parser.js +1 -1
  613. package/dist/lib/proxy/cloaking/index.d.ts +0 -1
  614. package/dist/lib/proxy/cloaking/index.js +1 -0
  615. package/dist/lib/proxy/proxyEnv.d.ts +3 -3
  616. package/dist/lib/proxy/proxyPaths.d.ts +1 -10
  617. package/dist/lib/proxy/proxyTracer.d.ts +0 -1
  618. package/dist/lib/proxy/quietDetector.d.ts +3 -2
  619. package/dist/lib/proxy/rawStreamCapture.d.ts +3 -2
  620. package/dist/lib/proxy/sseInterceptor.d.ts +5 -4
  621. package/dist/lib/proxy/updateChecker.d.ts +3 -2
  622. package/dist/lib/proxy/updateState.d.ts +5 -4
  623. package/dist/lib/rag/ChunkerFactory.d.ts +1 -1
  624. package/dist/lib/rag/ChunkerRegistry.d.ts +1 -1
  625. package/dist/lib/rag/chunkers/BaseChunker.d.ts +1 -1
  626. package/dist/lib/rag/chunkers/CharacterChunker.d.ts +1 -1
  627. package/dist/lib/rag/chunkers/HTMLChunker.d.ts +1 -1
  628. package/dist/lib/rag/chunkers/JSONChunker.d.ts +1 -1
  629. package/dist/lib/rag/chunkers/LaTeXChunker.d.ts +1 -1
  630. package/dist/lib/rag/chunkers/MarkdownChunker.d.ts +1 -1
  631. package/dist/lib/rag/chunkers/RecursiveChunker.d.ts +1 -1
  632. package/dist/lib/rag/chunkers/SemanticMarkdownChunker.d.ts +1 -1
  633. package/dist/lib/rag/chunkers/SentenceChunker.d.ts +1 -1
  634. package/dist/lib/rag/chunkers/TokenChunker.d.ts +1 -1
  635. package/dist/lib/rag/chunking/characterChunker.d.ts +1 -1
  636. package/dist/lib/rag/chunking/chunkerRegistry.d.ts +2 -2
  637. package/dist/lib/rag/chunking/htmlChunker.d.ts +1 -1
  638. package/dist/lib/rag/chunking/jsonChunker.d.ts +1 -1
  639. package/dist/lib/rag/chunking/latexChunker.d.ts +1 -1
  640. package/dist/lib/rag/chunking/markdownChunker.d.ts +1 -1
  641. package/dist/lib/rag/chunking/recursiveChunker.d.ts +1 -1
  642. package/dist/lib/rag/chunking/semanticChunker.d.ts +1 -1
  643. package/dist/lib/rag/chunking/sentenceChunker.d.ts +1 -1
  644. package/dist/lib/rag/chunking/tokenChunker.d.ts +1 -1
  645. package/dist/lib/rag/document/MDocument.d.ts +1 -1
  646. package/dist/lib/rag/document/index.d.ts +1 -1
  647. package/dist/lib/rag/document/loaders.d.ts +1 -6
  648. package/dist/lib/rag/errors/RAGError.d.ts +2 -1
  649. package/dist/lib/rag/errors/index.d.ts +1 -1
  650. package/dist/lib/rag/graphRag/graphRAG.d.ts +1 -1
  651. package/dist/lib/rag/index.d.ts +8 -8
  652. package/dist/lib/rag/index.js +1 -1
  653. package/dist/lib/rag/metadata/MetadataExtractorFactory.d.ts +1 -5
  654. package/dist/lib/rag/metadata/MetadataExtractorRegistry.d.ts +1 -1
  655. package/dist/lib/rag/metadata/index.d.ts +1 -1
  656. package/dist/lib/rag/metadata/metadataExtractor.d.ts +1 -1
  657. package/dist/lib/rag/pipeline/RAGPipeline.d.ts +1 -8
  658. package/dist/lib/rag/pipeline/RAGPipeline.js +1 -1
  659. package/dist/lib/rag/pipeline/contextAssembly.d.ts +1 -5
  660. package/dist/lib/rag/pipeline/index.d.ts +2 -2
  661. package/dist/lib/rag/pipeline/index.js +1 -1
  662. package/dist/lib/rag/ragIntegration.d.ts +1 -3
  663. package/dist/lib/rag/reranker/RerankerFactory.d.ts +1 -6
  664. package/dist/lib/rag/reranker/RerankerFactory.js +2 -2
  665. package/dist/lib/rag/reranker/RerankerRegistry.d.ts +1 -1
  666. package/dist/lib/rag/reranker/index.d.ts +1 -1
  667. package/dist/lib/rag/reranker/reranker.d.ts +1 -2
  668. package/dist/lib/rag/resilience/CircuitBreaker.d.ts +0 -4
  669. package/dist/lib/rag/resilience/RetryHandler.d.ts +1 -2
  670. package/dist/lib/rag/resilience/index.d.ts +2 -2
  671. package/dist/lib/rag/retrieval/hybridSearch.d.ts +1 -4
  672. package/dist/lib/rag/retrieval/hybridSearch.js +5 -1
  673. package/dist/lib/rag/retrieval/index.d.ts +2 -2
  674. package/dist/lib/rag/retrieval/vectorQueryTool.d.ts +1 -3
  675. package/dist/lib/rag/retrieval/vectorQueryTool.js +5 -1
  676. package/dist/lib/sdk/toolRegistration.d.ts +3 -5
  677. package/dist/lib/server/abstract/baseServerAdapter.d.ts +1 -1
  678. package/dist/lib/server/abstract/baseServerAdapter.js +1 -2
  679. package/dist/lib/server/adapters/expressAdapter.d.ts +1 -1
  680. package/dist/lib/server/adapters/fastifyAdapter.d.ts +1 -1
  681. package/dist/lib/server/adapters/honoAdapter.d.ts +1 -1
  682. package/dist/lib/server/adapters/koaAdapter.d.ts +1 -1
  683. package/dist/lib/server/errors.d.ts +1 -1
  684. package/dist/lib/server/errors.js +1 -1
  685. package/dist/lib/server/factory/serverAdapterFactory.d.ts +1 -1
  686. package/dist/lib/server/index.d.ts +10 -12
  687. package/dist/lib/server/index.js +14 -3
  688. package/dist/lib/server/middleware/abortSignal.d.ts +3 -2
  689. package/dist/lib/server/middleware/auth.d.ts +7 -49
  690. package/dist/lib/server/middleware/auth.js +3 -0
  691. package/dist/lib/server/middleware/cache.d.ts +3 -54
  692. package/dist/lib/server/middleware/cache.js +6 -0
  693. package/dist/lib/server/middleware/common.d.ts +1 -1
  694. package/dist/lib/server/middleware/common.js +1 -2
  695. package/dist/lib/server/middleware/deprecation.d.ts +3 -2
  696. package/dist/lib/server/middleware/index.d.ts +6 -6
  697. package/dist/lib/server/middleware/index.js +3 -3
  698. package/dist/lib/server/middleware/mcpBodyAttachment.d.ts +1 -1
  699. package/dist/lib/server/middleware/rateLimit.d.ts +5 -5
  700. package/dist/lib/server/middleware/validation.d.ts +6 -6
  701. package/dist/lib/server/openapi/generator.d.ts +4 -4
  702. package/dist/lib/server/openapi/index.d.ts +1 -1
  703. package/dist/lib/server/openapi/schemas.d.ts +1 -1
  704. package/dist/lib/server/openapi/templates.d.ts +1 -1
  705. package/dist/lib/server/routes/agentRoutes.d.ts +1 -1
  706. package/dist/lib/server/routes/claudeProxyRoutes.d.ts +1 -2
  707. package/dist/lib/server/routes/healthRoutes.d.ts +1 -1
  708. package/dist/lib/server/routes/index.d.ts +2 -2
  709. package/dist/lib/server/routes/mcpRoutes.d.ts +1 -1
  710. package/dist/lib/server/routes/memoryRoutes.d.ts +1 -1
  711. package/dist/lib/server/routes/openApiRoutes.d.ts +1 -1
  712. package/dist/lib/server/routes/toolRoutes.d.ts +1 -1
  713. package/dist/lib/server/streaming/dataStream.d.ts +5 -99
  714. package/dist/lib/server/streaming/index.d.ts +1 -1
  715. package/dist/lib/server/streaming/index.js +6 -1
  716. package/dist/lib/server/utils/redaction.d.ts +1 -8
  717. package/dist/lib/server/utils/redaction.js +0 -6
  718. package/dist/lib/server/utils/validation.d.ts +4 -30
  719. package/dist/lib/server/utils/validation.js +3 -0
  720. package/dist/lib/server/voice/frameBus.d.ts +1 -1
  721. package/dist/lib/server/voice/voiceWebSocketHandler.d.ts +0 -4
  722. package/dist/lib/server/websocket/WebSocketHandler.d.ts +1 -1
  723. package/dist/lib/services/server/ai/observability/instrumentation.d.ts +1 -63
  724. package/dist/lib/session/globalSessionState.d.ts +1 -1
  725. package/dist/lib/tasks/autoresearchTaskExecutor.d.ts +1 -2
  726. package/dist/lib/tasks/backends/bullmqBackend.d.ts +1 -1
  727. package/dist/lib/tasks/backends/bullmqBackend.js +1 -1
  728. package/dist/lib/tasks/backends/nodeTimeoutBackend.d.ts +1 -1
  729. package/dist/lib/tasks/backends/nodeTimeoutBackend.js +1 -1
  730. package/dist/lib/tasks/backends/taskBackendRegistry.d.ts +1 -1
  731. package/dist/lib/tasks/store/fileTaskStore.d.ts +1 -1
  732. package/dist/lib/tasks/store/fileTaskStore.js +1 -1
  733. package/dist/lib/tasks/store/redisTaskStore.d.ts +1 -1
  734. package/dist/lib/tasks/store/redisTaskStore.js +1 -1
  735. package/dist/lib/tasks/taskExecutor.d.ts +1 -2
  736. package/dist/lib/tasks/taskManager.d.ts +1 -1
  737. package/dist/lib/tasks/taskManager.js +1 -1
  738. package/dist/lib/tasks/tools/taskTools.d.ts +7 -7
  739. package/dist/lib/telemetry/index.d.ts +2 -2
  740. package/dist/lib/telemetry/telemetryService.d.ts +1 -8
  741. package/dist/lib/telemetry/withSpan.d.ts +2 -7
  742. package/dist/lib/telemetry/withSpan.js +1 -1
  743. package/dist/lib/types/{actionTypes.js → action.js} +1 -1
  744. package/dist/lib/types/{typeAliases.d.ts → aliases.d.ts} +1 -32
  745. package/dist/lib/types/{typeAliases.js → aliases.js} +1 -1
  746. package/dist/{types/artifactTypes.d.ts → lib/types/artifact.d.ts} +2 -2
  747. package/dist/lib/types/{artifactTypes.js → artifact.js} +1 -1
  748. package/dist/{types/authTypes.d.ts → lib/types/auth.d.ts} +43 -2
  749. package/dist/lib/types/{authTypes.js → auth.js} +1 -1
  750. package/dist/{types/autoresearchTypes.d.ts → lib/types/autoresearch.d.ts} +1 -1
  751. package/dist/lib/types/{autoresearchTypes.js → autoresearch.js} +1 -1
  752. package/dist/lib/types/circuitBreakerErrors.d.ts +1 -1
  753. package/dist/lib/types/cli.d.ts +60 -12
  754. package/dist/lib/types/cli.js +1 -1
  755. package/dist/{types/clientTypes.d.ts → lib/types/client.d.ts} +292 -107
  756. package/dist/lib/types/{clientTypes.js → client.js} +1 -1
  757. package/dist/lib/types/common.d.ts +135 -2
  758. package/dist/{types/configTypes.d.ts → lib/types/config.d.ts} +8 -9
  759. package/dist/lib/types/{configTypes.js → config.js} +1 -1
  760. package/dist/lib/types/{contextTypes.js → context.js} +1 -1
  761. package/dist/lib/types/conversation.d.ts +6 -4
  762. package/dist/lib/types/{domainTypes.js → domain.js} +1 -1
  763. package/dist/lib/{mcp/elicitation/types.d.ts → types/elicitation.d.ts} +1 -1
  764. package/dist/lib/{mcp/elicitation/types.js → types/elicitation.js} +1 -1
  765. package/dist/lib/types/enums.d.ts +9 -0
  766. package/dist/lib/types/enums.js +10 -0
  767. package/dist/lib/types/evaluation.d.ts +200 -1
  768. package/dist/lib/types/evaluation.js +1 -1
  769. package/dist/lib/{observability/types/exporterTypes.js → types/exporter.js} +1 -1
  770. package/dist/lib/types/externalMcp.d.ts +4 -4
  771. package/dist/lib/types/{fileTypes.js → file.js} +1 -1
  772. package/dist/lib/types/{fileReferenceTypes.d.ts → fileReference.d.ts} +13 -1
  773. package/dist/lib/{files/types.js → types/fileReference.js} +3 -5
  774. package/dist/lib/types/{generateTypes.d.ts → generate.d.ts} +13 -11
  775. package/dist/lib/types/generate.js +2 -0
  776. package/dist/lib/types/{groundingTypes.js → grounding.js} +1 -1
  777. package/dist/lib/types/{hitlTypes.js → hitl.js} +1 -1
  778. package/dist/{image-gen/types.d.ts → lib/types/imageGen.d.ts} +18 -0
  779. package/dist/lib/{image-gen/types.js → types/imageGen.js} +1 -1
  780. package/dist/lib/types/index.d.ts +50 -47
  781. package/dist/lib/types/index.js +52 -57
  782. package/dist/lib/types/mcp.d.ts +2035 -0
  783. package/dist/lib/types/{mcpTypes.js → mcp.js} +1 -1
  784. package/dist/lib/types/{mcpOutputTypes.js → mcpOutput.js} +1 -1
  785. package/dist/lib/types/{middlewareTypes.d.ts → middleware.d.ts} +1 -2
  786. package/dist/lib/types/middleware.js +2 -0
  787. package/dist/lib/types/{modelTypes.d.ts → model.d.ts} +1 -1
  788. package/dist/lib/types/{modelTypes.js → model.js} +1 -1
  789. package/dist/lib/types/observability.d.ts +216 -4
  790. package/dist/{types/pptTypes.d.ts → lib/types/ppt.d.ts} +0 -28
  791. package/dist/lib/types/ppt.js +37 -0
  792. package/dist/lib/{processors/base/types.d.ts → types/processor.d.ts} +233 -7
  793. package/dist/lib/{processors/base/types.js → types/processor.js} +9 -1
  794. package/dist/lib/types/providers.d.ts +9 -8
  795. package/dist/lib/types/{proxyTypes.d.ts → proxy.d.ts} +16 -4
  796. package/dist/lib/types/{proxyTypes.js → proxy.js} +1 -1
  797. package/dist/lib/{rag/types.d.ts → types/rag.d.ts} +604 -32
  798. package/dist/lib/types/{ragTypes.js → rag.js} +1 -1
  799. package/dist/{types/scorerTypes.d.ts → lib/types/scorer.d.ts} +2 -2
  800. package/dist/lib/types/{scorerTypes.js → scorer.js} +1 -1
  801. package/dist/lib/types/{sdkTypes.d.ts → sdk.d.ts} +9 -9
  802. package/dist/lib/types/{sdkTypes.js → sdk.js} +1 -1
  803. package/dist/{types/serverTypes.d.ts → lib/types/server.d.ts} +156 -2
  804. package/dist/lib/types/{serverTypes.js → server.js} +1 -1
  805. package/dist/lib/types/{serviceTypes.js → service.js} +1 -1
  806. package/dist/lib/{observability/types/spanTypes.js → types/span.js} +1 -1
  807. package/dist/{types/streamTypes.d.ts → lib/types/stream.d.ts} +25 -36
  808. package/dist/lib/types/stream.js +2 -0
  809. package/dist/lib/types/{subscriptionTypes.d.ts → subscription.d.ts} +34 -56
  810. package/dist/lib/types/{subscriptionTypes.js → subscription.js} +1 -1
  811. package/dist/lib/types/{taskTypes.d.ts → task.d.ts} +6 -6
  812. package/dist/lib/types/{taskTypes.js → task.js} +1 -1
  813. package/dist/lib/types/{taskClassificationTypes.js → taskClassification.js} +1 -1
  814. package/dist/lib/types/tools.d.ts +6 -4
  815. package/dist/lib/types/{ttsTypes.js → tts.js} +1 -1
  816. package/dist/lib/types/universalProviderOptions.d.ts +1 -1
  817. package/dist/lib/types/utilities.d.ts +1 -1
  818. package/dist/lib/types/{workflowTypes.d.ts → workflow.d.ts} +23 -1
  819. package/dist/lib/types/{workflowTypes.js → workflow.js} +1 -9
  820. package/dist/lib/utils/async/index.d.ts +1 -1
  821. package/dist/lib/utils/async/retry.d.ts +2 -1
  822. package/dist/lib/utils/conversationMemory.d.ts +1 -2
  823. package/dist/lib/utils/csvProcessor.d.ts +1 -1
  824. package/dist/lib/utils/errorHandling.d.ts +1 -1
  825. package/dist/lib/utils/errorHandling.js +1 -1
  826. package/dist/lib/utils/evaluationUtils.d.ts +1 -1
  827. package/dist/lib/utils/factoryProcessing.d.ts +1 -5
  828. package/dist/lib/utils/fileDetector.d.ts +1 -1
  829. package/dist/lib/utils/imageCache.d.ts +1 -1
  830. package/dist/lib/utils/imageCompressor.d.ts +5 -5
  831. package/dist/lib/utils/imageProcessor.d.ts +1 -2
  832. package/dist/lib/utils/json/extract.d.ts +1 -2
  833. package/dist/lib/utils/logger.d.ts +1 -1
  834. package/dist/lib/utils/loopUtils.d.ts +1 -2
  835. package/dist/lib/utils/mcpDefaults.d.ts +1 -1
  836. package/dist/lib/utils/messageBuilder.d.ts +1 -4
  837. package/dist/lib/utils/messageBuilder.js +1 -1
  838. package/dist/lib/utils/modelAliasResolver.d.ts +1 -1
  839. package/dist/lib/utils/modelRouter.d.ts +1 -1
  840. package/dist/lib/utils/multimodalOptionsBuilder.d.ts +6 -6
  841. package/dist/lib/utils/observabilityHelpers.d.ts +1 -1
  842. package/dist/lib/utils/optionsConversion.d.ts +1 -3
  843. package/dist/lib/utils/optionsUtils.d.ts +1 -3
  844. package/dist/lib/utils/optionsUtils.js +1 -1
  845. package/dist/lib/utils/parameterValidation.d.ts +1 -5
  846. package/dist/lib/utils/performance.d.ts +1 -1
  847. package/dist/lib/utils/pricing.d.ts +1 -1
  848. package/dist/lib/utils/promptRedaction.d.ts +1 -1
  849. package/dist/lib/utils/providerConfig.d.ts +1 -4
  850. package/dist/lib/utils/providerConfig.js +1 -0
  851. package/dist/lib/utils/providerHealth.d.ts +1 -1
  852. package/dist/lib/utils/providerUtils.d.ts +2 -3
  853. package/dist/lib/utils/rateLimiter.d.ts +1 -1
  854. package/dist/lib/utils/redis.d.ts +1 -1
  855. package/dist/lib/utils/retryHandler.d.ts +1 -1
  856. package/dist/lib/utils/sanitizers/index.d.ts +0 -2
  857. package/dist/lib/utils/schemaConversion.d.ts +1 -1
  858. package/dist/lib/utils/taskClassificationUtils.d.ts +1 -1
  859. package/dist/lib/utils/taskClassifier.d.ts +1 -1
  860. package/dist/lib/utils/thinkingConfig.d.ts +1 -1
  861. package/dist/lib/utils/timeout.d.ts +1 -1
  862. package/dist/lib/utils/tokenEstimation.d.ts +1 -1
  863. package/dist/lib/utils/tokenUtils.d.ts +1 -2
  864. package/dist/lib/utils/toolCallRepair.d.ts +21 -0
  865. package/dist/lib/utils/toolCallRepair.js +298 -0
  866. package/dist/lib/utils/toolUtils.d.ts +1 -1
  867. package/dist/lib/utils/transformationUtils.d.ts +1 -1
  868. package/dist/lib/utils/ttsProcessor.d.ts +1 -69
  869. package/dist/lib/utils/ttsProcessor.js +1 -2
  870. package/dist/lib/workflow/LAYER-EXAMPLES.d.ts +1 -1
  871. package/dist/lib/workflow/config.d.ts +9 -9
  872. package/dist/lib/workflow/core/ensembleExecutor.d.ts +1 -2
  873. package/dist/lib/workflow/core/ensembleExecutor.js +1 -1
  874. package/dist/lib/workflow/core/judgeScorer.d.ts +2 -3
  875. package/dist/lib/workflow/core/judgeScorer.js +1 -1
  876. package/dist/lib/workflow/core/responseConditioner.d.ts +1 -2
  877. package/dist/lib/workflow/core/workflowRegistry.d.ts +1 -2
  878. package/dist/lib/workflow/core/workflowRunner.d.ts +3 -39
  879. package/dist/lib/workflow/index.d.ts +0 -15
  880. package/dist/lib/workflow/index.js +3 -8
  881. package/dist/lib/workflow/utils/workflowMetrics.d.ts +1 -3
  882. package/dist/lib/workflow/utils/workflowValidation.d.ts +1 -1
  883. package/dist/lib/workflow/workflows/adaptiveWorkflow.d.ts +1 -1
  884. package/dist/lib/workflow/workflows/consensusWorkflow.d.ts +1 -1
  885. package/dist/lib/workflow/workflows/fallbackWorkflow.d.ts +1 -1
  886. package/dist/lib/workflow/workflows/multiJudgeWorkflow.d.ts +1 -1
  887. package/dist/mcp/agentExposure.d.ts +1 -146
  888. package/dist/mcp/auth/oauthClientProvider.d.ts +1 -1
  889. package/dist/mcp/auth/tokenStorage.d.ts +1 -1
  890. package/dist/mcp/batching/index.d.ts +0 -10
  891. package/dist/mcp/batching/index.js +0 -9
  892. package/dist/mcp/batching/requestBatcher.d.ts +1 -73
  893. package/dist/mcp/caching/index.d.ts +0 -10
  894. package/dist/mcp/caching/index.js +0 -9
  895. package/dist/mcp/caching/toolCache.d.ts +6 -73
  896. package/dist/mcp/elicitation/elicitationManager.d.ts +1 -1
  897. package/dist/mcp/elicitation/index.d.ts +0 -10
  898. package/dist/mcp/elicitation/index.js +0 -9
  899. package/dist/mcp/elicitationProtocol.d.ts +1 -90
  900. package/dist/mcp/enhancedToolDiscovery.d.ts +2 -82
  901. package/dist/mcp/enhancedToolDiscovery.js +1 -1
  902. package/dist/mcp/externalServerManager.d.ts +1 -5
  903. package/dist/mcp/factory.d.ts +1 -1
  904. package/dist/mcp/flexibleToolValidator.d.ts +1 -1
  905. package/dist/mcp/httpRateLimiter.d.ts +6 -6
  906. package/dist/mcp/httpRateLimiter.js +1 -2
  907. package/dist/mcp/httpRetryHandler.d.ts +1 -1
  908. package/dist/mcp/httpRetryHandler.js +1 -2
  909. package/dist/mcp/index.d.ts +1 -15
  910. package/dist/mcp/index.js +7 -0
  911. package/dist/mcp/mcpCircuitBreaker.d.ts +2 -2
  912. package/dist/mcp/mcpCircuitBreaker.js +2 -2
  913. package/dist/mcp/mcpClientFactory.d.ts +1 -2
  914. package/dist/mcp/mcpClientFactory.js +2 -3
  915. package/dist/mcp/mcpOutputNormalizer.d.ts +1 -3
  916. package/dist/mcp/mcpOutputNormalizer.js +1 -0
  917. package/dist/mcp/mcpRegistryClient.d.ts +13 -216
  918. package/dist/mcp/mcpServerBase.d.ts +1 -66
  919. package/dist/mcp/mcpServerBase.js +3 -0
  920. package/dist/mcp/multiServerManager.d.ts +1 -116
  921. package/dist/mcp/registry.d.ts +1 -3
  922. package/dist/mcp/routing/index.d.ts +0 -10
  923. package/dist/mcp/routing/index.js +0 -9
  924. package/dist/mcp/routing/toolRouter.d.ts +1 -110
  925. package/dist/mcp/serverCapabilities.d.ts +1 -167
  926. package/dist/mcp/toolAnnotations.d.ts +1 -98
  927. package/dist/mcp/toolConverter.d.ts +1 -92
  928. package/dist/mcp/toolDiscoveryService.d.ts +1 -3
  929. package/dist/mcp/toolIntegration.d.ts +1 -45
  930. package/dist/mcp/toolRegistry.d.ts +1 -3
  931. package/dist/memory/hippocampusInitializer.d.ts +0 -3
  932. package/dist/memory/memoryRetrievalTools.d.ts +1 -1
  933. package/dist/memory/memoryRetrievalTools.js +1 -2
  934. package/dist/middleware/builtin/analytics.d.ts +1 -1
  935. package/dist/middleware/builtin/autoEvaluation.d.ts +1 -1
  936. package/dist/middleware/builtin/guardrails.d.ts +1 -2
  937. package/dist/middleware/builtin/lifecycle.d.ts +1 -1
  938. package/dist/middleware/factory.d.ts +1 -1
  939. package/dist/middleware/index.d.ts +0 -2
  940. package/dist/middleware/index.js +1 -0
  941. package/dist/middleware/registry.d.ts +1 -1
  942. package/dist/middleware/utils/guardrailsUtils.d.ts +1 -1
  943. package/dist/models/anthropicModels.d.ts +2 -2
  944. package/dist/models/anthropicModels.js +1 -1
  945. package/dist/models/modelRegistry.d.ts +1 -2
  946. package/dist/models/modelRegistry.js +1 -1
  947. package/dist/models/modelResolver.d.ts +1 -2
  948. package/dist/neurolink.d.ts +14 -29
  949. package/dist/neurolink.js +20 -6
  950. package/dist/observability/exporterRegistry.d.ts +1 -1
  951. package/dist/observability/exporters/arizeExporter.d.ts +1 -1
  952. package/dist/observability/exporters/baseExporter.d.ts +1 -1
  953. package/dist/observability/exporters/braintrustExporter.d.ts +1 -1
  954. package/dist/observability/exporters/datadogExporter.d.ts +1 -1
  955. package/dist/observability/exporters/datadogExporter.js +1 -1
  956. package/dist/observability/exporters/laminarExporter.d.ts +1 -1
  957. package/dist/observability/exporters/laminarExporter.js +1 -1
  958. package/dist/observability/exporters/langfuseExporter.d.ts +1 -1
  959. package/dist/observability/exporters/langfuseExporter.js +1 -1
  960. package/dist/observability/exporters/langsmithExporter.d.ts +1 -1
  961. package/dist/observability/exporters/otelExporter.d.ts +1 -1
  962. package/dist/observability/exporters/posthogExporter.d.ts +1 -1
  963. package/dist/observability/exporters/posthogExporter.js +1 -1
  964. package/dist/observability/exporters/sentryExporter.d.ts +1 -1
  965. package/dist/observability/exporters/sentryExporter.js +1 -1
  966. package/dist/observability/index.d.ts +6 -8
  967. package/dist/observability/index.js +1 -1
  968. package/dist/observability/metricsAggregator.d.ts +4 -108
  969. package/dist/observability/metricsAggregator.js +0 -4
  970. package/dist/observability/otelBridge.d.ts +2 -2
  971. package/dist/observability/otelBridge.js +1 -1
  972. package/dist/observability/retryPolicy.d.ts +1 -27
  973. package/dist/observability/sampling/index.d.ts +1 -1
  974. package/dist/observability/sampling/samplers.d.ts +1 -3
  975. package/dist/observability/sampling/samplers.js +1 -1
  976. package/dist/observability/spanProcessor.d.ts +1 -2
  977. package/dist/observability/tokenTracker.d.ts +3 -41
  978. package/dist/observability/utils/safeMetadata.d.ts +1 -1
  979. package/dist/observability/utils/spanSerializer.d.ts +1 -1
  980. package/dist/observability/utils/spanSerializer.js +1 -1
  981. package/dist/processors/archive/ArchiveProcessor.d.ts +3 -44
  982. package/dist/processors/archive/ArchiveProcessor.js +3 -0
  983. package/dist/processors/archive/index.d.ts +1 -1
  984. package/dist/processors/archive/index.js +1 -0
  985. package/dist/processors/base/BaseFileProcessor.d.ts +6 -6
  986. package/dist/processors/base/BaseFileProcessor.js +1 -1
  987. package/dist/processors/base/index.d.ts +1 -2
  988. package/dist/processors/base/index.js +4 -1
  989. package/dist/processors/cli/fileProcessorCli.d.ts +1 -40
  990. package/dist/processors/cli/fileProcessorCli.js +3 -0
  991. package/dist/processors/cli/index.d.ts +0 -1
  992. package/dist/processors/cli/index.js +3 -0
  993. package/dist/processors/code/ConfigProcessor.d.ts +2 -4
  994. package/dist/processors/code/ConfigProcessor.js +4 -0
  995. package/dist/processors/code/SourceCodeProcessor.d.ts +2 -4
  996. package/dist/processors/code/SourceCodeProcessor.js +4 -0
  997. package/dist/processors/code/index.d.ts +2 -2
  998. package/dist/processors/code/index.js +6 -2
  999. package/dist/processors/config/fileTypes.d.ts +0 -20
  1000. package/dist/processors/config/fileTypes.js +3 -0
  1001. package/dist/processors/config/index.d.ts +4 -4
  1002. package/dist/processors/config/index.js +10 -3
  1003. package/dist/processors/config/languageMap.d.ts +0 -4
  1004. package/dist/processors/config/languageMap.js +3 -0
  1005. package/dist/processors/config/mimeTypes.d.ts +0 -18
  1006. package/dist/processors/config/mimeTypes.js +3 -0
  1007. package/dist/processors/config/sizeLimits.d.ts +0 -8
  1008. package/dist/processors/config/sizeLimits.js +3 -0
  1009. package/dist/processors/data/JsonProcessor.d.ts +2 -4
  1010. package/dist/processors/data/JsonProcessor.js +2 -0
  1011. package/dist/processors/data/XmlProcessor.d.ts +3 -5
  1012. package/dist/processors/data/XmlProcessor.js +4 -0
  1013. package/dist/processors/data/YamlProcessor.d.ts +3 -5
  1014. package/dist/processors/data/YamlProcessor.js +2 -0
  1015. package/dist/processors/data/index.d.ts +3 -3
  1016. package/dist/processors/data/index.js +9 -3
  1017. package/dist/processors/document/ExcelProcessor.d.ts +3 -5
  1018. package/dist/processors/document/ExcelProcessor.js +2 -0
  1019. package/dist/processors/document/OpenDocumentProcessor.d.ts +2 -4
  1020. package/dist/processors/document/OpenDocumentProcessor.js +1 -0
  1021. package/dist/processors/document/RtfProcessor.d.ts +2 -4
  1022. package/dist/processors/document/RtfProcessor.js +2 -0
  1023. package/dist/processors/document/WordProcessor.d.ts +3 -5
  1024. package/dist/processors/document/WordProcessor.js +2 -0
  1025. package/dist/processors/document/index.d.ts +4 -4
  1026. package/dist/processors/document/index.js +4 -1
  1027. package/dist/processors/errors/FileErrorCode.d.ts +3 -15
  1028. package/dist/processors/errors/errorHelpers.d.ts +2 -2
  1029. package/dist/processors/errors/errorHelpers.js +1 -1
  1030. package/dist/processors/errors/errorSerializer.d.ts +3 -2
  1031. package/dist/processors/errors/index.d.ts +3 -3
  1032. package/dist/processors/index.d.ts +7 -10
  1033. package/dist/processors/index.js +11 -2
  1034. package/dist/processors/integration/FileProcessorIntegration.d.ts +2 -70
  1035. package/dist/processors/integration/FileProcessorIntegration.js +6 -0
  1036. package/dist/processors/integration/index.d.ts +0 -1
  1037. package/dist/processors/integration/index.js +3 -0
  1038. package/dist/processors/markup/HtmlProcessor.d.ts +2 -4
  1039. package/dist/processors/markup/HtmlProcessor.js +2 -0
  1040. package/dist/processors/markup/MarkdownProcessor.d.ts +2 -4
  1041. package/dist/processors/markup/MarkdownProcessor.js +4 -0
  1042. package/dist/processors/markup/SvgProcessor.d.ts +2 -4
  1043. package/dist/processors/markup/SvgProcessor.js +4 -0
  1044. package/dist/processors/markup/TextProcessor.d.ts +2 -4
  1045. package/dist/processors/markup/TextProcessor.js +2 -0
  1046. package/dist/processors/markup/index.d.ts +4 -4
  1047. package/dist/processors/markup/index.js +12 -4
  1048. package/dist/processors/media/AudioProcessor.d.ts +3 -64
  1049. package/dist/processors/media/AudioProcessor.js +3 -0
  1050. package/dist/processors/media/VideoProcessor.d.ts +3 -48
  1051. package/dist/processors/media/VideoProcessor.js +3 -0
  1052. package/dist/processors/media/index.d.ts +0 -1
  1053. package/dist/processors/media/index.js +3 -0
  1054. package/dist/processors/registry/ProcessorRegistry.d.ts +2 -3
  1055. package/dist/processors/registry/ProcessorRegistry.js +1 -1
  1056. package/dist/processors/registry/index.d.ts +1 -11
  1057. package/dist/processors/registry/index.js +2 -9
  1058. package/dist/providers/amazonBedrock.d.ts +1 -2
  1059. package/dist/providers/amazonBedrock.js +1 -1
  1060. package/dist/providers/amazonSagemaker.d.ts +1 -1
  1061. package/dist/providers/anthropic.d.ts +1 -6
  1062. package/dist/providers/anthropic.js +4 -1
  1063. package/dist/providers/anthropicBaseProvider.d.ts +1 -1
  1064. package/dist/providers/anthropicBaseProvider.js +2 -1
  1065. package/dist/providers/azureOpenai.d.ts +1 -2
  1066. package/dist/providers/azureOpenai.js +1 -0
  1067. package/dist/providers/googleAiStudio.d.ts +1 -3
  1068. package/dist/providers/googleAiStudio.js +4 -2
  1069. package/dist/providers/googleNativeGemini3.d.ts +1 -2
  1070. package/dist/providers/googleVertex.d.ts +1 -3
  1071. package/dist/providers/googleVertex.js +4 -3
  1072. package/dist/providers/huggingFace.d.ts +1 -2
  1073. package/dist/providers/huggingFace.js +1 -0
  1074. package/dist/providers/litellm.d.ts +1 -1
  1075. package/dist/providers/litellm.js +4 -2
  1076. package/dist/providers/mistral.d.ts +1 -3
  1077. package/dist/providers/mistral.js +1 -0
  1078. package/dist/providers/ollama.d.ts +1 -2
  1079. package/dist/providers/ollama.js +1 -1
  1080. package/dist/providers/openAI.d.ts +1 -2
  1081. package/dist/providers/openAI.js +2 -1
  1082. package/dist/providers/openRouter.d.ts +1 -1
  1083. package/dist/providers/openRouter.js +1 -0
  1084. package/dist/providers/openaiCompatible.d.ts +1 -2
  1085. package/dist/providers/openaiCompatible.js +1 -0
  1086. package/dist/providers/providerTypeUtils.d.ts +1 -1
  1087. package/dist/providers/sagemaker/adaptive-semaphore.d.ts +1 -1
  1088. package/dist/providers/sagemaker/client.d.ts +1 -2
  1089. package/dist/providers/sagemaker/config.d.ts +1 -1
  1090. package/dist/providers/sagemaker/detection.d.ts +4 -27
  1091. package/dist/providers/sagemaker/diagnostics.d.ts +3 -2
  1092. package/dist/providers/sagemaker/errors.d.ts +1 -1
  1093. package/dist/providers/sagemaker/index.d.ts +0 -1
  1094. package/dist/providers/sagemaker/index.js +1 -0
  1095. package/dist/providers/sagemaker/language-model.d.ts +3 -4
  1096. package/dist/providers/sagemaker/parsers.d.ts +1 -26
  1097. package/dist/providers/sagemaker/streaming.d.ts +1 -1
  1098. package/dist/providers/sagemaker/streaming.js +1 -1
  1099. package/dist/providers/sagemaker/structured-parser.d.ts +1 -1
  1100. package/dist/providers/sagemaker/structured-parser.js +1 -1
  1101. package/dist/proxy/cloaking/index.d.ts +0 -1
  1102. package/dist/proxy/cloaking/index.js +1 -0
  1103. package/dist/proxy/proxyEnv.d.ts +3 -3
  1104. package/dist/proxy/proxyPaths.d.ts +1 -10
  1105. package/dist/proxy/proxyTracer.d.ts +0 -1
  1106. package/dist/proxy/quietDetector.d.ts +3 -2
  1107. package/dist/proxy/rawStreamCapture.d.ts +3 -2
  1108. package/dist/proxy/sseInterceptor.d.ts +5 -4
  1109. package/dist/proxy/updateChecker.d.ts +3 -2
  1110. package/dist/proxy/updateState.d.ts +5 -4
  1111. package/dist/rag/ChunkerFactory.d.ts +1 -1
  1112. package/dist/rag/ChunkerRegistry.d.ts +1 -1
  1113. package/dist/rag/chunkers/BaseChunker.d.ts +1 -1
  1114. package/dist/rag/chunkers/CharacterChunker.d.ts +1 -1
  1115. package/dist/rag/chunkers/HTMLChunker.d.ts +1 -1
  1116. package/dist/rag/chunkers/JSONChunker.d.ts +1 -1
  1117. package/dist/rag/chunkers/LaTeXChunker.d.ts +1 -1
  1118. package/dist/rag/chunkers/MarkdownChunker.d.ts +1 -1
  1119. package/dist/rag/chunkers/RecursiveChunker.d.ts +1 -1
  1120. package/dist/rag/chunkers/SemanticMarkdownChunker.d.ts +1 -1
  1121. package/dist/rag/chunkers/SentenceChunker.d.ts +1 -1
  1122. package/dist/rag/chunkers/TokenChunker.d.ts +1 -1
  1123. package/dist/rag/chunking/characterChunker.d.ts +1 -1
  1124. package/dist/rag/chunking/chunkerRegistry.d.ts +2 -2
  1125. package/dist/rag/chunking/htmlChunker.d.ts +1 -1
  1126. package/dist/rag/chunking/jsonChunker.d.ts +1 -1
  1127. package/dist/rag/chunking/latexChunker.d.ts +1 -1
  1128. package/dist/rag/chunking/markdownChunker.d.ts +1 -1
  1129. package/dist/rag/chunking/recursiveChunker.d.ts +1 -1
  1130. package/dist/rag/chunking/semanticChunker.d.ts +1 -1
  1131. package/dist/rag/chunking/sentenceChunker.d.ts +1 -1
  1132. package/dist/rag/chunking/tokenChunker.d.ts +1 -1
  1133. package/dist/rag/document/MDocument.d.ts +1 -1
  1134. package/dist/rag/document/index.d.ts +1 -1
  1135. package/dist/rag/document/loaders.d.ts +1 -6
  1136. package/dist/rag/errors/RAGError.d.ts +2 -1
  1137. package/dist/rag/errors/index.d.ts +1 -1
  1138. package/dist/rag/graphRag/graphRAG.d.ts +1 -1
  1139. package/dist/rag/index.d.ts +8 -8
  1140. package/dist/rag/index.js +1 -1
  1141. package/dist/rag/metadata/MetadataExtractorFactory.d.ts +1 -5
  1142. package/dist/rag/metadata/MetadataExtractorRegistry.d.ts +1 -1
  1143. package/dist/rag/metadata/index.d.ts +1 -1
  1144. package/dist/rag/metadata/metadataExtractor.d.ts +1 -1
  1145. package/dist/rag/pipeline/RAGPipeline.d.ts +1 -8
  1146. package/dist/rag/pipeline/RAGPipeline.js +1 -1
  1147. package/dist/rag/pipeline/contextAssembly.d.ts +1 -5
  1148. package/dist/rag/pipeline/index.d.ts +2 -2
  1149. package/dist/rag/pipeline/index.js +1 -1
  1150. package/dist/rag/ragIntegration.d.ts +1 -3
  1151. package/dist/rag/reranker/RerankerFactory.d.ts +1 -6
  1152. package/dist/rag/reranker/RerankerFactory.js +2 -2
  1153. package/dist/rag/reranker/RerankerRegistry.d.ts +1 -1
  1154. package/dist/rag/reranker/index.d.ts +1 -1
  1155. package/dist/rag/reranker/reranker.d.ts +1 -2
  1156. package/dist/rag/resilience/CircuitBreaker.d.ts +0 -4
  1157. package/dist/rag/resilience/RetryHandler.d.ts +1 -2
  1158. package/dist/rag/resilience/index.d.ts +2 -2
  1159. package/dist/rag/retrieval/hybridSearch.d.ts +1 -4
  1160. package/dist/rag/retrieval/hybridSearch.js +5 -1
  1161. package/dist/rag/retrieval/index.d.ts +2 -2
  1162. package/dist/rag/retrieval/vectorQueryTool.d.ts +1 -3
  1163. package/dist/rag/retrieval/vectorQueryTool.js +5 -1
  1164. package/dist/sdk/toolRegistration.d.ts +3 -5
  1165. package/dist/server/abstract/baseServerAdapter.d.ts +1 -1
  1166. package/dist/server/abstract/baseServerAdapter.js +1 -2
  1167. package/dist/server/adapters/expressAdapter.d.ts +1 -1
  1168. package/dist/server/adapters/fastifyAdapter.d.ts +1 -1
  1169. package/dist/server/adapters/honoAdapter.d.ts +1 -1
  1170. package/dist/server/adapters/koaAdapter.d.ts +1 -1
  1171. package/dist/server/errors.d.ts +1 -1
  1172. package/dist/server/errors.js +1 -1
  1173. package/dist/server/factory/serverAdapterFactory.d.ts +1 -1
  1174. package/dist/server/index.d.ts +10 -12
  1175. package/dist/server/index.js +14 -3
  1176. package/dist/server/middleware/abortSignal.d.ts +3 -2
  1177. package/dist/server/middleware/auth.d.ts +7 -49
  1178. package/dist/server/middleware/auth.js +3 -0
  1179. package/dist/server/middleware/cache.d.ts +3 -54
  1180. package/dist/server/middleware/cache.js +6 -0
  1181. package/dist/server/middleware/common.d.ts +1 -1
  1182. package/dist/server/middleware/common.js +1 -2
  1183. package/dist/server/middleware/deprecation.d.ts +3 -2
  1184. package/dist/server/middleware/index.d.ts +6 -6
  1185. package/dist/server/middleware/index.js +3 -3
  1186. package/dist/server/middleware/mcpBodyAttachment.d.ts +1 -1
  1187. package/dist/server/middleware/rateLimit.d.ts +5 -5
  1188. package/dist/server/middleware/validation.d.ts +6 -6
  1189. package/dist/server/openapi/generator.d.ts +4 -4
  1190. package/dist/server/openapi/index.d.ts +1 -1
  1191. package/dist/server/openapi/schemas.d.ts +1 -1
  1192. package/dist/server/openapi/templates.d.ts +1 -1
  1193. package/dist/server/routes/agentRoutes.d.ts +1 -1
  1194. package/dist/server/routes/claudeProxyRoutes.d.ts +1 -2
  1195. package/dist/server/routes/healthRoutes.d.ts +1 -1
  1196. package/dist/server/routes/index.d.ts +2 -2
  1197. package/dist/server/routes/mcpRoutes.d.ts +1 -1
  1198. package/dist/server/routes/memoryRoutes.d.ts +1 -1
  1199. package/dist/server/routes/openApiRoutes.d.ts +1 -1
  1200. package/dist/server/routes/toolRoutes.d.ts +1 -1
  1201. package/dist/server/streaming/dataStream.d.ts +5 -99
  1202. package/dist/server/streaming/index.d.ts +1 -1
  1203. package/dist/server/streaming/index.js +6 -1
  1204. package/dist/server/utils/redaction.d.ts +1 -8
  1205. package/dist/server/utils/redaction.js +0 -6
  1206. package/dist/server/utils/validation.d.ts +4 -30
  1207. package/dist/server/utils/validation.js +3 -0
  1208. package/dist/server/voice/frameBus.d.ts +1 -1
  1209. package/dist/server/voice/voiceWebSocketHandler.d.ts +0 -4
  1210. package/dist/server/websocket/WebSocketHandler.d.ts +1 -1
  1211. package/dist/services/server/ai/observability/instrumentation.d.ts +1 -63
  1212. package/dist/session/globalSessionState.d.ts +1 -1
  1213. package/dist/tasks/autoresearchTaskExecutor.d.ts +1 -2
  1214. package/dist/tasks/backends/bullmqBackend.d.ts +1 -1
  1215. package/dist/tasks/backends/bullmqBackend.js +1 -1
  1216. package/dist/tasks/backends/nodeTimeoutBackend.d.ts +1 -1
  1217. package/dist/tasks/backends/nodeTimeoutBackend.js +1 -1
  1218. package/dist/tasks/backends/taskBackendRegistry.d.ts +1 -1
  1219. package/dist/tasks/store/fileTaskStore.d.ts +1 -1
  1220. package/dist/tasks/store/fileTaskStore.js +1 -1
  1221. package/dist/tasks/store/redisTaskStore.d.ts +1 -1
  1222. package/dist/tasks/store/redisTaskStore.js +1 -1
  1223. package/dist/tasks/taskExecutor.d.ts +1 -2
  1224. package/dist/tasks/taskManager.d.ts +1 -1
  1225. package/dist/tasks/taskManager.js +1 -1
  1226. package/dist/tasks/tools/taskTools.d.ts +3 -3
  1227. package/dist/telemetry/index.d.ts +2 -2
  1228. package/dist/telemetry/telemetryService.d.ts +1 -8
  1229. package/dist/telemetry/withSpan.d.ts +2 -7
  1230. package/dist/telemetry/withSpan.js +1 -1
  1231. package/dist/types/{typeAliases.d.ts → aliases.d.ts} +1 -32
  1232. package/dist/{lib/types/artifactTypes.d.ts → types/artifact.d.ts} +2 -2
  1233. package/dist/{lib/types/authTypes.d.ts → types/auth.d.ts} +43 -2
  1234. package/dist/{lib/types/autoresearchTypes.d.ts → types/autoresearch.d.ts} +1 -1
  1235. package/dist/types/circuitBreakerErrors.d.ts +1 -1
  1236. package/dist/types/cli.d.ts +60 -12
  1237. package/dist/types/cli.js +1 -1
  1238. package/dist/{lib/types/clientTypes.d.ts → types/client.d.ts} +292 -107
  1239. package/dist/types/common.d.ts +135 -2
  1240. package/dist/{lib/types/configTypes.d.ts → types/config.d.ts} +8 -9
  1241. package/dist/types/conversation.d.ts +6 -4
  1242. package/dist/{mcp/elicitation/types.d.ts → types/elicitation.d.ts} +1 -1
  1243. package/dist/types/enums.d.ts +9 -0
  1244. package/dist/types/enums.js +9 -0
  1245. package/dist/types/evaluation.d.ts +200 -1
  1246. package/dist/types/evaluation.js +1 -1
  1247. package/dist/types/externalMcp.d.ts +4 -4
  1248. package/dist/types/{fileReferenceTypes.d.ts → fileReference.d.ts} +13 -1
  1249. package/dist/{files/types.js → types/fileReference.js} +2 -4
  1250. package/dist/types/{generateTypes.d.ts → generate.d.ts} +13 -11
  1251. package/dist/{lib/image-gen/types.d.ts → types/imageGen.d.ts} +18 -0
  1252. package/dist/types/index.d.ts +50 -47
  1253. package/dist/types/index.js +52 -57
  1254. package/dist/types/mcp.d.ts +2035 -0
  1255. package/dist/types/{middlewareTypes.d.ts → middleware.d.ts} +1 -2
  1256. package/dist/types/{modelTypes.d.ts → model.d.ts} +1 -1
  1257. package/dist/types/observability.d.ts +216 -4
  1258. package/dist/{lib/types/pptTypes.d.ts → types/ppt.d.ts} +0 -28
  1259. package/dist/types/ppt.js +36 -0
  1260. package/dist/{processors/base/types.d.ts → types/processor.d.ts} +233 -7
  1261. package/dist/{processors/base/types.js → types/processor.js} +8 -0
  1262. package/dist/types/providers.d.ts +9 -8
  1263. package/dist/types/{proxyTypes.d.ts → proxy.d.ts} +16 -4
  1264. package/dist/{rag/types.d.ts → types/rag.d.ts} +604 -32
  1265. package/dist/{lib/types/scorerTypes.d.ts → types/scorer.d.ts} +2 -2
  1266. package/dist/types/{sdkTypes.d.ts → sdk.d.ts} +9 -9
  1267. package/dist/{lib/types/serverTypes.d.ts → types/server.d.ts} +156 -2
  1268. package/dist/{lib/types/streamTypes.d.ts → types/stream.d.ts} +25 -36
  1269. package/dist/types/{subscriptionTypes.d.ts → subscription.d.ts} +34 -56
  1270. package/dist/types/{taskTypes.d.ts → task.d.ts} +6 -6
  1271. package/dist/types/tools.d.ts +6 -4
  1272. package/dist/types/universalProviderOptions.d.ts +1 -1
  1273. package/dist/types/utilities.d.ts +1 -1
  1274. package/dist/types/{workflowTypes.d.ts → workflow.d.ts} +23 -1
  1275. package/dist/types/{workflowTypes.js → workflow.js} +0 -8
  1276. package/dist/utils/async/index.d.ts +1 -1
  1277. package/dist/utils/async/retry.d.ts +2 -1
  1278. package/dist/utils/conversationMemory.d.ts +1 -2
  1279. package/dist/utils/csvProcessor.d.ts +1 -1
  1280. package/dist/utils/errorHandling.d.ts +1 -1
  1281. package/dist/utils/errorHandling.js +1 -1
  1282. package/dist/utils/evaluationUtils.d.ts +1 -1
  1283. package/dist/utils/factoryProcessing.d.ts +1 -5
  1284. package/dist/utils/fileDetector.d.ts +1 -1
  1285. package/dist/utils/imageCache.d.ts +1 -1
  1286. package/dist/utils/imageCompressor.d.ts +5 -5
  1287. package/dist/utils/imageProcessor.d.ts +1 -2
  1288. package/dist/utils/json/extract.d.ts +1 -2
  1289. package/dist/utils/logger.d.ts +1 -1
  1290. package/dist/utils/loopUtils.d.ts +1 -2
  1291. package/dist/utils/mcpDefaults.d.ts +1 -1
  1292. package/dist/utils/messageBuilder.d.ts +1 -4
  1293. package/dist/utils/messageBuilder.js +1 -1
  1294. package/dist/utils/modelAliasResolver.d.ts +1 -1
  1295. package/dist/utils/modelRouter.d.ts +1 -1
  1296. package/dist/utils/multimodalOptionsBuilder.d.ts +1 -1
  1297. package/dist/utils/observabilityHelpers.d.ts +1 -1
  1298. package/dist/utils/optionsConversion.d.ts +1 -3
  1299. package/dist/utils/optionsUtils.d.ts +1 -3
  1300. package/dist/utils/optionsUtils.js +1 -1
  1301. package/dist/utils/parameterValidation.d.ts +1 -5
  1302. package/dist/utils/performance.d.ts +1 -1
  1303. package/dist/utils/pricing.d.ts +1 -1
  1304. package/dist/utils/promptRedaction.d.ts +1 -1
  1305. package/dist/utils/providerConfig.d.ts +1 -4
  1306. package/dist/utils/providerConfig.js +1 -0
  1307. package/dist/utils/providerHealth.d.ts +1 -1
  1308. package/dist/utils/providerUtils.d.ts +2 -3
  1309. package/dist/utils/rateLimiter.d.ts +1 -1
  1310. package/dist/utils/redis.d.ts +1 -1
  1311. package/dist/utils/retryHandler.d.ts +1 -1
  1312. package/dist/utils/sanitizers/index.d.ts +0 -2
  1313. package/dist/utils/schemaConversion.d.ts +1 -1
  1314. package/dist/utils/taskClassificationUtils.d.ts +1 -1
  1315. package/dist/utils/taskClassifier.d.ts +1 -1
  1316. package/dist/utils/thinkingConfig.d.ts +1 -1
  1317. package/dist/utils/timeout.d.ts +1 -1
  1318. package/dist/utils/tokenEstimation.d.ts +1 -1
  1319. package/dist/utils/tokenUtils.d.ts +1 -2
  1320. package/dist/utils/toolCallRepair.d.ts +21 -0
  1321. package/dist/utils/toolCallRepair.js +297 -0
  1322. package/dist/utils/toolUtils.d.ts +1 -1
  1323. package/dist/utils/transformationUtils.d.ts +1 -1
  1324. package/dist/utils/ttsProcessor.d.ts +1 -69
  1325. package/dist/utils/ttsProcessor.js +1 -2
  1326. package/dist/workflow/LAYER-EXAMPLES.d.ts +1 -1
  1327. package/dist/workflow/config.d.ts +12 -12
  1328. package/dist/workflow/core/ensembleExecutor.d.ts +1 -2
  1329. package/dist/workflow/core/ensembleExecutor.js +1 -1
  1330. package/dist/workflow/core/judgeScorer.d.ts +2 -3
  1331. package/dist/workflow/core/judgeScorer.js +1 -1
  1332. package/dist/workflow/core/responseConditioner.d.ts +1 -2
  1333. package/dist/workflow/core/workflowRegistry.d.ts +1 -2
  1334. package/dist/workflow/core/workflowRunner.d.ts +3 -39
  1335. package/dist/workflow/index.d.ts +0 -15
  1336. package/dist/workflow/index.js +3 -8
  1337. package/dist/workflow/utils/workflowMetrics.d.ts +1 -3
  1338. package/dist/workflow/utils/workflowValidation.d.ts +1 -1
  1339. package/dist/workflow/workflows/adaptiveWorkflow.d.ts +1 -1
  1340. package/dist/workflow/workflows/consensusWorkflow.d.ts +1 -1
  1341. package/dist/workflow/workflows/fallbackWorkflow.d.ts +1 -1
  1342. package/dist/workflow/workflows/multiJudgeWorkflow.d.ts +1 -1
  1343. package/package.json +6 -6
  1344. package/dist/features/ppt/types.d.ts +0 -9
  1345. package/dist/features/ppt/types.js +0 -13
  1346. package/dist/files/types.d.ts +0 -23
  1347. package/dist/lib/features/ppt/types.d.ts +0 -9
  1348. package/dist/lib/features/ppt/types.js +0 -14
  1349. package/dist/lib/files/types.d.ts +0 -23
  1350. package/dist/lib/observability/types/index.d.ts +0 -6
  1351. package/dist/lib/observability/types/index.js +0 -5
  1352. package/dist/lib/processors/registry/types.d.ts +0 -53
  1353. package/dist/lib/processors/registry/types.js +0 -11
  1354. package/dist/lib/proxy/cloaking/types.d.ts +0 -1
  1355. package/dist/lib/proxy/cloaking/types.js +0 -2
  1356. package/dist/lib/rag/types.js +0 -9
  1357. package/dist/lib/server/types.d.ts +0 -6
  1358. package/dist/lib/server/types.js +0 -7
  1359. package/dist/lib/server/voice/types.d.ts +0 -20
  1360. package/dist/lib/server/voice/types.js +0 -2
  1361. package/dist/lib/types/evaluationTypes.d.ts +0 -142
  1362. package/dist/lib/types/evaluationTypes.js +0 -2
  1363. package/dist/lib/types/fileReferenceTypes.js +0 -9
  1364. package/dist/lib/types/generateTypes.js +0 -2
  1365. package/dist/lib/types/mcpTypes.d.ts +0 -787
  1366. package/dist/lib/types/middlewareTypes.js +0 -2
  1367. package/dist/lib/types/pptTypes.js +0 -83
  1368. package/dist/lib/types/processorTypes.d.ts +0 -597
  1369. package/dist/lib/types/processorTypes.js +0 -91
  1370. package/dist/lib/types/ragTypes.d.ts +0 -606
  1371. package/dist/lib/types/streamTypes.js +0 -2
  1372. package/dist/lib/workflow/core/types/conditionerTypes.d.ts +0 -7
  1373. package/dist/lib/workflow/core/types/conditionerTypes.js +0 -8
  1374. package/dist/lib/workflow/core/types/ensembleTypes.d.ts +0 -7
  1375. package/dist/lib/workflow/core/types/ensembleTypes.js +0 -8
  1376. package/dist/lib/workflow/core/types/index.d.ts +0 -7
  1377. package/dist/lib/workflow/core/types/index.js +0 -8
  1378. package/dist/lib/workflow/core/types/judgeTypes.d.ts +0 -7
  1379. package/dist/lib/workflow/core/types/judgeTypes.js +0 -8
  1380. package/dist/lib/workflow/core/types/layerTypes.d.ts +0 -7
  1381. package/dist/lib/workflow/core/types/layerTypes.js +0 -8
  1382. package/dist/lib/workflow/core/types/registryTypes.d.ts +0 -7
  1383. package/dist/lib/workflow/core/types/registryTypes.js +0 -8
  1384. package/dist/lib/workflow/types.d.ts +0 -19
  1385. package/dist/lib/workflow/types.js +0 -10
  1386. package/dist/lib/workflow/utils/types/index.d.ts +0 -7
  1387. package/dist/lib/workflow/utils/types/index.js +0 -8
  1388. package/dist/lib/workflow/utils/types/metricsTypes.d.ts +0 -7
  1389. package/dist/lib/workflow/utils/types/metricsTypes.js +0 -8
  1390. package/dist/lib/workflow/utils/types/validationTypes.d.ts +0 -7
  1391. package/dist/lib/workflow/utils/types/validationTypes.js +0 -8
  1392. package/dist/observability/types/index.d.ts +0 -6
  1393. package/dist/observability/types/index.js +0 -4
  1394. package/dist/processors/registry/types.d.ts +0 -53
  1395. package/dist/processors/registry/types.js +0 -10
  1396. package/dist/proxy/cloaking/types.d.ts +0 -1
  1397. package/dist/rag/types.js +0 -8
  1398. package/dist/server/types.d.ts +0 -6
  1399. package/dist/server/types.js +0 -6
  1400. package/dist/server/voice/types.d.ts +0 -20
  1401. package/dist/types/evaluationTypes.d.ts +0 -142
  1402. package/dist/types/fileReferenceTypes.js +0 -8
  1403. package/dist/types/generateTypes.js +0 -1
  1404. package/dist/types/mcpTypes.d.ts +0 -787
  1405. package/dist/types/middlewareTypes.js +0 -1
  1406. package/dist/types/pptTypes.js +0 -82
  1407. package/dist/types/processorTypes.d.ts +0 -597
  1408. package/dist/types/processorTypes.js +0 -90
  1409. package/dist/types/ragTypes.d.ts +0 -606
  1410. package/dist/types/streamTypes.js +0 -1
  1411. package/dist/workflow/core/types/conditionerTypes.d.ts +0 -7
  1412. package/dist/workflow/core/types/conditionerTypes.js +0 -7
  1413. package/dist/workflow/core/types/ensembleTypes.d.ts +0 -7
  1414. package/dist/workflow/core/types/ensembleTypes.js +0 -7
  1415. package/dist/workflow/core/types/index.d.ts +0 -7
  1416. package/dist/workflow/core/types/index.js +0 -7
  1417. package/dist/workflow/core/types/judgeTypes.d.ts +0 -7
  1418. package/dist/workflow/core/types/judgeTypes.js +0 -7
  1419. package/dist/workflow/core/types/layerTypes.d.ts +0 -7
  1420. package/dist/workflow/core/types/layerTypes.js +0 -7
  1421. package/dist/workflow/core/types/registryTypes.d.ts +0 -7
  1422. package/dist/workflow/core/types/registryTypes.js +0 -7
  1423. package/dist/workflow/types.d.ts +0 -19
  1424. package/dist/workflow/types.js +0 -9
  1425. package/dist/workflow/utils/types/index.d.ts +0 -7
  1426. package/dist/workflow/utils/types/index.js +0 -7
  1427. package/dist/workflow/utils/types/metricsTypes.d.ts +0 -7
  1428. package/dist/workflow/utils/types/metricsTypes.js +0 -7
  1429. package/dist/workflow/utils/types/validationTypes.d.ts +0 -7
  1430. package/dist/workflow/utils/types/validationTypes.js +0 -7
  1431. /package/dist/lib/types/{actionTypes.d.ts → action.d.ts} +0 -0
  1432. /package/dist/lib/types/{contextTypes.d.ts → context.d.ts} +0 -0
  1433. /package/dist/lib/types/{domainTypes.d.ts → domain.d.ts} +0 -0
  1434. /package/dist/lib/{observability/types/exporterTypes.d.ts → types/exporter.d.ts} +0 -0
  1435. /package/dist/lib/types/{fileTypes.d.ts → file.d.ts} +0 -0
  1436. /package/dist/lib/types/{groundingTypes.d.ts → grounding.d.ts} +0 -0
  1437. /package/dist/lib/types/{hitlTypes.d.ts → hitl.d.ts} +0 -0
  1438. /package/dist/lib/types/{mcpOutputTypes.d.ts → mcpOutput.d.ts} +0 -0
  1439. /package/dist/lib/types/{serviceTypes.d.ts → service.d.ts} +0 -0
  1440. /package/dist/lib/{observability/types/spanTypes.d.ts → types/span.d.ts} +0 -0
  1441. /package/dist/lib/types/{taskClassificationTypes.d.ts → taskClassification.d.ts} +0 -0
  1442. /package/dist/lib/types/{ttsTypes.d.ts → tts.d.ts} +0 -0
  1443. /package/dist/types/{actionTypes.d.ts → action.d.ts} +0 -0
  1444. /package/dist/types/{actionTypes.js → action.js} +0 -0
  1445. /package/dist/types/{typeAliases.js → aliases.js} +0 -0
  1446. /package/dist/types/{artifactTypes.js → artifact.js} +0 -0
  1447. /package/dist/types/{authTypes.js → auth.js} +0 -0
  1448. /package/dist/types/{autoresearchTypes.js → autoresearch.js} +0 -0
  1449. /package/dist/types/{clientTypes.js → client.js} +0 -0
  1450. /package/dist/types/{configTypes.js → config.js} +0 -0
  1451. /package/dist/types/{contextTypes.d.ts → context.d.ts} +0 -0
  1452. /package/dist/types/{contextTypes.js → context.js} +0 -0
  1453. /package/dist/types/{domainTypes.d.ts → domain.d.ts} +0 -0
  1454. /package/dist/types/{domainTypes.js → domain.js} +0 -0
  1455. /package/dist/{mcp/elicitation/types.js → types/elicitation.js} +0 -0
  1456. /package/dist/{observability/types/exporterTypes.d.ts → types/exporter.d.ts} +0 -0
  1457. /package/dist/{observability/types/exporterTypes.js → types/exporter.js} +0 -0
  1458. /package/dist/types/{fileTypes.d.ts → file.d.ts} +0 -0
  1459. /package/dist/types/{fileTypes.js → file.js} +0 -0
  1460. /package/dist/{proxy/cloaking/types.js → types/generate.js} +0 -0
  1461. /package/dist/types/{groundingTypes.d.ts → grounding.d.ts} +0 -0
  1462. /package/dist/types/{groundingTypes.js → grounding.js} +0 -0
  1463. /package/dist/types/{hitlTypes.d.ts → hitl.d.ts} +0 -0
  1464. /package/dist/types/{hitlTypes.js → hitl.js} +0 -0
  1465. /package/dist/{image-gen/types.js → types/imageGen.js} +0 -0
  1466. /package/dist/types/{mcpTypes.js → mcp.js} +0 -0
  1467. /package/dist/types/{mcpOutputTypes.d.ts → mcpOutput.d.ts} +0 -0
  1468. /package/dist/types/{mcpOutputTypes.js → mcpOutput.js} +0 -0
  1469. /package/dist/{server/voice/types.js → types/middleware.js} +0 -0
  1470. /package/dist/types/{modelTypes.js → model.js} +0 -0
  1471. /package/dist/types/{proxyTypes.js → proxy.js} +0 -0
  1472. /package/dist/types/{ragTypes.js → rag.js} +0 -0
  1473. /package/dist/types/{scorerTypes.js → scorer.js} +0 -0
  1474. /package/dist/types/{sdkTypes.js → sdk.js} +0 -0
  1475. /package/dist/types/{serverTypes.js → server.js} +0 -0
  1476. /package/dist/types/{serviceTypes.d.ts → service.d.ts} +0 -0
  1477. /package/dist/types/{serviceTypes.js → service.js} +0 -0
  1478. /package/dist/{observability/types/spanTypes.d.ts → types/span.d.ts} +0 -0
  1479. /package/dist/{observability/types/spanTypes.js → types/span.js} +0 -0
  1480. /package/dist/types/{evaluationTypes.js → stream.js} +0 -0
  1481. /package/dist/types/{subscriptionTypes.js → subscription.js} +0 -0
  1482. /package/dist/types/{taskTypes.js → task.js} +0 -0
  1483. /package/dist/types/{taskClassificationTypes.d.ts → taskClassification.d.ts} +0 -0
  1484. /package/dist/types/{taskClassificationTypes.js → taskClassification.js} +0 -0
  1485. /package/dist/types/{ttsTypes.d.ts → tts.d.ts} +0 -0
  1486. /package/dist/types/{ttsTypes.js → tts.js} +0 -0
@@ -11,7 +11,7 @@
11
11
  * - Mistral/Codestral: 1.26x
12
12
  * - OpenAI/GPT: 1.0x (baseline)
13
13
  */
14
- import type { ChatMessage } from "../types/conversation.js";
14
+ import type { ChatMessage } from "../types/index.js";
15
15
  /** Characters per token for English text */
16
16
  export declare const CHARS_PER_TOKEN = 4;
17
17
  /** Characters per token for code */
@@ -7,8 +7,7 @@
7
7
  * - analytics.ts
8
8
  * - streamAnalytics.ts
9
9
  */
10
- import type { TokenUsage } from "../types/analytics.js";
11
- import type { RawUsageObject, TokenExtractionOptions } from "../types/index.js";
10
+ import type { TokenUsage, RawUsageObject, TokenExtractionOptions } from "../types/index.js";
12
11
  /**
13
12
  * Extract input token count from various provider formats
14
13
  * Priority: input > inputTokens > promptTokens
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Schema-Driven Tool Call Repair (BZ-665)
3
+ *
4
+ * Implements `experimental_repairToolCall` for the Vercel AI SDK.
5
+ * When an LLM sends a wrong tool name or wrong parameter names,
6
+ * this module attempts deterministic, schema-driven repair:
7
+ *
8
+ * 1. Tool name: case-insensitive → substring → Levenshtein
9
+ * 2. Param names: compare against JSON schema properties dynamically
10
+ * 3. Type coercion: string→number, JSON string→object/array per schema
11
+ *
12
+ * Zero static alias maps. The tool's JSON schema is the only source of truth.
13
+ *
14
+ * @module utils/toolCallRepair
15
+ */
16
+ import type { ToolCallRepairFunction, ToolSet } from "ai";
17
+ /**
18
+ * Create an `experimental_repairToolCall` handler for streamText/generateText.
19
+ * Fully dynamic — reads the tool schema at repair time, no configuration needed.
20
+ */
21
+ export declare function createToolCallRepair(): ToolCallRepairFunction<ToolSet>;
@@ -0,0 +1,298 @@
1
+ /**
2
+ * Schema-Driven Tool Call Repair (BZ-665)
3
+ *
4
+ * Implements `experimental_repairToolCall` for the Vercel AI SDK.
5
+ * When an LLM sends a wrong tool name or wrong parameter names,
6
+ * this module attempts deterministic, schema-driven repair:
7
+ *
8
+ * 1. Tool name: case-insensitive → substring → Levenshtein
9
+ * 2. Param names: compare against JSON schema properties dynamically
10
+ * 3. Type coercion: string→number, JSON string→object/array per schema
11
+ *
12
+ * Zero static alias maps. The tool's JSON schema is the only source of truth.
13
+ *
14
+ * @module utils/toolCallRepair
15
+ */
16
+ import { logger } from "./logger.js";
17
+ /**
18
+ * Create an `experimental_repairToolCall` handler for streamText/generateText.
19
+ * Fully dynamic — reads the tool schema at repair time, no configuration needed.
20
+ */
21
+ export function createToolCallRepair() {
22
+ return async ({ toolCall, tools, inputSchema, error }) => {
23
+ // Import error classes lazily to avoid circular deps at module level
24
+ const { NoSuchToolError: NoSuchTool, InvalidToolInputError: InvalidInput } = await import("ai");
25
+ if (NoSuchTool.isInstance(error)) {
26
+ return repairToolName(toolCall, Object.keys(tools));
27
+ }
28
+ if (InvalidInput.isInstance(error)) {
29
+ try {
30
+ const schema = await inputSchema({ toolName: toolCall.toolName });
31
+ return repairToolInput(toolCall, schema);
32
+ }
33
+ catch {
34
+ // inputSchema() failed — can't repair without schema
35
+ return null;
36
+ }
37
+ }
38
+ return null;
39
+ };
40
+ }
41
+ // ─── Tool Name Repair ──────────────────────────────────────────────
42
+ /**
43
+ * Attempt to match a wrong tool name against available tool names.
44
+ * Strategies (in order): case-insensitive exact → substring → Levenshtein.
45
+ */
46
+ function repairToolName(toolCall, availableTools) {
47
+ const called = toolCall.toolName;
48
+ // Guard: empty or whitespace-only tool name cannot be meaningfully repaired
49
+ if (!called || called.trim().length === 0) {
50
+ return null;
51
+ }
52
+ // 1. Case-insensitive exact match
53
+ const ciMatch = availableTools.find((t) => t.toLowerCase() === called.toLowerCase());
54
+ if (ciMatch) {
55
+ logger.debug(`[ToolCallRepair] Name repair (case): "${called}" → "${ciMatch}"`);
56
+ return { ...toolCall, toolName: ciMatch };
57
+ }
58
+ // 2. Substring match: "search_file" is substring of "search_files" or vice versa.
59
+ // Only accept when exactly one tool matches to avoid ambiguous repairs.
60
+ const calledLower = called.toLowerCase();
61
+ const subCandidates = availableTools.filter((t) => {
62
+ const tLower = t.toLowerCase();
63
+ return tLower.includes(calledLower) || calledLower.includes(tLower);
64
+ });
65
+ if (subCandidates.length === 1) {
66
+ logger.debug(`[ToolCallRepair] Name repair (substring): "${called}" → "${subCandidates[0]}"`);
67
+ return { ...toolCall, toolName: subCandidates[0] };
68
+ }
69
+ // 3. Levenshtein distance — accept if normalized distance < 0.3
70
+ // Compare by normalized score (not raw edits) so length differences don't skew selection.
71
+ let bestMatch = null;
72
+ let bestNormalized = Infinity;
73
+ for (const t of availableTools) {
74
+ const dist = levenshtein(calledLower, t.toLowerCase());
75
+ const maxLen = Math.max(called.length, t.length);
76
+ const normalized = maxLen === 0 ? 0 : dist / maxLen;
77
+ if (normalized < 0.3 && normalized < bestNormalized) {
78
+ bestNormalized = normalized;
79
+ bestMatch = t;
80
+ }
81
+ }
82
+ if (bestMatch) {
83
+ logger.debug(`[ToolCallRepair] Name repair (levenshtein ${bestNormalized.toFixed(2)}): "${called}" → "${bestMatch}"`);
84
+ return { ...toolCall, toolName: bestMatch };
85
+ }
86
+ logger.debug(`[ToolCallRepair] Could not repair tool name "${called}". Available: [${availableTools.join(", ")}]`);
87
+ return null;
88
+ }
89
+ // ─── Tool Input Repair ─────────────────────────────────────────────
90
+ /**
91
+ * Attempt to repair wrong parameter names and types using the JSON schema.
92
+ * Compares LLM-provided keys against schema properties dynamically.
93
+ *
94
+ * `toolCall.input` is a JSON string per LanguageModelV3ToolCall.
95
+ */
96
+ function repairToolInput(toolCall, schema) {
97
+ let args;
98
+ try {
99
+ args = JSON.parse(toolCall.input);
100
+ }
101
+ catch {
102
+ return null; // input is not valid JSON — can't repair
103
+ }
104
+ if (!args || typeof args !== "object" || Array.isArray(args)) {
105
+ return null;
106
+ }
107
+ const schemaProps = schema.properties;
108
+ if (!schemaProps) {
109
+ return null;
110
+ }
111
+ const expectedKeys = Object.keys(schemaProps);
112
+ const inputObj = args;
113
+ const inputKeys = Object.keys(inputObj);
114
+ const repaired = Object.create(null);
115
+ let didRepair = false;
116
+ const dropUnknown = schema.additionalProperties === false;
117
+ for (const inputKey of inputKeys) {
118
+ // Already matches a schema property — keep as-is
119
+ if (expectedKeys.includes(inputKey)) {
120
+ repaired[inputKey] = inputObj[inputKey];
121
+ continue;
122
+ }
123
+ // Try to find a matching schema property
124
+ const mapped = findMatchingKey(inputKey, expectedKeys);
125
+ if (mapped) {
126
+ // Don't overwrite an already-populated canonical key — but still mark as repaired
127
+ // so the function returns the corrected object instead of null.
128
+ if (Object.prototype.hasOwnProperty.call(repaired, mapped)) {
129
+ didRepair = true;
130
+ continue;
131
+ }
132
+ logger.debug(`[ToolCallRepair] Param repair: "${inputKey}" → "${mapped}" (tool: ${toolCall.toolName})`);
133
+ repaired[mapped] = inputObj[inputKey];
134
+ didRepair = true;
135
+ }
136
+ else if (dropUnknown) {
137
+ // Schema forbids extra properties — drop unmapped keys
138
+ logger.debug(`[ToolCallRepair] Dropping unmapped key "${inputKey}" (additionalProperties: false, tool: ${toolCall.toolName})`);
139
+ didRepair = true;
140
+ }
141
+ else {
142
+ // Unknown key — pass through (schema allows additionalProperties)
143
+ repaired[inputKey] = inputObj[inputKey];
144
+ }
145
+ }
146
+ // Type coercion based on schema types
147
+ for (const key of Object.keys(repaired)) {
148
+ const propSchema = schemaProps[key];
149
+ if (!propSchema) {
150
+ continue;
151
+ }
152
+ const coerced = coerceType(repaired[key], propSchema);
153
+ if (coerced !== repaired[key]) {
154
+ logger.debug(`[ToolCallRepair] Type coercion on "${key}": ${typeof repaired[key]} → ${typeof coerced} (tool: ${toolCall.toolName})`);
155
+ repaired[key] = coerced;
156
+ didRepair = true;
157
+ }
158
+ }
159
+ if (didRepair) {
160
+ return { ...toolCall, input: JSON.stringify(repaired) };
161
+ }
162
+ return null;
163
+ }
164
+ /**
165
+ * Find a matching schema key for a mismatched input key.
166
+ * Strategies: case-insensitive → Levenshtein (threshold ≤2 edits).
167
+ */
168
+ function findMatchingKey(inputKey, schemaKeys) {
169
+ const inputLower = inputKey.toLowerCase();
170
+ // Case-insensitive match
171
+ const ciMatch = schemaKeys.find((k) => k.toLowerCase() === inputLower);
172
+ if (ciMatch) {
173
+ return ciMatch;
174
+ }
175
+ // Levenshtein — threshold ≤2 edits
176
+ let best = null;
177
+ let bestDist = Infinity;
178
+ for (const k of schemaKeys) {
179
+ const dist = levenshtein(inputLower, k.toLowerCase());
180
+ if (dist <= 2 && dist < bestDist) {
181
+ bestDist = dist;
182
+ best = k;
183
+ }
184
+ }
185
+ return best;
186
+ }
187
+ // ─── Type Coercion ─────────────────────────────────────────────────
188
+ /**
189
+ * Coerce a value to match the expected schema type.
190
+ * Handles: string→number, JSON string→object, JSON string→array, value→[value].
191
+ */
192
+ function coerceType(value, propSchema) {
193
+ const expectedType = propSchema.type;
194
+ if (!expectedType || value === null || value === undefined) {
195
+ return value;
196
+ }
197
+ // String → Number (trim first, reject empty/whitespace, require finite result)
198
+ if (expectedType === "number" && typeof value === "string") {
199
+ const trimmed = value.trim();
200
+ if (trimmed !== "") {
201
+ const num = Number(trimmed);
202
+ if (isFinite(num)) {
203
+ return num;
204
+ }
205
+ }
206
+ }
207
+ // String → Integer (strict: reject "12abc", "3.7", etc.)
208
+ if (expectedType === "integer" && typeof value === "string") {
209
+ const trimmed = value.trim();
210
+ if (/^[+-]?\d+$/.test(trimmed)) {
211
+ const num = Number(trimmed);
212
+ if (Number.isSafeInteger(num)) {
213
+ return num;
214
+ }
215
+ }
216
+ }
217
+ // String → Boolean
218
+ if (expectedType === "boolean" && typeof value === "string") {
219
+ if (value.toLowerCase() === "true") {
220
+ return true;
221
+ }
222
+ if (value.toLowerCase() === "false") {
223
+ return false;
224
+ }
225
+ }
226
+ // JSON string → Object
227
+ if (expectedType === "object" && typeof value === "string") {
228
+ try {
229
+ const parsed = JSON.parse(value);
230
+ if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
231
+ return parsed;
232
+ }
233
+ }
234
+ catch {
235
+ // Not valid JSON — return as-is
236
+ }
237
+ }
238
+ // JSON string → Array
239
+ if (expectedType === "array" && typeof value === "string") {
240
+ try {
241
+ const parsed = JSON.parse(value);
242
+ if (Array.isArray(parsed)) {
243
+ return parsed;
244
+ }
245
+ }
246
+ catch {
247
+ // Not valid JSON — return as-is
248
+ }
249
+ }
250
+ // Single non-string value → Array (wrap).
251
+ // Strings are excluded because they are more likely a JSON-encoded array
252
+ // that failed to parse above, and wrapping "foo" into ["foo"] is rarely correct.
253
+ if (expectedType === "array" &&
254
+ !Array.isArray(value) &&
255
+ typeof value !== "string") {
256
+ return [value];
257
+ }
258
+ return value;
259
+ }
260
+ // ─── Levenshtein Distance ──────────────────────────────────────────
261
+ /**
262
+ * Compute Levenshtein edit distance between two strings.
263
+ * Uses the iterative matrix approach — O(m*n) time, O(min(m,n)) space.
264
+ */
265
+ function levenshtein(a, b) {
266
+ if (a === b) {
267
+ return 0;
268
+ }
269
+ if (a.length === 0) {
270
+ return b.length;
271
+ }
272
+ if (b.length === 0) {
273
+ return a.length;
274
+ }
275
+ // Use shorter string as column to minimize space
276
+ if (a.length > b.length) {
277
+ [a, b] = [b, a];
278
+ }
279
+ const aLen = a.length;
280
+ const bLen = b.length;
281
+ let prev = new Array(aLen + 1);
282
+ let curr = new Array(aLen + 1);
283
+ for (let i = 0; i <= aLen; i++) {
284
+ prev[i] = i;
285
+ }
286
+ for (let j = 1; j <= bLen; j++) {
287
+ curr[0] = j;
288
+ for (let i = 1; i <= aLen; i++) {
289
+ const cost = a[i - 1] === b[j - 1] ? 0 : 1;
290
+ curr[i] = Math.min(prev[i] + 1, // deletion
291
+ curr[i - 1] + 1, // insertion
292
+ prev[i - 1] + cost);
293
+ }
294
+ [prev, curr] = [curr, prev];
295
+ }
296
+ return prev[aLen];
297
+ }
298
+ //# sourceMappingURL=toolCallRepair.js.map
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Consolidates environment variable access to avoid scattered process.env calls
5
5
  */
6
- import type { ToolConfig } from "../types/configTypes.js";
6
+ import type { ToolConfig } from "../types/index.js";
7
7
  /**
8
8
  * Check if built-in tools should be disabled
9
9
  * Centralized function to replace direct process.env access
@@ -2,7 +2,7 @@
2
2
  * Object Transformation Utilities
3
3
  * Centralizes repeated object transformation patterns to improve code reuse and maintainability
4
4
  */
5
- import type { StandardRecord, StringArray } from "../types/typeAliases.js";
5
+ import type { StandardRecord, StringArray } from "../types/index.js";
6
6
  /**
7
7
  * Transform tool execution results from AI SDK format to NeuroLink GenerateResult format
8
8
  * Handles both single execution and array formats with robust type checking
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * @module utils/ttsProcessor
8
8
  */
9
- import type { TTSOptions, TTSResult, TTSVoice } from "../types/ttsTypes.js";
9
+ import type { TTSOptions, TTSResult, TTSHandler } from "../types/index.js";
10
10
  import { ErrorCategory, ErrorSeverity } from "../constants/enums.js";
11
11
  import { NeuroLinkError } from "./errorHandling.js";
12
12
  /**
@@ -34,74 +34,6 @@ export declare class TTSError extends NeuroLinkError {
34
34
  originalError?: Error;
35
35
  });
36
36
  }
37
- /**
38
- * TTS Handler interface for provider-specific implementations
39
- *
40
- * Each provider (Google AI, OpenAI, etc.) implements this interface
41
- * to provide TTS generation capabilities using their respective APIs.
42
- *
43
- * **Timeout Handling:**
44
- * Implementations MUST handle their own timeouts for the `synthesize()` method.
45
- * Recommended timeout: 30 seconds. Implementations should use `withTimeout()` utility
46
- * or provider-specific timeout mechanisms (e.g., Google Cloud client timeout).
47
- *
48
- * **Error Handling:**
49
- * Implementations should throw TTSError for all failures, including timeouts.
50
- * Use appropriate error codes from TTS_ERROR_CODES.
51
- *
52
- * @example
53
- * ```typescript
54
- * class MyTTSHandler implements TTSHandler {
55
- * async synthesize(text: string, options: TTSOptions): Promise<TTSResult> {
56
- * // REQUIRED: Implement timeout handling
57
- * return await withTimeout(
58
- * this.actualSynthesis(text, options),
59
- * 30000, // 30 second timeout
60
- * 'TTS synthesis timed out'
61
- * );
62
- * }
63
- *
64
- * isConfigured(): boolean {
65
- * return !!process.env.MY_TTS_API_KEY;
66
- * }
67
- * }
68
- * ```
69
- */
70
- export type TTSHandler = {
71
- /**
72
- * Generate audio from text using provider-specific TTS API
73
- *
74
- * **IMPORTANT: Timeout Responsibility**
75
- * Implementations MUST enforce their own timeouts (recommended: 30 seconds).
76
- * Use the `withTimeout()` utility or provider-specific timeout mechanisms.
77
- *
78
- * @param text - Text to convert to speech (pre-validated, non-empty, within length limits)
79
- * @param options - TTS configuration options (voice, format, speed, etc.)
80
- * @returns Audio buffer with metadata
81
- * @throws {TTSError} On synthesis failure, timeout, or configuration issues
82
- */
83
- synthesize(text: string, options: TTSOptions): Promise<TTSResult>;
84
- /**
85
- * Get available voices for the provider
86
- *
87
- * @param languageCode - Optional language filter (e.g., "en-US")
88
- * @returns List of available voices
89
- */
90
- getVoices?(languageCode?: string): Promise<TTSVoice[]>;
91
- /**
92
- * Validate that the provider is properly configured
93
- *
94
- * @returns True if provider can generate TTS
95
- */
96
- isConfigured(): boolean;
97
- /**
98
- * Maximum text length supported by this provider (in bytes)
99
- * Different providers have different limits
100
- *
101
- * @default 3000 if not specified
102
- */
103
- maxTextLength?: number;
104
- };
105
37
  /**
106
38
  * TTS processor class for orchestrating text-to-speech operations
107
39
  *
@@ -9,8 +9,7 @@
9
9
  import { logger } from "./logger.js";
10
10
  import { ErrorCategory, ErrorSeverity } from "../constants/enums.js";
11
11
  import { NeuroLinkError } from "./errorHandling.js";
12
- import { SpanSerializer, SpanType, SpanStatus, } from "../observability/index.js";
13
- import { getMetricsAggregator } from "../observability/index.js";
12
+ import { SpanSerializer, SpanType, SpanStatus, getMetricsAggregator, } from "../observability/index.js";
14
13
  /**
15
14
  * TTS-specific error codes
16
15
  */
@@ -4,7 +4,7 @@
4
4
  *
5
5
  * Demonstrates ModelGroup-based execution with sequential and parallel strategies
6
6
  */
7
- import type { WorkflowConfig } from "./types.js";
7
+ import type { WorkflowConfig } from "../types/index.js";
8
8
  declare const simpleParallelWorkflow: WorkflowConfig;
9
9
  declare const fastThenPremiumWorkflow: WorkflowConfig;
10
10
  declare const fallbackChainWorkflow: WorkflowConfig;
@@ -6,8 +6,7 @@
6
6
  */
7
7
  import { z } from "zod";
8
8
  import { AIProviderName } from "../constants/enums.js";
9
- import type { JsonValue } from "../types/common.js";
10
- import type { ConditioningConfig, ExecutionConfig, JudgeConfig, ModelConfig, ModelGroup, WorkflowConfig } from "./types.js";
9
+ import type { JsonValue, ConditioningConfig, ExecutionConfig, JudgeConfig, WorkflowModelConfig, ModelGroup, WorkflowConfig } from "../types/index.js";
11
10
  export declare const MIN_SCORE = 0;
12
11
  export declare const MAX_SCORE = 100;
13
12
  export declare const MAX_REASONING_LENGTH = 200;
@@ -141,8 +140,8 @@ export declare const WorkflowConfigSchema: z.ZodObject<{
141
140
  type: z.ZodEnum<{
142
141
  custom: "custom";
143
142
  chain: "chain";
144
- ensemble: "ensemble";
145
143
  adaptive: "adaptive";
144
+ ensemble: "ensemble";
146
145
  }>;
147
146
  models: z.ZodArray<z.ZodObject<{
148
147
  provider: z.ZodType<AIProviderName, unknown, z.core.$ZodTypeInternals<AIProviderName, unknown>>;
@@ -305,7 +304,7 @@ export declare function usesModelGroups(config: WorkflowConfig): boolean;
305
304
  * @param config - Workflow configuration
306
305
  * @returns Array of all model configs
307
306
  */
308
- export declare function getAllModels(config: WorkflowConfig): ModelConfig[];
307
+ export declare function getAllModels(config: WorkflowConfig): WorkflowModelConfig[];
309
308
  /**
310
309
  * Get model groups (converts flat models to single group if needed)
311
310
  * @param config - Workflow configuration
@@ -334,7 +333,7 @@ export declare function mergeWithDefaults(config: WorkflowConfig): WorkflowConfi
334
333
  /**
335
334
  * Validation result for workflow configuration
336
335
  */
337
- export type WorkflowConfigValidationResult = {
336
+ type WorkflowConfigValidationResult = {
338
337
  success: boolean;
339
338
  data?: WorkflowConfig;
340
339
  error?: z.ZodError;
@@ -354,9 +353,9 @@ export declare function createWorkflowConfig(partial: Partial<WorkflowConfig> &
354
353
  /**
355
354
  * Validation result for model configuration
356
355
  */
357
- export type ModelConfigValidationResult = {
356
+ type ModelConfigValidationResult = {
358
357
  success: boolean;
359
- data?: ModelConfig;
358
+ data?: WorkflowModelConfig;
360
359
  error?: z.ZodError;
361
360
  };
362
361
  /**
@@ -364,11 +363,11 @@ export type ModelConfigValidationResult = {
364
363
  * @param config - Partial model configuration to validate
365
364
  * @returns Validation result with parsed data or error details
366
365
  */
367
- export declare function validateModelConfig(config: Partial<ModelConfig>): ModelConfigValidationResult;
366
+ export declare function validateModelConfig(config: Partial<WorkflowModelConfig>): ModelConfigValidationResult;
368
367
  /**
369
368
  * Validation result for judge configuration
370
369
  */
371
- export type JudgeConfigValidationResult = {
370
+ type JudgeConfigValidationResult = {
372
371
  success: boolean;
373
372
  data?: JudgeConfig;
374
373
  error?: z.ZodError;
@@ -399,3 +398,4 @@ export declare function getAllJudges(config: WorkflowConfig): JudgeConfig[];
399
398
  * @returns Estimated cost in USD
400
399
  */
401
400
  export declare function estimateWorkflowCost(config: WorkflowConfig, estimatedTokens: number): number;
401
+ export {};
@@ -2,8 +2,7 @@
2
2
  * workflow/core/ensembleExecutor.ts
3
3
  * Parallel execution engine for ensemble workflows
4
4
  */
5
- import type { EnsembleResponse, ExecutionConfig, ModelGroup } from "../types.js";
6
- import type { EnsembleExecutionResult, ExecuteEnsembleOptions } from "./types/index.js";
5
+ import type { EnsembleResponse, ExecutionConfig, ModelGroup, EnsembleExecutionResult, ExecuteEnsembleOptions } from "../../types/index.js";
7
6
  /**
8
7
  * Execute ensemble of models in parallel
9
8
  * @param options - Execution options including prompt and models
@@ -6,7 +6,7 @@ import pLimit from "p-limit";
6
6
  import { AIProviderFactory } from "../../core/factory.js";
7
7
  import { logger } from "../../utils/logger.js";
8
8
  import { SpanSerializer, SpanType, SpanStatus, getMetricsAggregator, } from "../../observability/index.js";
9
- import { WorkflowError } from "../types.js";
9
+ import { WorkflowError } from "../../types/index.js";
10
10
  const functionTag = "EnsembleExecutor";
11
11
  // ============================================================================
12
12
  // EXECUTION FUNCTIONS
@@ -2,14 +2,13 @@
2
2
  * workflow/core/judgeScorer.ts
3
3
  * Judge-based scoring system for ensemble response evaluation
4
4
  */
5
- import type { EnsembleResponse, JudgeScores, MultiJudgeScores } from "../types.js";
6
- import type { ScoreOptions, ScoreResult } from "./types/index.js";
5
+ import type { EnsembleResponse, JudgeScores, MultiJudgeScores, ScoreOptions, JudgeScoreResult } from "../../types/index.js";
7
6
  /**
8
7
  * Execute judge scoring on ensemble responses
9
8
  * @param options - Scoring options including judges and responses
10
9
  * @returns Score result with judge evaluation
11
10
  */
12
- export declare function scoreEnsemble(options: ScoreOptions): Promise<ScoreResult>;
11
+ export declare function scoreEnsemble(options: ScoreOptions): Promise<JudgeScoreResult>;
13
12
  /**
14
13
  * Get best response from judge scores
15
14
  * @param scores - Judge scores or multi-judge scores
@@ -6,7 +6,7 @@ import { AIProviderFactory } from "../../core/factory.js";
6
6
  import { logger } from "../../utils/logger.js";
7
7
  import { SpanSerializer, SpanType, SpanStatus, getMetricsAggregator, } from "../../observability/index.js";
8
8
  import { MAX_REASONING_LENGTH } from "../config.js";
9
- import { WorkflowError } from "../types.js";
9
+ import { WorkflowError } from "../../types/index.js";
10
10
  const functionTag = "JudgeScorer";
11
11
  // ============================================================================
12
12
  // SCORING FUNCTIONS
@@ -5,8 +5,7 @@
5
5
  * Uses judge feedback and ensemble responses to synthesize an improved final response.
6
6
  * Combines strengths from multiple responses based on evaluation insights.
7
7
  */
8
- import type { ConditioningConfig } from "../types.js";
9
- import type { ConditionOptions, ConditionResult } from "./types/index.js";
8
+ import type { ConditioningConfig, ConditionOptions, ConditionResult } from "../../types/index.js";
10
9
  /**
11
10
  * Condition response by synthesizing improved version using judge feedback
12
11
  *
@@ -2,8 +2,7 @@
2
2
  * workflow/core/workflowRegistry.ts
3
3
  * Registry for managing workflow configurations
4
4
  */
5
- import type { WorkflowConfig } from "../types.js";
6
- import type { ListOptions, RegisterOptions, RegisterResult, RegistryStats, WorkflowMetadata } from "./types/index.js";
5
+ import type { WorkflowConfig, ListOptions, RegisterOptions, RegisterResult, RegistryStats, WorkflowMetadata } from "../../types/index.js";
7
6
  /**
8
7
  * Register a new workflow
9
8
  * @param config - Workflow configuration to register
@@ -11,12 +11,11 @@
11
11
  *
12
12
  * @module workflow/core/workflowRunner
13
13
  */
14
- import type { JsonValue } from "../../types/common.js";
15
- import type { WorkflowConfig, WorkflowResult } from "../types.js";
14
+ import type { RunWorkflowOptions, WorkflowConfig, WorkflowResult } from "../../types/index.js";
16
15
  /**
17
16
  * Progressive workflow response for streaming
18
17
  */
19
- export type WorkflowStreamChunk = {
18
+ type WorkflowStreamChunk = {
20
19
  /**
21
20
  * Type of response chunk
22
21
  */
@@ -30,42 +29,6 @@ export type WorkflowStreamChunk = {
30
29
  */
31
30
  partialResult?: Partial<WorkflowResult>;
32
31
  };
33
- /**
34
- * Options for workflow execution
35
- */
36
- export type RunWorkflowOptions = {
37
- /**
38
- * The user's prompt/query to send to models
39
- */
40
- prompt: string;
41
- /**
42
- * Optional conversation history for context
43
- */
44
- conversationHistory?: Array<{
45
- role: "user" | "assistant";
46
- content: string;
47
- }>;
48
- /**
49
- * Override default timeout (ms) for this execution
50
- */
51
- timeout?: number;
52
- /**
53
- * Override default parallelism for this execution
54
- */
55
- parallelism?: number;
56
- /**
57
- * Enable verbose logging for debugging
58
- */
59
- verbose?: boolean;
60
- /**
61
- * Optional context/metadata to pass through
62
- */
63
- metadata?: Record<string, JsonValue>;
64
- /**
65
- * Enable progressive streaming (yield preliminary response)
66
- */
67
- streaming?: boolean;
68
- };
69
32
  /**
70
33
  * Execute a complete workflow
71
34
  *
@@ -113,3 +76,4 @@ export declare function runWorkflow(config: WorkflowConfig, options: RunWorkflow
113
76
  * ```
114
77
  */
115
78
  export declare function runWorkflowWithStreaming(config: WorkflowConfig, options: RunWorkflowOptions): AsyncGenerator<WorkflowStreamChunk, void, undefined>;
79
+ export {};