@juspay/neurolink 9.27.0 → 9.28.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +78 -25
- package/dist/adapters/providerImageAdapter.js +9 -1
- package/dist/cli/commands/config.d.ts +4 -4
- package/dist/cli/commands/mcp.d.ts +87 -0
- package/dist/cli/commands/mcp.js +1524 -0
- package/dist/cli/loop/optionsSchema.js +4 -0
- package/dist/constants/contextWindows.js +18 -7
- package/dist/constants/enums.d.ts +36 -6
- package/dist/constants/enums.js +38 -5
- package/dist/constants/tokens.d.ts +4 -0
- package/dist/constants/tokens.js +4 -0
- package/dist/core/modules/ToolsManager.js +29 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +27 -1
- package/dist/lib/adapters/providerImageAdapter.js +9 -1
- package/dist/lib/constants/contextWindows.js +18 -7
- package/dist/lib/constants/enums.d.ts +36 -6
- package/dist/lib/constants/enums.js +38 -5
- package/dist/lib/constants/tokens.d.ts +4 -0
- package/dist/lib/constants/tokens.js +4 -0
- package/dist/lib/core/modules/ToolsManager.js +29 -2
- package/dist/lib/index.d.ts +2 -1
- package/dist/lib/index.js +27 -1
- package/dist/lib/mcp/agentExposure.d.ts +228 -0
- package/dist/lib/mcp/agentExposure.js +357 -0
- package/dist/lib/mcp/batching/index.d.ts +11 -0
- package/dist/lib/mcp/batching/index.js +11 -0
- package/dist/lib/mcp/batching/requestBatcher.d.ts +202 -0
- package/dist/lib/mcp/batching/requestBatcher.js +442 -0
- package/dist/lib/mcp/caching/index.d.ts +11 -0
- package/dist/lib/mcp/caching/index.js +11 -0
- package/dist/lib/mcp/caching/toolCache.d.ts +221 -0
- package/dist/lib/mcp/caching/toolCache.js +434 -0
- package/dist/lib/mcp/elicitation/elicitationManager.d.ts +169 -0
- package/dist/lib/mcp/elicitation/elicitationManager.js +377 -0
- package/dist/lib/mcp/elicitation/index.d.ts +11 -0
- package/dist/lib/mcp/elicitation/index.js +12 -0
- package/dist/lib/mcp/elicitation/types.d.ts +278 -0
- package/dist/lib/mcp/elicitation/types.js +11 -0
- package/dist/lib/mcp/elicitationProtocol.d.ts +228 -0
- package/dist/lib/mcp/elicitationProtocol.js +376 -0
- package/dist/lib/mcp/enhancedToolDiscovery.d.ts +205 -0
- package/dist/lib/mcp/enhancedToolDiscovery.js +482 -0
- package/dist/lib/mcp/index.d.ts +38 -1
- package/dist/lib/mcp/index.js +36 -3
- package/dist/lib/mcp/mcpRegistryClient.d.ts +332 -0
- package/dist/lib/mcp/mcpRegistryClient.js +489 -0
- package/dist/lib/mcp/mcpServerBase.d.ts +227 -0
- package/dist/lib/mcp/mcpServerBase.js +374 -0
- package/dist/lib/mcp/multiServerManager.d.ts +310 -0
- package/dist/lib/mcp/multiServerManager.js +580 -0
- package/dist/lib/mcp/routing/index.d.ts +11 -0
- package/dist/lib/mcp/routing/index.js +11 -0
- package/dist/lib/mcp/routing/toolRouter.d.ts +219 -0
- package/dist/lib/mcp/routing/toolRouter.js +417 -0
- package/dist/lib/mcp/serverCapabilities.d.ts +341 -0
- package/dist/lib/mcp/serverCapabilities.js +503 -0
- package/dist/lib/mcp/toolAnnotations.d.ts +154 -0
- package/dist/lib/mcp/toolAnnotations.js +240 -0
- package/dist/lib/mcp/toolConverter.d.ts +178 -0
- package/dist/lib/mcp/toolConverter.js +259 -0
- package/dist/lib/mcp/toolIntegration.d.ts +136 -0
- package/dist/lib/mcp/toolIntegration.js +335 -0
- package/dist/lib/neurolink.d.ts +275 -2
- package/dist/lib/neurolink.js +596 -56
- package/dist/lib/providers/amazonBedrock.js +1 -1
- package/dist/lib/providers/anthropic.js +1 -1
- package/dist/lib/providers/litellm.d.ts +10 -0
- package/dist/lib/providers/litellm.js +104 -2
- package/dist/lib/types/configTypes.d.ts +56 -0
- package/dist/lib/types/generateTypes.d.ts +4 -0
- package/dist/lib/types/index.d.ts +1 -1
- package/dist/lib/types/modelTypes.d.ts +6 -6
- package/dist/lib/types/streamTypes.d.ts +2 -0
- package/dist/lib/types/tools.d.ts +2 -0
- package/dist/lib/utils/pricing.js +177 -17
- package/dist/lib/utils/schemaConversion.d.ts +6 -1
- package/dist/lib/utils/schemaConversion.js +50 -28
- package/dist/lib/workflow/config.d.ts +16 -16
- package/dist/mcp/agentExposure.d.ts +228 -0
- package/dist/mcp/agentExposure.js +356 -0
- package/dist/mcp/batching/index.d.ts +11 -0
- package/dist/mcp/batching/index.js +10 -0
- package/dist/mcp/batching/requestBatcher.d.ts +202 -0
- package/dist/mcp/batching/requestBatcher.js +441 -0
- package/dist/mcp/caching/index.d.ts +11 -0
- package/dist/mcp/caching/index.js +10 -0
- package/dist/mcp/caching/toolCache.d.ts +221 -0
- package/dist/mcp/caching/toolCache.js +433 -0
- package/dist/mcp/elicitation/elicitationManager.d.ts +169 -0
- package/dist/mcp/elicitation/elicitationManager.js +376 -0
- package/dist/mcp/elicitation/index.d.ts +11 -0
- package/dist/mcp/elicitation/index.js +11 -0
- package/dist/mcp/elicitation/types.d.ts +278 -0
- package/dist/mcp/elicitation/types.js +10 -0
- package/dist/mcp/elicitationProtocol.d.ts +228 -0
- package/dist/mcp/elicitationProtocol.js +375 -0
- package/dist/mcp/enhancedToolDiscovery.d.ts +205 -0
- package/dist/mcp/enhancedToolDiscovery.js +481 -0
- package/dist/mcp/index.d.ts +38 -1
- package/dist/mcp/index.js +36 -3
- package/dist/mcp/mcpRegistryClient.d.ts +332 -0
- package/dist/mcp/mcpRegistryClient.js +488 -0
- package/dist/mcp/mcpServerBase.d.ts +227 -0
- package/dist/mcp/mcpServerBase.js +373 -0
- package/dist/mcp/multiServerManager.d.ts +310 -0
- package/dist/mcp/multiServerManager.js +579 -0
- package/dist/mcp/routing/index.d.ts +11 -0
- package/dist/mcp/routing/index.js +10 -0
- package/dist/mcp/routing/toolRouter.d.ts +219 -0
- package/dist/mcp/routing/toolRouter.js +416 -0
- package/dist/mcp/serverCapabilities.d.ts +341 -0
- package/dist/mcp/serverCapabilities.js +502 -0
- package/dist/mcp/toolAnnotations.d.ts +154 -0
- package/dist/mcp/toolAnnotations.js +239 -0
- package/dist/mcp/toolConverter.d.ts +178 -0
- package/dist/mcp/toolConverter.js +258 -0
- package/dist/mcp/toolIntegration.d.ts +136 -0
- package/dist/mcp/toolIntegration.js +334 -0
- package/dist/neurolink.d.ts +275 -2
- package/dist/neurolink.js +596 -56
- package/dist/providers/amazonBedrock.js +1 -1
- package/dist/providers/anthropic.js +1 -1
- package/dist/providers/litellm.d.ts +10 -0
- package/dist/providers/litellm.js +104 -2
- package/dist/types/configTypes.d.ts +56 -0
- package/dist/types/generateTypes.d.ts +4 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/streamTypes.d.ts +2 -0
- package/dist/types/tools.d.ts +2 -0
- package/dist/utils/pricing.js +177 -17
- package/dist/utils/schemaConversion.d.ts +6 -1
- package/dist/utils/schemaConversion.js +50 -28
- package/package.json +1 -1
|
@@ -82,5 +82,9 @@ export const textGenerationOptionsSchema = {
|
|
|
82
82
|
type: "boolean",
|
|
83
83
|
description: "Skip injecting tool descriptions into the system prompt. Useful when tool info is already provided.",
|
|
84
84
|
},
|
|
85
|
+
disableToolCache: {
|
|
86
|
+
type: "boolean",
|
|
87
|
+
description: "Disable tool result caching for this request (overrides global mcp.cache.enabled).",
|
|
88
|
+
},
|
|
85
89
|
};
|
|
86
90
|
//# sourceMappingURL=optionsSchema.js.map
|
|
@@ -25,9 +25,9 @@ export const DEFAULT_OUTPUT_RESERVE_RATIO = 0.35;
|
|
|
25
25
|
export const MODEL_CONTEXT_WINDOWS = {
|
|
26
26
|
anthropic: {
|
|
27
27
|
_default: 200_000,
|
|
28
|
-
// Claude 4.6 (Feb 2026) —
|
|
29
|
-
"claude-opus-4-6":
|
|
30
|
-
"claude-sonnet-4-6":
|
|
28
|
+
// Claude 4.6 (Feb 2026) — 1M context window
|
|
29
|
+
"claude-opus-4-6": 1_000_000,
|
|
30
|
+
"claude-sonnet-4-6": 1_000_000,
|
|
31
31
|
// Claude 4.5
|
|
32
32
|
"claude-opus-4-5-20251101": 200_000,
|
|
33
33
|
"claude-sonnet-4-5-20250929": 200_000,
|
|
@@ -46,6 +46,11 @@ export const MODEL_CONTEXT_WINDOWS = {
|
|
|
46
46
|
},
|
|
47
47
|
openai: {
|
|
48
48
|
_default: 128_000,
|
|
49
|
+
// GPT-5.4 family — 1.05M context
|
|
50
|
+
"gpt-5.4": 1_050_000,
|
|
51
|
+
"gpt-5.4-mini": 400_000,
|
|
52
|
+
"gpt-5.4-nano": 400_000,
|
|
53
|
+
"gpt-5.4-pro": 1_050_000,
|
|
49
54
|
// GPT-5.x family — 400K context
|
|
50
55
|
"gpt-5.3-codex": 400_000,
|
|
51
56
|
"gpt-5.2": 400_000,
|
|
@@ -108,8 +113,8 @@ export const MODEL_CONTEXT_WINDOWS = {
|
|
|
108
113
|
vertex: {
|
|
109
114
|
_default: 1_048_576,
|
|
110
115
|
// Claude on Vertex
|
|
111
|
-
"claude-opus-4-6":
|
|
112
|
-
"claude-sonnet-4-6":
|
|
116
|
+
"claude-opus-4-6": 1_000_000,
|
|
117
|
+
"claude-sonnet-4-6": 1_000_000,
|
|
113
118
|
"claude-sonnet-4-5": 200_000,
|
|
114
119
|
"claude-opus-4-5": 200_000,
|
|
115
120
|
"claude-haiku-4-5": 200_000,
|
|
@@ -136,8 +141,8 @@ export const MODEL_CONTEXT_WINDOWS = {
|
|
|
136
141
|
bedrock: {
|
|
137
142
|
_default: 200_000,
|
|
138
143
|
// Claude 4.6
|
|
139
|
-
"anthropic.claude-opus-4-6-v1:0":
|
|
140
|
-
"anthropic.claude-sonnet-4-6":
|
|
144
|
+
"anthropic.claude-opus-4-6-v1:0": 1_000_000,
|
|
145
|
+
"anthropic.claude-sonnet-4-6": 1_000_000,
|
|
141
146
|
// Claude 4.5
|
|
142
147
|
"anthropic.claude-opus-4-5-20251124-v1:0": 200_000,
|
|
143
148
|
"anthropic.claude-sonnet-4-5-20250929-v1:0": 200_000,
|
|
@@ -160,6 +165,11 @@ export const MODEL_CONTEXT_WINDOWS = {
|
|
|
160
165
|
},
|
|
161
166
|
azure: {
|
|
162
167
|
_default: 128_000,
|
|
168
|
+
// GPT-5.4
|
|
169
|
+
"gpt-5.4": 1_050_000,
|
|
170
|
+
"gpt-5.4-mini": 400_000,
|
|
171
|
+
"gpt-5.4-nano": 400_000,
|
|
172
|
+
"gpt-5.4-pro": 1_050_000,
|
|
163
173
|
// GPT-5.x
|
|
164
174
|
"gpt-5.2": 400_000,
|
|
165
175
|
"gpt-5.2-pro": 400_000,
|
|
@@ -192,6 +202,7 @@ export const MODEL_CONTEXT_WINDOWS = {
|
|
|
192
202
|
"devstral-2512": 256_000,
|
|
193
203
|
"devstral-small-2512": 256_000,
|
|
194
204
|
"magistral-medium-latest": 128_000,
|
|
205
|
+
"mistral-small-2603": 256_000,
|
|
195
206
|
},
|
|
196
207
|
ollama: {
|
|
197
208
|
_default: 128_000,
|
|
@@ -58,10 +58,15 @@ export declare enum BedrockModels {
|
|
|
58
58
|
CLAUDE_4_5_HAIKU = "anthropic.claude-haiku-4-5-20251001-v1:0",
|
|
59
59
|
CLAUDE_4_1_OPUS = "anthropic.claude-opus-4-1-20250805-v1:0",
|
|
60
60
|
CLAUDE_4_SONNET = "anthropic.claude-sonnet-4-20250514-v1:0",
|
|
61
|
+
/** @deprecated Retired from Anthropic API. Use CLAUDE_4_6_SONNET instead. */
|
|
61
62
|
CLAUDE_3_7_SONNET = "anthropic.claude-3-7-sonnet-20250219-v1:0",
|
|
63
|
+
/** @deprecated Retired from Anthropic API. Use CLAUDE_4_6_SONNET instead. */
|
|
62
64
|
CLAUDE_3_5_SONNET = "anthropic.claude-3-5-sonnet-20241022-v1:0",
|
|
65
|
+
/** @deprecated Retired from Anthropic API. Use CLAUDE_4_6_SONNET instead. */
|
|
63
66
|
CLAUDE_3_5_HAIKU = "anthropic.claude-3-5-haiku-20241022-v1:0",
|
|
67
|
+
/** @deprecated Retired from Anthropic API. Use CLAUDE_4_6_SONNET instead. */
|
|
64
68
|
CLAUDE_3_SONNET = "anthropic.claude-3-sonnet-20240229-v1:0",
|
|
69
|
+
/** @deprecated Retired from Anthropic API. Use CLAUDE_4_6_SONNET instead. */
|
|
65
70
|
CLAUDE_3_HAIKU = "anthropic.claude-3-haiku-20240307-v1:0",
|
|
66
71
|
NOVA_PREMIER = "amazon.nova-premier-v1:0",
|
|
67
72
|
NOVA_PRO = "amazon.nova-pro-v1:0",
|
|
@@ -144,6 +149,10 @@ export declare enum BedrockModels {
|
|
|
144
149
|
*/
|
|
145
150
|
export declare enum OpenAIModels {
|
|
146
151
|
GPT_5_3_CODEX = "gpt-5.3-codex",
|
|
152
|
+
GPT_5_4 = "gpt-5.4",
|
|
153
|
+
GPT_5_4_MINI = "gpt-5.4-mini",
|
|
154
|
+
GPT_5_4_NANO = "gpt-5.4-nano",
|
|
155
|
+
GPT_5_4_PRO = "gpt-5.4-pro",
|
|
147
156
|
GPT_5_2 = "gpt-5.2",
|
|
148
157
|
GPT_5_2_CHAT_LATEST = "gpt-5.2-chat-latest",
|
|
149
158
|
GPT_5_2_PRO = "gpt-5.2-pro",
|
|
@@ -171,7 +180,9 @@ export declare enum OpenAIModels {
|
|
|
171
180
|
O3_PRO = "o3-pro",
|
|
172
181
|
O4_MINI = "o4-mini",
|
|
173
182
|
O1 = "o1",
|
|
183
|
+
/** @deprecated Turned off Jul 14, 2025. Use GPT_4_1 or O3. */
|
|
174
184
|
O1_PREVIEW = "o1-preview",
|
|
185
|
+
/** @deprecated Replaced by o3-mini. */
|
|
175
186
|
O1_MINI = "o1-mini",
|
|
176
187
|
GPT_4 = "gpt-4",
|
|
177
188
|
GPT_4_TURBO = "gpt-4-turbo",
|
|
@@ -186,6 +197,9 @@ export declare enum AzureOpenAIModels {
|
|
|
186
197
|
GPT_5_2_CHAT = "gpt-5.2-chat",
|
|
187
198
|
GPT_5_2_PRO = "gpt-5.2-pro",
|
|
188
199
|
GPT_5_2_CODEX = "gpt-5.2-codex",
|
|
200
|
+
GPT_5_4 = "gpt-5.4",
|
|
201
|
+
GPT_5_4_MINI = "gpt-5.4-mini",
|
|
202
|
+
GPT_5_4_NANO = "gpt-5.4-nano",
|
|
189
203
|
GPT_5_1 = "gpt-5.1",
|
|
190
204
|
GPT_5_1_CHAT = "gpt-5.1-chat",
|
|
191
205
|
GPT_5_1_CODEX = "gpt-5.1-codex",
|
|
@@ -228,11 +242,17 @@ export declare enum VertexModels {
|
|
|
228
242
|
CLAUDE_4_5_HAIKU = "claude-haiku-4-5@20251001",
|
|
229
243
|
CLAUDE_4_0_SONNET = "claude-sonnet-4@20250514",
|
|
230
244
|
CLAUDE_4_0_OPUS = "claude-opus-4@20250514",
|
|
245
|
+
/** @deprecated Retired from Anthropic API. Use CLAUDE_4_6_SONNET instead. */
|
|
231
246
|
CLAUDE_3_7_SONNET = "claude-3-7-sonnet@20250219",
|
|
247
|
+
/** @deprecated Retired from Anthropic API. Use CLAUDE_4_6_SONNET instead. */
|
|
232
248
|
CLAUDE_3_5_SONNET = "claude-3-5-sonnet-20241022",
|
|
249
|
+
/** @deprecated Retired from Anthropic API. Use CLAUDE_4_6_SONNET instead. */
|
|
233
250
|
CLAUDE_3_5_HAIKU = "claude-3-5-haiku-20241022",
|
|
251
|
+
/** @deprecated Retired from Anthropic API. Use CLAUDE_4_6_SONNET instead. */
|
|
234
252
|
CLAUDE_3_SONNET = "claude-3-sonnet-20240229",
|
|
253
|
+
/** @deprecated Retired from Anthropic API. Use CLAUDE_4_6_SONNET instead. */
|
|
235
254
|
CLAUDE_3_OPUS = "claude-3-opus-20240229",
|
|
255
|
+
/** @deprecated Retired from Anthropic API. Use CLAUDE_4_6_SONNET instead. */
|
|
236
256
|
CLAUDE_3_HAIKU = "claude-3-haiku-20240307",
|
|
237
257
|
GEMINI_3_1_PRO = "gemini-3.1-pro",
|
|
238
258
|
GEMINI_3_1_PRO_PREVIEW = "gemini-3.1-pro-preview",
|
|
@@ -253,9 +273,9 @@ export declare enum VertexModels {
|
|
|
253
273
|
GEMINI_2_0_FLASH = "gemini-2.0-flash",
|
|
254
274
|
GEMINI_2_0_FLASH_001 = "gemini-2.0-flash-001",
|
|
255
275
|
GEMINI_2_0_FLASH_LITE = "gemini-2.0-flash-lite",
|
|
256
|
-
/** @deprecated
|
|
276
|
+
/** @deprecated SHUT DOWN. Returns 404. Use GEMINI_2_5_FLASH or newer. */
|
|
257
277
|
GEMINI_1_5_PRO = "gemini-1.5-pro-002",
|
|
258
|
-
/** @deprecated
|
|
278
|
+
/** @deprecated SHUT DOWN. Returns 404. Use GEMINI_2_5_FLASH or newer. */
|
|
259
279
|
GEMINI_1_5_FLASH = "gemini-1.5-flash-002"
|
|
260
280
|
}
|
|
261
281
|
/**
|
|
@@ -277,16 +297,18 @@ export declare enum GoogleAIModels {
|
|
|
277
297
|
GEMINI_2_5_FLASH_IMAGE = "gemini-2.5-flash-image",
|
|
278
298
|
GEMINI_2_5_FLASH_PREVIEW_TTS = "gemini-2.5-flash-preview-tts",
|
|
279
299
|
GEMINI_2_5_PRO_PREVIEW_TTS = "gemini-2.5-pro-preview-tts",
|
|
300
|
+
/** @deprecated Retiring June 1, 2026. Use GEMINI_2_5_FLASH instead. */
|
|
280
301
|
GEMINI_2_0_FLASH = "gemini-2.0-flash",
|
|
281
302
|
GEMINI_2_0_FLASH_001 = "gemini-2.0-flash-001",
|
|
282
303
|
GEMINI_2_0_FLASH_LITE = "gemini-2.0-flash-lite",
|
|
283
304
|
GEMINI_2_0_FLASH_IMAGE = "gemini-2.0-flash-preview-image-generation",
|
|
284
|
-
/** @deprecated
|
|
305
|
+
/** @deprecated SHUT DOWN. Returns 404. Use GEMINI_2_5_FLASH or newer. */
|
|
285
306
|
GEMINI_1_5_PRO = "gemini-1.5-pro",
|
|
286
|
-
/** @deprecated
|
|
307
|
+
/** @deprecated SHUT DOWN. Returns 404. Use GEMINI_2_5_FLASH or newer. */
|
|
287
308
|
GEMINI_1_5_FLASH = "gemini-1.5-flash",
|
|
288
309
|
GEMINI_EMBEDDING = "gemini-embedding-001",
|
|
289
|
-
|
|
310
|
+
GEMINI_EMBEDDING_2_PREVIEW = "gemini-embedding-2-preview",
|
|
311
|
+
/** @deprecated SHUT DOWN Jan 14, 2026. Use GEMINI_EMBEDDING instead. */
|
|
290
312
|
TEXT_EMBEDDING_004 = "text-embedding-004"
|
|
291
313
|
}
|
|
292
314
|
/**
|
|
@@ -301,11 +323,17 @@ export declare enum AnthropicModels {
|
|
|
301
323
|
CLAUDE_OPUS_4_1 = "claude-opus-4-1-20250805",
|
|
302
324
|
CLAUDE_OPUS_4_0 = "claude-opus-4-20250514",
|
|
303
325
|
CLAUDE_SONNET_4_0 = "claude-sonnet-4-20250514",
|
|
326
|
+
/** @deprecated Retired from Anthropic API. Use CLAUDE_SONNET_4_6 instead. */
|
|
304
327
|
CLAUDE_SONNET_3_7 = "claude-3-7-sonnet-20250219",
|
|
328
|
+
/** @deprecated Retired from Anthropic API. Use CLAUDE_SONNET_4_6 instead. */
|
|
305
329
|
CLAUDE_3_5_SONNET = "claude-3-5-sonnet-20241022",
|
|
330
|
+
/** @deprecated Retired from Anthropic API. Use CLAUDE_SONNET_4_6 instead. */
|
|
306
331
|
CLAUDE_3_5_HAIKU = "claude-3-5-haiku-20241022",
|
|
332
|
+
/** @deprecated Retired from Anthropic API. Use CLAUDE_SONNET_4_6 instead. */
|
|
307
333
|
CLAUDE_3_SONNET = "claude-3-sonnet-20240229",
|
|
334
|
+
/** @deprecated Retired from Anthropic API. Use CLAUDE_SONNET_4_6 instead. */
|
|
308
335
|
CLAUDE_3_OPUS = "claude-3-opus-20240229",
|
|
336
|
+
/** @deprecated Retired from Anthropic API. Use CLAUDE_SONNET_4_6 instead. */
|
|
309
337
|
CLAUDE_3_HAIKU = "claude-3-haiku-20240307"
|
|
310
338
|
}
|
|
311
339
|
/**
|
|
@@ -341,7 +369,9 @@ export declare enum MistralModels {
|
|
|
341
369
|
MISTRAL_OCR_LATEST = "mistral-ocr-latest",
|
|
342
370
|
MISTRAL_NEMO = "mistral-nemo",
|
|
343
371
|
MISTRAL_EMBED = "mistral-embed",
|
|
344
|
-
MISTRAL_MODERATION_LATEST = "mistral-moderation-latest"
|
|
372
|
+
MISTRAL_MODERATION_LATEST = "mistral-moderation-latest",
|
|
373
|
+
MISTRAL_SMALL_4 = "mistral-small-2603",
|
|
374
|
+
MISTRAL_SMALL_CREATIVE = "mistral-small-creative"
|
|
345
375
|
}
|
|
346
376
|
/**
|
|
347
377
|
* Supported Models for Ollama (Local)
|
package/dist/constants/enums.js
CHANGED
|
@@ -78,12 +78,17 @@ export var BedrockModels;
|
|
|
78
78
|
BedrockModels["CLAUDE_4_1_OPUS"] = "anthropic.claude-opus-4-1-20250805-v1:0";
|
|
79
79
|
BedrockModels["CLAUDE_4_SONNET"] = "anthropic.claude-sonnet-4-20250514-v1:0";
|
|
80
80
|
// Claude 3.7 Series
|
|
81
|
+
/** @deprecated Retired from Anthropic API. Use CLAUDE_4_6_SONNET instead. */
|
|
81
82
|
BedrockModels["CLAUDE_3_7_SONNET"] = "anthropic.claude-3-7-sonnet-20250219-v1:0";
|
|
82
83
|
// Claude 3.5 Series
|
|
84
|
+
/** @deprecated Retired from Anthropic API. Use CLAUDE_4_6_SONNET instead. */
|
|
83
85
|
BedrockModels["CLAUDE_3_5_SONNET"] = "anthropic.claude-3-5-sonnet-20241022-v1:0";
|
|
86
|
+
/** @deprecated Retired from Anthropic API. Use CLAUDE_4_6_SONNET instead. */
|
|
84
87
|
BedrockModels["CLAUDE_3_5_HAIKU"] = "anthropic.claude-3-5-haiku-20241022-v1:0";
|
|
85
88
|
// Claude 3 Series (Legacy support)
|
|
89
|
+
/** @deprecated Retired from Anthropic API. Use CLAUDE_4_6_SONNET instead. */
|
|
86
90
|
BedrockModels["CLAUDE_3_SONNET"] = "anthropic.claude-3-sonnet-20240229-v1:0";
|
|
91
|
+
/** @deprecated Retired from Anthropic API. Use CLAUDE_4_6_SONNET instead. */
|
|
87
92
|
BedrockModels["CLAUDE_3_HAIKU"] = "anthropic.claude-3-haiku-20240307-v1:0";
|
|
88
93
|
// ============================================================================
|
|
89
94
|
// AMAZON NOVA MODELS
|
|
@@ -216,6 +221,11 @@ export var OpenAIModels;
|
|
|
216
221
|
(function (OpenAIModels) {
|
|
217
222
|
// GPT-5.3 Series (Released February 2026) - Latest coding models
|
|
218
223
|
OpenAIModels["GPT_5_3_CODEX"] = "gpt-5.3-codex";
|
|
224
|
+
// GPT-5.4 Series (Released March 2026) - Latest flagship models
|
|
225
|
+
OpenAIModels["GPT_5_4"] = "gpt-5.4";
|
|
226
|
+
OpenAIModels["GPT_5_4_MINI"] = "gpt-5.4-mini";
|
|
227
|
+
OpenAIModels["GPT_5_4_NANO"] = "gpt-5.4-nano";
|
|
228
|
+
OpenAIModels["GPT_5_4_PRO"] = "gpt-5.4-pro";
|
|
219
229
|
// GPT-5.2 Series (Released December 11, 2025) - Flagship models
|
|
220
230
|
OpenAIModels["GPT_5_2"] = "gpt-5.2";
|
|
221
231
|
OpenAIModels["GPT_5_2_CHAT_LATEST"] = "gpt-5.2-chat-latest";
|
|
@@ -250,7 +260,9 @@ export var OpenAIModels;
|
|
|
250
260
|
OpenAIModels["O3_PRO"] = "o3-pro";
|
|
251
261
|
OpenAIModels["O4_MINI"] = "o4-mini";
|
|
252
262
|
OpenAIModels["O1"] = "o1";
|
|
263
|
+
/** @deprecated Turned off Jul 14, 2025. Use GPT_4_1 or O3. */
|
|
253
264
|
OpenAIModels["O1_PREVIEW"] = "o1-preview";
|
|
265
|
+
/** @deprecated Replaced by o3-mini. */
|
|
254
266
|
OpenAIModels["O1_MINI"] = "o1-mini";
|
|
255
267
|
// GPT-4 Series (Legacy)
|
|
256
268
|
OpenAIModels["GPT_4"] = "gpt-4";
|
|
@@ -269,6 +281,10 @@ export var AzureOpenAIModels;
|
|
|
269
281
|
AzureOpenAIModels["GPT_5_2_CHAT"] = "gpt-5.2-chat";
|
|
270
282
|
AzureOpenAIModels["GPT_5_2_PRO"] = "gpt-5.2-pro";
|
|
271
283
|
AzureOpenAIModels["GPT_5_2_CODEX"] = "gpt-5.2-codex";
|
|
284
|
+
// GPT-5.4 Series (March 2026)
|
|
285
|
+
AzureOpenAIModels["GPT_5_4"] = "gpt-5.4";
|
|
286
|
+
AzureOpenAIModels["GPT_5_4_MINI"] = "gpt-5.4-mini";
|
|
287
|
+
AzureOpenAIModels["GPT_5_4_NANO"] = "gpt-5.4-nano";
|
|
272
288
|
// GPT-5.1 Series (October 2025)
|
|
273
289
|
AzureOpenAIModels["GPT_5_1"] = "gpt-5.1";
|
|
274
290
|
AzureOpenAIModels["GPT_5_1_CHAT"] = "gpt-5.1-chat";
|
|
@@ -323,13 +339,19 @@ export var VertexModels;
|
|
|
323
339
|
VertexModels["CLAUDE_4_0_SONNET"] = "claude-sonnet-4@20250514";
|
|
324
340
|
VertexModels["CLAUDE_4_0_OPUS"] = "claude-opus-4@20250514";
|
|
325
341
|
// Claude 3.7 Series (February 2025)
|
|
342
|
+
/** @deprecated Retired from Anthropic API. Use CLAUDE_4_6_SONNET instead. */
|
|
326
343
|
VertexModels["CLAUDE_3_7_SONNET"] = "claude-3-7-sonnet@20250219";
|
|
327
344
|
// Claude 3.5 Series (Still supported)
|
|
345
|
+
/** @deprecated Retired from Anthropic API. Use CLAUDE_4_6_SONNET instead. */
|
|
328
346
|
VertexModels["CLAUDE_3_5_SONNET"] = "claude-3-5-sonnet-20241022";
|
|
347
|
+
/** @deprecated Retired from Anthropic API. Use CLAUDE_4_6_SONNET instead. */
|
|
329
348
|
VertexModels["CLAUDE_3_5_HAIKU"] = "claude-3-5-haiku-20241022";
|
|
330
349
|
// Claude 3 Series (Legacy support)
|
|
350
|
+
/** @deprecated Retired from Anthropic API. Use CLAUDE_4_6_SONNET instead. */
|
|
331
351
|
VertexModels["CLAUDE_3_SONNET"] = "claude-3-sonnet-20240229";
|
|
352
|
+
/** @deprecated Retired from Anthropic API. Use CLAUDE_4_6_SONNET instead. */
|
|
332
353
|
VertexModels["CLAUDE_3_OPUS"] = "claude-3-opus-20240229";
|
|
354
|
+
/** @deprecated Retired from Anthropic API. Use CLAUDE_4_6_SONNET instead. */
|
|
333
355
|
VertexModels["CLAUDE_3_HAIKU"] = "claude-3-haiku-20240307";
|
|
334
356
|
// Gemini 3.1 Series (Released March 2026)
|
|
335
357
|
VertexModels["GEMINI_3_1_PRO"] = "gemini-3.1-pro";
|
|
@@ -355,9 +377,9 @@ export var VertexModels;
|
|
|
355
377
|
VertexModels["GEMINI_2_0_FLASH_001"] = "gemini-2.0-flash-001";
|
|
356
378
|
VertexModels["GEMINI_2_0_FLASH_LITE"] = "gemini-2.0-flash-lite";
|
|
357
379
|
// Gemini 1.5 Series (Retired - returns 404)
|
|
358
|
-
/** @deprecated
|
|
380
|
+
/** @deprecated SHUT DOWN. Returns 404. Use GEMINI_2_5_FLASH or newer. */
|
|
359
381
|
VertexModels["GEMINI_1_5_PRO"] = "gemini-1.5-pro-002";
|
|
360
|
-
/** @deprecated
|
|
382
|
+
/** @deprecated SHUT DOWN. Returns 404. Use GEMINI_2_5_FLASH or newer. */
|
|
361
383
|
VertexModels["GEMINI_1_5_FLASH"] = "gemini-1.5-flash-002";
|
|
362
384
|
})(VertexModels || (VertexModels = {}));
|
|
363
385
|
/**
|
|
@@ -384,18 +406,20 @@ export var GoogleAIModels;
|
|
|
384
406
|
GoogleAIModels["GEMINI_2_5_FLASH_PREVIEW_TTS"] = "gemini-2.5-flash-preview-tts";
|
|
385
407
|
GoogleAIModels["GEMINI_2_5_PRO_PREVIEW_TTS"] = "gemini-2.5-pro-preview-tts";
|
|
386
408
|
// Gemini 2.0 Series (Deprecated - retiring Jun 2026)
|
|
409
|
+
/** @deprecated Retiring June 1, 2026. Use GEMINI_2_5_FLASH instead. */
|
|
387
410
|
GoogleAIModels["GEMINI_2_0_FLASH"] = "gemini-2.0-flash";
|
|
388
411
|
GoogleAIModels["GEMINI_2_0_FLASH_001"] = "gemini-2.0-flash-001";
|
|
389
412
|
GoogleAIModels["GEMINI_2_0_FLASH_LITE"] = "gemini-2.0-flash-lite";
|
|
390
413
|
GoogleAIModels["GEMINI_2_0_FLASH_IMAGE"] = "gemini-2.0-flash-preview-image-generation";
|
|
391
414
|
// Gemini 1.5 Series (Retired - returns 404)
|
|
392
|
-
/** @deprecated
|
|
415
|
+
/** @deprecated SHUT DOWN. Returns 404. Use GEMINI_2_5_FLASH or newer. */
|
|
393
416
|
GoogleAIModels["GEMINI_1_5_PRO"] = "gemini-1.5-pro";
|
|
394
|
-
/** @deprecated
|
|
417
|
+
/** @deprecated SHUT DOWN. Returns 404. Use GEMINI_2_5_FLASH or newer. */
|
|
395
418
|
GoogleAIModels["GEMINI_1_5_FLASH"] = "gemini-1.5-flash";
|
|
396
419
|
// Embedding Models
|
|
397
420
|
GoogleAIModels["GEMINI_EMBEDDING"] = "gemini-embedding-001";
|
|
398
|
-
|
|
421
|
+
GoogleAIModels["GEMINI_EMBEDDING_2_PREVIEW"] = "gemini-embedding-2-preview";
|
|
422
|
+
/** @deprecated SHUT DOWN Jan 14, 2026. Use GEMINI_EMBEDDING instead. */
|
|
399
423
|
GoogleAIModels["TEXT_EMBEDDING_004"] = "text-embedding-004";
|
|
400
424
|
})(GoogleAIModels || (GoogleAIModels = {}));
|
|
401
425
|
/**
|
|
@@ -416,13 +440,19 @@ export var AnthropicModels;
|
|
|
416
440
|
AnthropicModels["CLAUDE_OPUS_4_0"] = "claude-opus-4-20250514";
|
|
417
441
|
AnthropicModels["CLAUDE_SONNET_4_0"] = "claude-sonnet-4-20250514";
|
|
418
442
|
// Claude 3.7 Series (Legacy)
|
|
443
|
+
/** @deprecated Retired from Anthropic API. Use CLAUDE_SONNET_4_6 instead. */
|
|
419
444
|
AnthropicModels["CLAUDE_SONNET_3_7"] = "claude-3-7-sonnet-20250219";
|
|
420
445
|
// Claude 3.5 Series (Legacy)
|
|
446
|
+
/** @deprecated Retired from Anthropic API. Use CLAUDE_SONNET_4_6 instead. */
|
|
421
447
|
AnthropicModels["CLAUDE_3_5_SONNET"] = "claude-3-5-sonnet-20241022";
|
|
448
|
+
/** @deprecated Retired from Anthropic API. Use CLAUDE_SONNET_4_6 instead. */
|
|
422
449
|
AnthropicModels["CLAUDE_3_5_HAIKU"] = "claude-3-5-haiku-20241022";
|
|
423
450
|
// Claude 3 Series (Legacy - Deprecated)
|
|
451
|
+
/** @deprecated Retired from Anthropic API. Use CLAUDE_SONNET_4_6 instead. */
|
|
424
452
|
AnthropicModels["CLAUDE_3_SONNET"] = "claude-3-sonnet-20240229";
|
|
453
|
+
/** @deprecated Retired from Anthropic API. Use CLAUDE_SONNET_4_6 instead. */
|
|
425
454
|
AnthropicModels["CLAUDE_3_OPUS"] = "claude-3-opus-20240229";
|
|
455
|
+
/** @deprecated Retired from Anthropic API. Use CLAUDE_SONNET_4_6 instead. */
|
|
426
456
|
AnthropicModels["CLAUDE_3_HAIKU"] = "claude-3-haiku-20240307";
|
|
427
457
|
})(AnthropicModels || (AnthropicModels = {}));
|
|
428
458
|
/**
|
|
@@ -474,6 +504,9 @@ export var MistralModels;
|
|
|
474
504
|
MistralModels["MISTRAL_NEMO"] = "mistral-nemo";
|
|
475
505
|
MistralModels["MISTRAL_EMBED"] = "mistral-embed";
|
|
476
506
|
MistralModels["MISTRAL_MODERATION_LATEST"] = "mistral-moderation-latest";
|
|
507
|
+
// Mistral Small 4 Series (June 2026)
|
|
508
|
+
MistralModels["MISTRAL_SMALL_4"] = "mistral-small-2603";
|
|
509
|
+
MistralModels["MISTRAL_SMALL_CREATIVE"] = "mistral-small-creative";
|
|
477
510
|
})(MistralModels || (MistralModels = {}));
|
|
478
511
|
/**
|
|
479
512
|
* Supported Models for Ollama (Local)
|
|
@@ -71,6 +71,10 @@ export declare const PROVIDER_TOKEN_LIMITS: {
|
|
|
71
71
|
};
|
|
72
72
|
/** OpenAI model limits */
|
|
73
73
|
readonly OPENAI: {
|
|
74
|
+
readonly "gpt-5.4": 128000;
|
|
75
|
+
readonly "gpt-5.4-mini": 128000;
|
|
76
|
+
readonly "gpt-5.4-nano": 128000;
|
|
77
|
+
readonly "gpt-5.4-pro": 128000;
|
|
74
78
|
readonly "gpt-4o": 16384;
|
|
75
79
|
readonly "gpt-4o-mini": 16384;
|
|
76
80
|
readonly "gpt-3.5-turbo": 4096;
|
package/dist/constants/tokens.js
CHANGED
|
@@ -74,6 +74,10 @@ export const PROVIDER_TOKEN_LIMITS = {
|
|
|
74
74
|
},
|
|
75
75
|
/** OpenAI model limits */
|
|
76
76
|
OPENAI: {
|
|
77
|
+
"gpt-5.4": 128_000,
|
|
78
|
+
"gpt-5.4-mini": 128_000,
|
|
79
|
+
"gpt-5.4-nano": 128_000,
|
|
80
|
+
"gpt-5.4-pro": 128_000,
|
|
77
81
|
"gpt-4o": 16384,
|
|
78
82
|
"gpt-4o-mini": 16384,
|
|
79
83
|
"gpt-3.5-turbo": 4096,
|
|
@@ -318,6 +318,32 @@ export class ToolsManager {
|
|
|
318
318
|
const startTime = Date.now();
|
|
319
319
|
let executionId;
|
|
320
320
|
try {
|
|
321
|
+
// Route through NeuroLink.executeTool() when available for MCP enhancement support
|
|
322
|
+
// (cache, middleware, annotations, circuit breaker, routing)
|
|
323
|
+
if (this.toolExecutor) {
|
|
324
|
+
const result = await this.toolExecutor(toolName, params);
|
|
325
|
+
const convertedResult = this.utilities?.convertToolResult
|
|
326
|
+
? await this.utilities.convertToolResult(result)
|
|
327
|
+
: result;
|
|
328
|
+
const endTime = Date.now();
|
|
329
|
+
customToolSpan.setAttribute("tool.duration_ms", endTime - startTime);
|
|
330
|
+
let errorResult = undefined;
|
|
331
|
+
if (convertedResult &&
|
|
332
|
+
typeof convertedResult === "object" &&
|
|
333
|
+
"isError" in convertedResult &&
|
|
334
|
+
convertedResult.isError) {
|
|
335
|
+
try {
|
|
336
|
+
errorResult = JSON.stringify(convertedResult);
|
|
337
|
+
}
|
|
338
|
+
catch (error) {
|
|
339
|
+
logger.error(`Failed to serialize error result for ${toolName}`, error);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
customToolSpan.setAttribute("tool.result.status", errorResult ? "error" : "success");
|
|
343
|
+
customToolSpan.setStatus({ code: SpanStatusCode.OK });
|
|
344
|
+
return convertedResult;
|
|
345
|
+
}
|
|
346
|
+
// Fallback: direct execution (standalone usage without NeuroLink SDK)
|
|
321
347
|
if (this.neurolink?.emitToolStart) {
|
|
322
348
|
executionId = this.neurolink.emitToolStart(toolName, params, startTime);
|
|
323
349
|
}
|
|
@@ -350,8 +376,9 @@ export class ToolsManager {
|
|
|
350
376
|
catch (error) {
|
|
351
377
|
const endTime = Date.now();
|
|
352
378
|
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
353
|
-
// Emit tool end event (error)
|
|
354
|
-
|
|
379
|
+
// Emit tool end event (error) — only for fallback path
|
|
380
|
+
// When toolExecutor is used, executeTool() handles event emission
|
|
381
|
+
if (!this.toolExecutor && this.neurolink?.emitToolEnd) {
|
|
355
382
|
this.neurolink.emitToolEnd(toolName, undefined, // no result
|
|
356
383
|
errorMsg, startTime, endTime, executionId);
|
|
357
384
|
logger.debug(`Custom tool error: ${toolName} (${endTime - startTime}ms)`, { error: errorMsg });
|
package/dist/index.d.ts
CHANGED
|
@@ -200,7 +200,8 @@ export declare function createBestAIProvider(requestedProvider?: string, modelNa
|
|
|
200
200
|
* await writeFile('output.txt', 'Hello from MCP!');
|
|
201
201
|
* ```
|
|
202
202
|
*/
|
|
203
|
-
export { CircuitBreakerManager, calculateExpiresAt, createMCPServer, createOAuthProviderFromConfig, DEFAULT_HTTP_RETRY_CONFIG, DEFAULT_RATE_LIMIT_CONFIG, executeMCP, FileTokenStorage, getMCPStats, getServerInfo, globalCircuitBreakerManager, globalRateLimiterManager, HTTPRateLimiter, InMemoryTokenStorage, initializeMCPEcosystem, isRetryableHTTPError, isRetryableStatusCode, isTokenExpired, listMCPs, MCPCircuitBreaker, mcpLogger, NeuroLinkOAuthProvider, RateLimiterManager, validateServerTools, validateTool as validateMCPTool, withHTTPRetry, } from "./mcp/index.js";
|
|
203
|
+
export { CircuitBreakerManager, calculateExpiresAt, createMCPServer, createOAuthProviderFromConfig, DEFAULT_HTTP_RETRY_CONFIG, DEFAULT_RATE_LIMIT_CONFIG, executeMCP, FileTokenStorage, getMCPStats, getServerInfo, globalCircuitBreakerManager, globalRateLimiterManager, HTTPRateLimiter, InMemoryTokenStorage, initializeMCPEcosystem, isRetryableHTTPError, isRetryableStatusCode, isTokenExpired, listMCPs, MCPCircuitBreaker, mcpLogger, NeuroLinkOAuthProvider, RateLimiterManager, validateServerTools, validateTool as validateMCPTool, withHTTPRetry, MCPToolRegistry, ExternalServerManager, MCPClientFactory, ToolRouter, createToolRouter, DEFAULT_ROUTER_CONFIG, ToolCache, createToolCache, DEFAULT_CACHE_CONFIG, ToolResultCache, createToolResultCache, RequestBatcher, ToolCallBatcher, createRequestBatcher, createToolCallBatcher, DEFAULT_BATCH_CONFIG, inferAnnotations, createAnnotatedTool, validateAnnotations, filterToolsByAnnotations, mergeAnnotations, getAnnotationSummary, requiresConfirmation, isSafeToRetry, getToolSafetyLevel, ElicitationManager, globalElicitationManager, EnhancedToolDiscovery, MCPRegistryClient, globalMCPRegistryClient, getWellKnownServer, getAllWellKnownServers, MCPServerBase, MultiServerManager, globalMultiServerManager, AgentExposureManager, exposeAgentAsTool, exposeAgentsAsTools, exposeWorkflowAsTool, exposeWorkflowsAsTools, globalAgentExposureManager, ServerCapabilitiesManager, createTextResource, createJsonResource, createPrompt, neuroLinkToolToMCP, mcpToolToNeuroLink, batchConvertToMCP, batchConvertToNeuroLink, sanitizeToolName, validateToolName, createToolFromFunction, mcpProtocolToolToServerTool, serverToolToMCPProtocol, TOOL_COMPATIBILITY, ToolIntegrationManager, globalToolIntegrationManager, wrapToolWithElicitation, wrapToolsWithElicitation, createElicitationContext, confirmationMiddleware, validationMiddleware, loggingMiddleware, createRetryMiddleware, createTimeoutMiddleware, createToolMiddlewareChain, ElicitationProtocolAdapter, globalElicitationProtocol, isElicitationProtocolMessage, protocolMessageToElicitation, elicitationResponseToProtocol, createElicitationRequest, createElicitationResponse, createElicitationCancel, createTextInputRequest, createSelectRequest, createConfirmationRequest, createFormRequest, } from "./mcp/index.js";
|
|
204
|
+
export type { RoutingStrategy, ToolRouterConfig, RoutingDecision, MCPTool, ToolRouterEvents, AffinityRule, CategoryMapping, RouterServerWeight, CacheStrategy, CacheConfig as MCPCacheConfig, CacheStats, CacheEvents, BatchConfig, BatchResult, BatchExecutor, BatcherEvents, MCPToolAnnotations, MCPServerTool, ToolConverterOptions, MCPProtocolTool, NeuroLinkTool, ToolMiddleware, EnhancedExecutionContext, ToolWrapperOptions, ExposableAgent, ExposableWorkflow, ExposureOptions, ExposureResult, MCPResource, MCPPrompt, ServerCapabilitiesConfig, PromptGenerator, PromptMessage, PromptResult, RegisteredPrompt, RegisteredResource, ResourceContent, ResourceReader, ResourceSubscriptionCallback, RegistryEntry, RegistrySearchOptions, RegistrySearchResult, RegistrySourceType, RegistryConfig, MCPRegistryClientConfig, LoadBalancingStrategy, ServerGroup, UnifiedTool, MultiServerManagerConfig, ServerWeight, MCPServerBaseConfig, MCPServerEvents, EnhancedToolInfo, ToolSearchCriteria, ToolSearchResult, CompatibilityCheckResult, ElicitationType, Elicitation, ElicitationResponse, ElicitationHandler, ElicitationManagerConfig, ElicitationRequest, ElicitationContext, TextElicitation, SelectElicitation, SelectOption, MultiSelectElicitation, ConfirmationElicitation, FileElicitation, SecretElicitation, FormElicitation, FormField, ElicitationProtocolMessage, ElicitationProtocolMessageType, ElicitationProtocolPayload, ElicitationProtocolHandler, ElicitationProtocolAdapterConfig, ElicitationRequestMessage, ElicitationRequestParams, ElicitationResponseMessage, ElicitationResponseParams, ElicitationCancelMessage, ElicitationCancelParams, } from "./mcp/index.js";
|
|
204
205
|
export type { AuthorizationUrlResult, DiscoveredMcp, HTTPRetryConfig, MCPOAuthConfig, McpMetadata, OAuthClientInformation, OAuthTokens as McpOAuthTokens, RateLimitConfig, TokenExchangeRequest, TokenStorage, } from "./types/mcpTypes.js";
|
|
205
206
|
export type { ExecutionContext, ToolExecutionResult, ToolInfo, } from "./types/tools.js";
|
|
206
207
|
export type { LogLevel } from "./types/utilities.js";
|
package/dist/index.js
CHANGED
|
@@ -237,7 +237,33 @@ InMemoryTokenStorage,
|
|
|
237
237
|
// Simplified MCP exports
|
|
238
238
|
initializeMCPEcosystem, isRetryableHTTPError, isRetryableStatusCode, isTokenExpired, listMCPs,
|
|
239
239
|
// Circuit Breaker
|
|
240
|
-
MCPCircuitBreaker, mcpLogger, NeuroLinkOAuthProvider, RateLimiterManager, validateServerTools, validateTool as validateMCPTool, withHTTPRetry,
|
|
240
|
+
MCPCircuitBreaker, mcpLogger, NeuroLinkOAuthProvider, RateLimiterManager, validateServerTools, validateTool as validateMCPTool, withHTTPRetry,
|
|
241
|
+
// Core MCP Components
|
|
242
|
+
MCPToolRegistry, ExternalServerManager, MCPClientFactory,
|
|
243
|
+
// MCP Enhancements - Routing, Caching, Batching
|
|
244
|
+
ToolRouter, createToolRouter, DEFAULT_ROUTER_CONFIG, ToolCache, createToolCache, DEFAULT_CACHE_CONFIG, ToolResultCache, createToolResultCache, RequestBatcher, ToolCallBatcher, createRequestBatcher, createToolCallBatcher, DEFAULT_BATCH_CONFIG,
|
|
245
|
+
// MCP Enhancements - Tool Annotations
|
|
246
|
+
inferAnnotations, createAnnotatedTool, validateAnnotations, filterToolsByAnnotations, mergeAnnotations, getAnnotationSummary, requiresConfirmation, isSafeToRetry, getToolSafetyLevel,
|
|
247
|
+
// MCP Enhancements - Elicitation
|
|
248
|
+
ElicitationManager, globalElicitationManager,
|
|
249
|
+
// MCP Enhancements - Enhanced Tool Discovery
|
|
250
|
+
EnhancedToolDiscovery,
|
|
251
|
+
// MCP Enhancements - Registry Client
|
|
252
|
+
MCPRegistryClient, globalMCPRegistryClient, getWellKnownServer, getAllWellKnownServers,
|
|
253
|
+
// MCP Enhancements - Server Base
|
|
254
|
+
MCPServerBase,
|
|
255
|
+
// MCP Enhancements - Multi-Server Manager
|
|
256
|
+
MultiServerManager, globalMultiServerManager,
|
|
257
|
+
// MCP Enhancements - Agent Exposure
|
|
258
|
+
AgentExposureManager, exposeAgentAsTool, exposeAgentsAsTools, exposeWorkflowAsTool, exposeWorkflowsAsTools, globalAgentExposureManager,
|
|
259
|
+
// MCP Enhancements - Server Capabilities
|
|
260
|
+
ServerCapabilitiesManager, createTextResource, createJsonResource, createPrompt,
|
|
261
|
+
// MCP Enhancements - Tool Converter
|
|
262
|
+
neuroLinkToolToMCP, mcpToolToNeuroLink, batchConvertToMCP, batchConvertToNeuroLink, sanitizeToolName, validateToolName, createToolFromFunction, mcpProtocolToolToServerTool, serverToolToMCPProtocol, TOOL_COMPATIBILITY,
|
|
263
|
+
// MCP Enhancements - Tool Integration
|
|
264
|
+
ToolIntegrationManager, globalToolIntegrationManager, wrapToolWithElicitation, wrapToolsWithElicitation, createElicitationContext, confirmationMiddleware, validationMiddleware, loggingMiddleware, createRetryMiddleware, createTimeoutMiddleware, createToolMiddlewareChain,
|
|
265
|
+
// MCP Enhancements - Elicitation Protocol
|
|
266
|
+
ElicitationProtocolAdapter, globalElicitationProtocol, isElicitationProtocolMessage, protocolMessageToElicitation, elicitationResponseToProtocol, createElicitationRequest, createElicitationResponse, createElicitationCancel, createTextInputRequest, createSelectRequest, createConfirmationRequest, createFormRequest, } from "./mcp/index.js";
|
|
241
267
|
export { logger } from "./utils/logger.js";
|
|
242
268
|
export { getPoolStats } from "./utils/redis.js";
|
|
243
269
|
// ============================================================================
|
|
@@ -62,7 +62,12 @@ function normalizeVisionProvider(provider) {
|
|
|
62
62
|
*/
|
|
63
63
|
const VISION_CAPABILITIES = {
|
|
64
64
|
openai: [
|
|
65
|
-
// GPT-5.
|
|
65
|
+
// GPT-5.4 family (released Mar 2026) - Latest flagship models
|
|
66
|
+
"gpt-5.4",
|
|
67
|
+
"gpt-5.4-mini",
|
|
68
|
+
"gpt-5.4-nano",
|
|
69
|
+
"gpt-5.4-pro",
|
|
70
|
+
// GPT-5.2 family (released Dec 11, 2025)
|
|
66
71
|
"gpt-5.2",
|
|
67
72
|
"gpt-5.2-chat-latest",
|
|
68
73
|
"gpt-5.2-pro",
|
|
@@ -118,6 +123,9 @@ const VISION_CAPABILITIES = {
|
|
|
118
123
|
"gemini-pro-vision",
|
|
119
124
|
],
|
|
120
125
|
anthropic: [
|
|
126
|
+
// Claude 4.6 Series (February 2026)
|
|
127
|
+
"claude-opus-4-6",
|
|
128
|
+
"claude-sonnet-4-6",
|
|
121
129
|
// Claude 4.5 Series (September-November 2025)
|
|
122
130
|
"claude-sonnet-4-5",
|
|
123
131
|
"claude-sonnet-4-5-20250929",
|
|
@@ -25,9 +25,9 @@ export const DEFAULT_OUTPUT_RESERVE_RATIO = 0.35;
|
|
|
25
25
|
export const MODEL_CONTEXT_WINDOWS = {
|
|
26
26
|
anthropic: {
|
|
27
27
|
_default: 200_000,
|
|
28
|
-
// Claude 4.6 (Feb 2026) —
|
|
29
|
-
"claude-opus-4-6":
|
|
30
|
-
"claude-sonnet-4-6":
|
|
28
|
+
// Claude 4.6 (Feb 2026) — 1M context window
|
|
29
|
+
"claude-opus-4-6": 1_000_000,
|
|
30
|
+
"claude-sonnet-4-6": 1_000_000,
|
|
31
31
|
// Claude 4.5
|
|
32
32
|
"claude-opus-4-5-20251101": 200_000,
|
|
33
33
|
"claude-sonnet-4-5-20250929": 200_000,
|
|
@@ -46,6 +46,11 @@ export const MODEL_CONTEXT_WINDOWS = {
|
|
|
46
46
|
},
|
|
47
47
|
openai: {
|
|
48
48
|
_default: 128_000,
|
|
49
|
+
// GPT-5.4 family — 1.05M context
|
|
50
|
+
"gpt-5.4": 1_050_000,
|
|
51
|
+
"gpt-5.4-mini": 400_000,
|
|
52
|
+
"gpt-5.4-nano": 400_000,
|
|
53
|
+
"gpt-5.4-pro": 1_050_000,
|
|
49
54
|
// GPT-5.x family — 400K context
|
|
50
55
|
"gpt-5.3-codex": 400_000,
|
|
51
56
|
"gpt-5.2": 400_000,
|
|
@@ -108,8 +113,8 @@ export const MODEL_CONTEXT_WINDOWS = {
|
|
|
108
113
|
vertex: {
|
|
109
114
|
_default: 1_048_576,
|
|
110
115
|
// Claude on Vertex
|
|
111
|
-
"claude-opus-4-6":
|
|
112
|
-
"claude-sonnet-4-6":
|
|
116
|
+
"claude-opus-4-6": 1_000_000,
|
|
117
|
+
"claude-sonnet-4-6": 1_000_000,
|
|
113
118
|
"claude-sonnet-4-5": 200_000,
|
|
114
119
|
"claude-opus-4-5": 200_000,
|
|
115
120
|
"claude-haiku-4-5": 200_000,
|
|
@@ -136,8 +141,8 @@ export const MODEL_CONTEXT_WINDOWS = {
|
|
|
136
141
|
bedrock: {
|
|
137
142
|
_default: 200_000,
|
|
138
143
|
// Claude 4.6
|
|
139
|
-
"anthropic.claude-opus-4-6-v1:0":
|
|
140
|
-
"anthropic.claude-sonnet-4-6":
|
|
144
|
+
"anthropic.claude-opus-4-6-v1:0": 1_000_000,
|
|
145
|
+
"anthropic.claude-sonnet-4-6": 1_000_000,
|
|
141
146
|
// Claude 4.5
|
|
142
147
|
"anthropic.claude-opus-4-5-20251124-v1:0": 200_000,
|
|
143
148
|
"anthropic.claude-sonnet-4-5-20250929-v1:0": 200_000,
|
|
@@ -160,6 +165,11 @@ export const MODEL_CONTEXT_WINDOWS = {
|
|
|
160
165
|
},
|
|
161
166
|
azure: {
|
|
162
167
|
_default: 128_000,
|
|
168
|
+
// GPT-5.4
|
|
169
|
+
"gpt-5.4": 1_050_000,
|
|
170
|
+
"gpt-5.4-mini": 400_000,
|
|
171
|
+
"gpt-5.4-nano": 400_000,
|
|
172
|
+
"gpt-5.4-pro": 1_050_000,
|
|
163
173
|
// GPT-5.x
|
|
164
174
|
"gpt-5.2": 400_000,
|
|
165
175
|
"gpt-5.2-pro": 400_000,
|
|
@@ -192,6 +202,7 @@ export const MODEL_CONTEXT_WINDOWS = {
|
|
|
192
202
|
"devstral-2512": 256_000,
|
|
193
203
|
"devstral-small-2512": 256_000,
|
|
194
204
|
"magistral-medium-latest": 128_000,
|
|
205
|
+
"mistral-small-2603": 256_000,
|
|
195
206
|
},
|
|
196
207
|
ollama: {
|
|
197
208
|
_default: 128_000,
|