@juspay/neurolink 6.1.0 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -6
- package/dist/cli/commands/config.d.ts +13 -13
- package/dist/cli/index.js +3 -9
- package/dist/core/analytics.d.ts +11 -1
- package/dist/core/analytics.js +2 -2
- package/dist/core/base-provider.js +4 -18
- package/dist/core/dynamic-models.d.ts +8 -8
- package/dist/core/factory.js +3 -11
- package/dist/index.d.ts +2 -4
- package/dist/index.js +2 -11
- package/dist/lib/core/analytics.d.ts +11 -1
- package/dist/lib/core/analytics.js +2 -2
- package/dist/lib/core/base-provider.js +4 -18
- package/dist/lib/core/dynamic-models.d.ts +8 -8
- package/dist/lib/core/factory.js +3 -11
- package/dist/lib/index.d.ts +2 -4
- package/dist/lib/index.js +2 -11
- package/dist/lib/mcp/factory.d.ts +1 -1
- package/dist/lib/mcp/index.d.ts +7 -19
- package/dist/lib/mcp/index.js +15 -56
- package/dist/lib/neurolink.d.ts +1 -9
- package/dist/lib/neurolink.js +21 -70
- package/dist/lib/providers/amazon-bedrock.js +5 -16
- package/dist/lib/providers/anthropic-baseprovider.js +3 -21
- package/dist/lib/providers/anthropic.js +4 -7
- package/dist/lib/providers/azure-openai.js +4 -2
- package/dist/lib/providers/google-vertex.js +5 -9
- package/dist/lib/providers/huggingFace.js +5 -10
- package/dist/lib/providers/mistral.js +5 -8
- package/dist/lib/providers/openAI.js +4 -7
- package/dist/lib/utils/providerConfig.d.ts +117 -0
- package/dist/lib/utils/providerConfig.js +353 -0
- package/dist/lib/utils/providerUtils.d.ts +2 -1
- package/dist/lib/utils/providerUtils.js +53 -36
- package/dist/lib/utils/timeout.d.ts +72 -1
- package/dist/lib/utils/timeout.js +203 -2
- package/dist/mcp/factory.d.ts +1 -1
- package/dist/mcp/index.d.ts +7 -19
- package/dist/mcp/index.js +15 -56
- package/dist/neurolink.d.ts +1 -9
- package/dist/neurolink.js +21 -70
- package/dist/providers/amazon-bedrock.js +5 -16
- package/dist/providers/anthropic-baseprovider.js +3 -21
- package/dist/providers/anthropic.js +4 -7
- package/dist/providers/azure-openai.js +4 -2
- package/dist/providers/google-vertex.js +5 -9
- package/dist/providers/huggingFace.js +5 -10
- package/dist/providers/mistral.js +5 -8
- package/dist/providers/openAI.js +4 -7
- package/dist/utils/providerConfig.d.ts +117 -0
- package/dist/utils/providerConfig.js +353 -0
- package/dist/utils/providerUtils.d.ts +2 -1
- package/dist/utils/providerUtils.js +53 -36
- package/dist/utils/timeout.d.ts +72 -1
- package/dist/utils/timeout.js +203 -2
- package/package.json +1 -1
- package/dist/chat/client-utils.d.ts +0 -95
- package/dist/chat/client-utils.js +0 -315
- package/dist/chat/index.d.ts +0 -24
- package/dist/chat/index.js +0 -33
- package/dist/chat/session-storage.d.ts +0 -77
- package/dist/chat/session-storage.js +0 -233
- package/dist/chat/session.d.ts +0 -96
- package/dist/chat/session.js +0 -257
- package/dist/chat/sse-handler.d.ts +0 -49
- package/dist/chat/sse-handler.js +0 -259
- package/dist/chat/types.d.ts +0 -74
- package/dist/chat/types.js +0 -5
- package/dist/chat/websocket-chat-handler.d.ts +0 -37
- package/dist/chat/websocket-chat-handler.js +0 -262
- package/dist/cli/commands/mcp.d.ts +0 -20
- package/dist/cli/commands/mcp.js +0 -1272
- package/dist/core/defaults.d.ts +0 -19
- package/dist/core/defaults.js +0 -29
- package/dist/core/evaluation-config.d.ts +0 -29
- package/dist/core/evaluation-config.js +0 -144
- package/dist/factories/compatibility-factory.d.ts +0 -35
- package/dist/factories/compatibility-factory.js +0 -71
- package/dist/factories/provider-generate-factory.d.ts +0 -20
- package/dist/factories/provider-generate-factory.js +0 -93
- package/dist/lib/chat/client-utils.d.ts +0 -95
- package/dist/lib/chat/client-utils.js +0 -315
- package/dist/lib/chat/index.d.ts +0 -24
- package/dist/lib/chat/index.js +0 -33
- package/dist/lib/chat/session-storage.d.ts +0 -77
- package/dist/lib/chat/session-storage.js +0 -233
- package/dist/lib/chat/session.d.ts +0 -96
- package/dist/lib/chat/session.js +0 -257
- package/dist/lib/chat/sse-handler.d.ts +0 -49
- package/dist/lib/chat/sse-handler.js +0 -259
- package/dist/lib/chat/types.d.ts +0 -74
- package/dist/lib/chat/types.js +0 -5
- package/dist/lib/chat/websocket-chat-handler.d.ts +0 -37
- package/dist/lib/chat/websocket-chat-handler.js +0 -262
- package/dist/lib/core/defaults.d.ts +0 -19
- package/dist/lib/core/defaults.js +0 -29
- package/dist/lib/core/evaluation-config.d.ts +0 -29
- package/dist/lib/core/evaluation-config.js +0 -144
- package/dist/lib/factories/compatibility-factory.d.ts +0 -35
- package/dist/lib/factories/compatibility-factory.js +0 -71
- package/dist/lib/factories/provider-generate-factory.d.ts +0 -20
- package/dist/lib/factories/provider-generate-factory.js +0 -93
- package/dist/lib/mcp/adapters/plugin-bridge.d.ts +0 -40
- package/dist/lib/mcp/adapters/plugin-bridge.js +0 -89
- package/dist/lib/mcp/auto-discovery.d.ts +0 -62
- package/dist/lib/mcp/auto-discovery.js +0 -149
- package/dist/lib/mcp/client.d.ts +0 -68
- package/dist/lib/mcp/client.js +0 -248
- package/dist/lib/mcp/config.d.ts +0 -31
- package/dist/lib/mcp/config.js +0 -99
- package/dist/lib/mcp/context-manager.d.ts +0 -171
- package/dist/lib/mcp/context-manager.js +0 -362
- package/dist/lib/mcp/contracts/mcp-contract.d.ts +0 -169
- package/dist/lib/mcp/contracts/mcp-contract.js +0 -58
- package/dist/lib/mcp/core/plugin-manager.d.ts +0 -46
- package/dist/lib/mcp/core/plugin-manager.js +0 -110
- package/dist/lib/mcp/demo/plugin-demo.d.ts +0 -20
- package/dist/lib/mcp/demo/plugin-demo.js +0 -118
- package/dist/lib/mcp/dynamic-chain-executor.d.ts +0 -225
- package/dist/lib/mcp/dynamic-chain-executor.js +0 -489
- package/dist/lib/mcp/dynamic-orchestrator.d.ts +0 -115
- package/dist/lib/mcp/dynamic-orchestrator.js +0 -351
- package/dist/lib/mcp/ecosystem.d.ts +0 -75
- package/dist/lib/mcp/ecosystem.js +0 -161
- package/dist/lib/mcp/error-manager.d.ts +0 -254
- package/dist/lib/mcp/error-manager.js +0 -501
- package/dist/lib/mcp/error-recovery.d.ts +0 -159
- package/dist/lib/mcp/error-recovery.js +0 -405
- package/dist/lib/mcp/external-client.d.ts +0 -88
- package/dist/lib/mcp/external-client.js +0 -331
- package/dist/lib/mcp/external-manager.d.ts +0 -112
- package/dist/lib/mcp/external-manager.js +0 -308
- package/dist/lib/mcp/function-calling.d.ts +0 -65
- package/dist/lib/mcp/function-calling.js +0 -642
- package/dist/lib/mcp/health-monitor.d.ts +0 -257
- package/dist/lib/mcp/health-monitor.js +0 -630
- package/dist/lib/mcp/initialize-tools.d.ts +0 -29
- package/dist/lib/mcp/initialize-tools.js +0 -261
- package/dist/lib/mcp/initialize.d.ts +0 -18
- package/dist/lib/mcp/initialize.js +0 -62
- package/dist/lib/mcp/manager.d.ts +0 -68
- package/dist/lib/mcp/manager.js +0 -176
- package/dist/lib/mcp/neurolink-mcp-client.d.ts +0 -97
- package/dist/lib/mcp/neurolink-mcp-client.js +0 -462
- package/dist/lib/mcp/orchestrator.d.ts +0 -302
- package/dist/lib/mcp/orchestrator.js +0 -703
- package/dist/lib/mcp/plugin-manager.d.ts +0 -98
- package/dist/lib/mcp/plugin-manager.js +0 -296
- package/dist/lib/mcp/plugins/core/filesystem-mcp.d.ts +0 -36
- package/dist/lib/mcp/plugins/core/filesystem-mcp.js +0 -142
- package/dist/lib/mcp/plugins/filesystem-mcp.d.ts +0 -37
- package/dist/lib/mcp/plugins/filesystem-mcp.js +0 -54
- package/dist/lib/mcp/security-manager.d.ts +0 -87
- package/dist/lib/mcp/security-manager.js +0 -344
- package/dist/lib/mcp/semaphore-manager.d.ts +0 -137
- package/dist/lib/mcp/semaphore-manager.js +0 -329
- package/dist/lib/mcp/session-manager.d.ts +0 -187
- package/dist/lib/mcp/session-manager.js +0 -400
- package/dist/lib/mcp/session-persistence.d.ts +0 -93
- package/dist/lib/mcp/session-persistence.js +0 -301
- package/dist/lib/mcp/tool-integration.d.ts +0 -58
- package/dist/lib/mcp/tool-integration.js +0 -203
- package/dist/lib/mcp/transport-manager.d.ts +0 -154
- package/dist/lib/mcp/transport-manager.js +0 -334
- package/dist/lib/mcp/unified-mcp.d.ts +0 -133
- package/dist/lib/mcp/unified-mcp.js +0 -251
- package/dist/lib/mcp/unified-registry.d.ts +0 -165
- package/dist/lib/mcp/unified-registry.js +0 -538
- package/dist/lib/providers/analytics-helper.d.ts +0 -38
- package/dist/lib/providers/analytics-helper.js +0 -216
- package/dist/lib/providers/function-calling-provider.d.ts +0 -142
- package/dist/lib/providers/function-calling-provider.js +0 -630
- package/dist/lib/providers/mcp-provider.d.ts +0 -75
- package/dist/lib/providers/mcp-provider.js +0 -283
- package/dist/lib/providers/timeout-wrapper.d.ts +0 -40
- package/dist/lib/providers/timeout-wrapper.js +0 -100
- package/dist/lib/sdk/tool-extension.d.ts +0 -181
- package/dist/lib/sdk/tool-extension.js +0 -284
- package/dist/lib/services/streaming/streaming-manager.d.ts +0 -29
- package/dist/lib/services/streaming/streaming-manager.js +0 -245
- package/dist/lib/services/types.d.ts +0 -156
- package/dist/lib/services/types.js +0 -2
- package/dist/lib/services/websocket/websocket-server.d.ts +0 -34
- package/dist/lib/services/websocket/websocket-server.js +0 -305
- package/dist/lib/utils/provider-validation.d.ts +0 -36
- package/dist/lib/utils/provider-validation.js +0 -625
- package/dist/lib/utils/providerUtils-fixed.d.ts +0 -8
- package/dist/lib/utils/providerUtils-fixed.js +0 -94
- package/dist/lib/utils/streaming-utils.d.ts +0 -79
- package/dist/lib/utils/streaming-utils.js +0 -198
- package/dist/lib/utils/timeout-manager.d.ts +0 -75
- package/dist/lib/utils/timeout-manager.js +0 -244
- package/dist/mcp/adapters/plugin-bridge.d.ts +0 -40
- package/dist/mcp/adapters/plugin-bridge.js +0 -89
- package/dist/mcp/auto-discovery.d.ts +0 -62
- package/dist/mcp/auto-discovery.js +0 -149
- package/dist/mcp/client.d.ts +0 -68
- package/dist/mcp/client.js +0 -248
- package/dist/mcp/config.d.ts +0 -31
- package/dist/mcp/config.js +0 -99
- package/dist/mcp/context-manager.d.ts +0 -171
- package/dist/mcp/context-manager.js +0 -362
- package/dist/mcp/contracts/mcp-contract.d.ts +0 -169
- package/dist/mcp/contracts/mcp-contract.js +0 -58
- package/dist/mcp/core/plugin-manager.d.ts +0 -46
- package/dist/mcp/core/plugin-manager.js +0 -110
- package/dist/mcp/demo/plugin-demo.d.ts +0 -20
- package/dist/mcp/demo/plugin-demo.js +0 -118
- package/dist/mcp/dynamic-chain-executor.d.ts +0 -225
- package/dist/mcp/dynamic-chain-executor.js +0 -489
- package/dist/mcp/dynamic-orchestrator.d.ts +0 -115
- package/dist/mcp/dynamic-orchestrator.js +0 -351
- package/dist/mcp/ecosystem.d.ts +0 -75
- package/dist/mcp/ecosystem.js +0 -162
- package/dist/mcp/error-manager.d.ts +0 -254
- package/dist/mcp/error-manager.js +0 -501
- package/dist/mcp/error-recovery.d.ts +0 -159
- package/dist/mcp/error-recovery.js +0 -405
- package/dist/mcp/external-client.d.ts +0 -88
- package/dist/mcp/external-client.js +0 -331
- package/dist/mcp/external-manager.d.ts +0 -112
- package/dist/mcp/external-manager.js +0 -308
- package/dist/mcp/function-calling.d.ts +0 -65
- package/dist/mcp/function-calling.js +0 -642
- package/dist/mcp/health-monitor.d.ts +0 -257
- package/dist/mcp/health-monitor.js +0 -630
- package/dist/mcp/initialize-tools.d.ts +0 -29
- package/dist/mcp/initialize-tools.js +0 -262
- package/dist/mcp/initialize.d.ts +0 -18
- package/dist/mcp/initialize.js +0 -62
- package/dist/mcp/manager.d.ts +0 -68
- package/dist/mcp/manager.js +0 -176
- package/dist/mcp/neurolink-mcp-client.d.ts +0 -97
- package/dist/mcp/neurolink-mcp-client.js +0 -462
- package/dist/mcp/orchestrator.d.ts +0 -302
- package/dist/mcp/orchestrator.js +0 -703
- package/dist/mcp/plugin-manager.d.ts +0 -98
- package/dist/mcp/plugin-manager.js +0 -297
- package/dist/mcp/plugins/core/filesystem-mcp.d.ts +0 -36
- package/dist/mcp/plugins/core/filesystem-mcp.js +0 -142
- package/dist/mcp/plugins/core/neurolink-mcp.json +0 -17
- package/dist/mcp/plugins/filesystem-mcp.d.ts +0 -37
- package/dist/mcp/plugins/filesystem-mcp.js +0 -54
- package/dist/mcp/security-manager.d.ts +0 -87
- package/dist/mcp/security-manager.js +0 -344
- package/dist/mcp/semaphore-manager.d.ts +0 -137
- package/dist/mcp/semaphore-manager.js +0 -329
- package/dist/mcp/session-manager.d.ts +0 -187
- package/dist/mcp/session-manager.js +0 -400
- package/dist/mcp/session-persistence.d.ts +0 -93
- package/dist/mcp/session-persistence.js +0 -302
- package/dist/mcp/tool-integration.d.ts +0 -58
- package/dist/mcp/tool-integration.js +0 -203
- package/dist/mcp/transport-manager.d.ts +0 -154
- package/dist/mcp/transport-manager.js +0 -335
- package/dist/mcp/unified-mcp.d.ts +0 -133
- package/dist/mcp/unified-mcp.js +0 -251
- package/dist/mcp/unified-registry.d.ts +0 -165
- package/dist/mcp/unified-registry.js +0 -539
- package/dist/providers/analytics-helper.d.ts +0 -38
- package/dist/providers/analytics-helper.js +0 -216
- package/dist/providers/function-calling-provider.d.ts +0 -142
- package/dist/providers/function-calling-provider.js +0 -630
- package/dist/providers/mcp-provider.d.ts +0 -75
- package/dist/providers/mcp-provider.js +0 -283
- package/dist/providers/timeout-wrapper.d.ts +0 -40
- package/dist/providers/timeout-wrapper.js +0 -100
- package/dist/sdk/tool-extension.d.ts +0 -181
- package/dist/sdk/tool-extension.js +0 -284
- package/dist/services/streaming/streaming-manager.d.ts +0 -29
- package/dist/services/streaming/streaming-manager.js +0 -245
- package/dist/services/types.d.ts +0 -156
- package/dist/services/types.js +0 -2
- package/dist/services/websocket/websocket-server.d.ts +0 -34
- package/dist/services/websocket/websocket-server.js +0 -306
- package/dist/utils/provider-validation.d.ts +0 -36
- package/dist/utils/provider-validation.js +0 -625
- package/dist/utils/providerUtils-fixed.d.ts +0 -8
- package/dist/utils/providerUtils-fixed.js +0 -94
- package/dist/utils/streaming-utils.d.ts +0 -79
- package/dist/utils/streaming-utils.js +0 -198
- package/dist/utils/timeout-manager.d.ts +0 -75
- package/dist/utils/timeout-manager.js +0 -244
package/CHANGELOG.md
CHANGED
|
@@ -1,21 +1,25 @@
|
|
|
1
|
-
# [6.
|
|
1
|
+
# [6.2.0](https://github.com/juspay/neurolink/compare/v6.1.0...v6.2.0) (2025-07-30)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Features
|
|
5
5
|
|
|
6
|
-
*
|
|
7
|
-
|
|
8
|
-
# [6.0.0](https://github.com/juspay/neurolink/compare/v5.3.0...v6.0.0) (2025-07-24)
|
|
6
|
+
* systematic dead code elimination across entire codebase ([571060a](https://github.com/juspay/neurolink/commit/571060a6146dc13e486da22610122d599420fcb2))
|
|
9
7
|
|
|
8
|
+
# [6.1.0](https://github.com/juspay/neurolink/compare/v6.0.0...v6.1.0) (2025-07-24)
|
|
10
9
|
|
|
11
10
|
### Features
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
- **github:** enhance GitHub project configuration and community features ([deb1407](https://github.com/juspay/neurolink/commit/deb1407cb8c7be7eff4baf365f6600da33ac4255))
|
|
13
|
+
|
|
14
|
+
# [6.0.0](https://github.com/juspay/neurolink/compare/v5.3.0...v6.0.0) (2025-07-24)
|
|
15
|
+
|
|
16
|
+
### Features
|
|
14
17
|
|
|
18
|
+
- **types:** eliminate all TypeScript any usage across entire codebase ([777c3cd](https://github.com/juspay/neurolink/commit/777c3cda582cbefcf01480a12d13a2adb7c140c8))
|
|
15
19
|
|
|
16
20
|
### BREAKING CHANGES
|
|
17
21
|
|
|
18
|
-
|
|
22
|
+
- **types:** Complete removal of TypeScript 'any' types for enhanced type safety
|
|
19
23
|
|
|
20
24
|
This comprehensive refactor eliminates all TypeScript 'any' usage across the entire
|
|
21
25
|
NeuroLink codebase, affecting 140+ files with systematic type safety improvements:
|
|
@@ -58,9 +58,9 @@ declare const ConfigSchema: z.ZodObject<{
|
|
|
58
58
|
clientEmail?: string | undefined;
|
|
59
59
|
privateKey?: string | undefined;
|
|
60
60
|
}, {
|
|
61
|
-
projectId?: string | undefined;
|
|
62
61
|
model?: string | undefined;
|
|
63
62
|
location?: string | undefined;
|
|
63
|
+
projectId?: string | undefined;
|
|
64
64
|
credentials?: string | undefined;
|
|
65
65
|
serviceAccountKey?: string | undefined;
|
|
66
66
|
clientEmail?: string | undefined;
|
|
@@ -117,12 +117,12 @@ declare const ConfigSchema: z.ZodObject<{
|
|
|
117
117
|
model: z.ZodDefault<z.ZodString>;
|
|
118
118
|
timeout: z.ZodDefault<z.ZodNumber>;
|
|
119
119
|
}, "strip", z.ZodTypeAny, {
|
|
120
|
-
timeout: number;
|
|
121
120
|
model: string;
|
|
121
|
+
timeout: number;
|
|
122
122
|
baseUrl: string;
|
|
123
123
|
}, {
|
|
124
|
-
timeout?: number | undefined;
|
|
125
124
|
model?: string | undefined;
|
|
125
|
+
timeout?: number | undefined;
|
|
126
126
|
baseUrl?: string | undefined;
|
|
127
127
|
}>>;
|
|
128
128
|
mistral: z.ZodOptional<z.ZodObject<{
|
|
@@ -176,8 +176,8 @@ declare const ConfigSchema: z.ZodObject<{
|
|
|
176
176
|
apiKey?: string | undefined;
|
|
177
177
|
} | undefined;
|
|
178
178
|
ollama?: {
|
|
179
|
-
timeout: number;
|
|
180
179
|
model: string;
|
|
180
|
+
timeout: number;
|
|
181
181
|
baseUrl: string;
|
|
182
182
|
} | undefined;
|
|
183
183
|
mistral?: {
|
|
@@ -198,9 +198,9 @@ declare const ConfigSchema: z.ZodObject<{
|
|
|
198
198
|
baseURL?: string | undefined;
|
|
199
199
|
} | undefined;
|
|
200
200
|
vertex?: {
|
|
201
|
-
projectId?: string | undefined;
|
|
202
201
|
model?: string | undefined;
|
|
203
202
|
location?: string | undefined;
|
|
203
|
+
projectId?: string | undefined;
|
|
204
204
|
credentials?: string | undefined;
|
|
205
205
|
serviceAccountKey?: string | undefined;
|
|
206
206
|
clientEmail?: string | undefined;
|
|
@@ -225,8 +225,8 @@ declare const ConfigSchema: z.ZodObject<{
|
|
|
225
225
|
apiKey?: string | undefined;
|
|
226
226
|
} | undefined;
|
|
227
227
|
ollama?: {
|
|
228
|
-
timeout?: number | undefined;
|
|
229
228
|
model?: string | undefined;
|
|
229
|
+
timeout?: number | undefined;
|
|
230
230
|
baseUrl?: string | undefined;
|
|
231
231
|
} | undefined;
|
|
232
232
|
mistral?: {
|
|
@@ -243,15 +243,15 @@ declare const ConfigSchema: z.ZodObject<{
|
|
|
243
243
|
enableCaching: z.ZodDefault<z.ZodBoolean>;
|
|
244
244
|
cacheStrategy: z.ZodDefault<z.ZodEnum<["memory", "file", "redis"]>>;
|
|
245
245
|
}, "strip", z.ZodTypeAny, {
|
|
246
|
-
temperature: number;
|
|
247
246
|
maxTokens: number;
|
|
247
|
+
temperature: number;
|
|
248
248
|
outputFormat: "text" | "json" | "yaml";
|
|
249
249
|
enableLogging: boolean;
|
|
250
250
|
enableCaching: boolean;
|
|
251
251
|
cacheStrategy: "file" | "memory" | "redis";
|
|
252
252
|
}, {
|
|
253
|
-
temperature?: number | undefined;
|
|
254
253
|
maxTokens?: number | undefined;
|
|
254
|
+
temperature?: number | undefined;
|
|
255
255
|
outputFormat?: "text" | "json" | "yaml" | undefined;
|
|
256
256
|
enableLogging?: boolean | undefined;
|
|
257
257
|
enableCaching?: boolean | undefined;
|
|
@@ -300,8 +300,8 @@ declare const ConfigSchema: z.ZodObject<{
|
|
|
300
300
|
apiKey?: string | undefined;
|
|
301
301
|
} | undefined;
|
|
302
302
|
ollama?: {
|
|
303
|
-
timeout: number;
|
|
304
303
|
model: string;
|
|
304
|
+
timeout: number;
|
|
305
305
|
baseUrl: string;
|
|
306
306
|
} | undefined;
|
|
307
307
|
mistral?: {
|
|
@@ -311,8 +311,8 @@ declare const ConfigSchema: z.ZodObject<{
|
|
|
311
311
|
};
|
|
312
312
|
profiles: Record<string, any>;
|
|
313
313
|
preferences: {
|
|
314
|
-
temperature: number;
|
|
315
314
|
maxTokens: number;
|
|
315
|
+
temperature: number;
|
|
316
316
|
outputFormat: "text" | "json" | "yaml";
|
|
317
317
|
enableLogging: boolean;
|
|
318
318
|
enableCaching: boolean;
|
|
@@ -334,9 +334,9 @@ declare const ConfigSchema: z.ZodObject<{
|
|
|
334
334
|
baseURL?: string | undefined;
|
|
335
335
|
} | undefined;
|
|
336
336
|
vertex?: {
|
|
337
|
-
projectId?: string | undefined;
|
|
338
337
|
model?: string | undefined;
|
|
339
338
|
location?: string | undefined;
|
|
339
|
+
projectId?: string | undefined;
|
|
340
340
|
credentials?: string | undefined;
|
|
341
341
|
serviceAccountKey?: string | undefined;
|
|
342
342
|
clientEmail?: string | undefined;
|
|
@@ -361,8 +361,8 @@ declare const ConfigSchema: z.ZodObject<{
|
|
|
361
361
|
apiKey?: string | undefined;
|
|
362
362
|
} | undefined;
|
|
363
363
|
ollama?: {
|
|
364
|
-
timeout?: number | undefined;
|
|
365
364
|
model?: string | undefined;
|
|
365
|
+
timeout?: number | undefined;
|
|
366
366
|
baseUrl?: string | undefined;
|
|
367
367
|
} | undefined;
|
|
368
368
|
mistral?: {
|
|
@@ -372,8 +372,8 @@ declare const ConfigSchema: z.ZodObject<{
|
|
|
372
372
|
} | undefined;
|
|
373
373
|
profiles?: Record<string, any> | undefined;
|
|
374
374
|
preferences?: {
|
|
375
|
-
temperature?: number | undefined;
|
|
376
375
|
maxTokens?: number | undefined;
|
|
376
|
+
temperature?: number | undefined;
|
|
377
377
|
outputFormat?: "text" | "json" | "yaml" | undefined;
|
|
378
378
|
enableLogging?: boolean | undefined;
|
|
379
379
|
enableCaching?: boolean | undefined;
|
package/dist/cli/index.js
CHANGED
|
@@ -19,9 +19,7 @@ import { hideBin } from "yargs/helpers";
|
|
|
19
19
|
import ora from "ora";
|
|
20
20
|
import chalk from "chalk";
|
|
21
21
|
import fs from "fs";
|
|
22
|
-
import { addMCPCommands } from "./commands/mcp.js";
|
|
23
22
|
import { addOllamaCommands } from "./commands/ollama.js";
|
|
24
|
-
import { CLICommandFactory } from "./factories/command-factory.js";
|
|
25
23
|
import { logger } from "../lib/utils/logger.js";
|
|
26
24
|
function displayDebugInfo(title, data, debug) {
|
|
27
25
|
if (debug) {
|
|
@@ -194,13 +192,10 @@ function handleError(error, context) {
|
|
|
194
192
|
async function initializeCLI() {
|
|
195
193
|
// Import and configure for CLI mode
|
|
196
194
|
const { ProviderRegistry } = await import("../lib/factories/provider-registry.js");
|
|
197
|
-
const { initializeNeuroLinkMCP } = await import("../lib/mcp/initialize.js");
|
|
198
195
|
// Enable manual MCP only for CLI
|
|
199
196
|
ProviderRegistry.setOptions({
|
|
200
197
|
enableManualMCP: true,
|
|
201
198
|
});
|
|
202
|
-
// Initialize MCP system
|
|
203
|
-
await initializeNeuroLinkMCP();
|
|
204
199
|
logger.debug("CLI initialized with manual MCP support enabled");
|
|
205
200
|
}
|
|
206
201
|
// Initialize SDK
|
|
@@ -1158,7 +1153,7 @@ const cli = yargs(args)
|
|
|
1158
1153
|
.example("$0 get-best-provider", "Show best provider")
|
|
1159
1154
|
.example("$0 get-best-provider --format json", "Show in JSON format"), async (argv) => {
|
|
1160
1155
|
try {
|
|
1161
|
-
const { getBestProvider } = await import("../lib/utils/providerUtils
|
|
1156
|
+
const { getBestProvider } = await import("../lib/utils/providerUtils.js");
|
|
1162
1157
|
const bestProvider = await getBestProvider();
|
|
1163
1158
|
if (argv.format === "json") {
|
|
1164
1159
|
process.stdout.write(JSON.stringify({ provider: bestProvider }, null, 2) + "\n");
|
|
@@ -1184,9 +1179,8 @@ const cli = yargs(args)
|
|
|
1184
1179
|
cli.showCompletionScript();
|
|
1185
1180
|
});
|
|
1186
1181
|
// Add NEW Generate Command (Primary)
|
|
1187
|
-
|
|
1188
|
-
//
|
|
1189
|
-
addMCPCommands(cli);
|
|
1182
|
+
// Removed CLICommandFactory call - commands are handled directly above.createGenerateCommand());
|
|
1183
|
+
// MCP Commands: Integrated within base provider functionality
|
|
1190
1184
|
// Add Ollama Commands
|
|
1191
1185
|
addOllamaCommands(cli);
|
|
1192
1186
|
// Execute CLI
|
package/dist/core/analytics.d.ts
CHANGED
|
@@ -17,8 +17,18 @@ export interface AnalyticsData {
|
|
|
17
17
|
responseTime: number;
|
|
18
18
|
context?: Record<string, JsonValue>;
|
|
19
19
|
timestamp: string;
|
|
20
|
+
evaluation?: {
|
|
21
|
+
relevanceScore: number;
|
|
22
|
+
accuracyScore: number;
|
|
23
|
+
completenessScore: number;
|
|
24
|
+
overall: number;
|
|
25
|
+
evaluationProvider?: string;
|
|
26
|
+
evaluationTime?: number;
|
|
27
|
+
evaluationAttempt?: number;
|
|
28
|
+
};
|
|
29
|
+
costDetails?: UnknownRecord;
|
|
20
30
|
}
|
|
21
31
|
/**
|
|
22
32
|
* Create analytics data structure from AI response
|
|
23
33
|
*/
|
|
24
|
-
export declare function createAnalytics(provider: string, model: string, result:
|
|
34
|
+
export declare function createAnalytics(provider: string, model: string, result: unknown, responseTime: number, context?: Record<string, unknown>): AnalyticsData;
|
package/dist/core/analytics.js
CHANGED
|
@@ -21,7 +21,7 @@ export function createAnalytics(provider, model, result, responseTime, context)
|
|
|
21
21
|
tokens,
|
|
22
22
|
cost,
|
|
23
23
|
responseTime,
|
|
24
|
-
context,
|
|
24
|
+
context: context,
|
|
25
25
|
timestamp: new Date().toISOString(),
|
|
26
26
|
};
|
|
27
27
|
logger.debug(`[${functionTag}] Analytics created`, {
|
|
@@ -41,7 +41,7 @@ export function createAnalytics(provider, model, result, responseTime, context)
|
|
|
41
41
|
model,
|
|
42
42
|
tokens: { input: 0, output: 0, total: 0 },
|
|
43
43
|
responseTime,
|
|
44
|
-
context,
|
|
44
|
+
context: context,
|
|
45
45
|
timestamp: new Date().toISOString(),
|
|
46
46
|
};
|
|
47
47
|
}
|
|
@@ -260,24 +260,10 @@ export class BaseProvider {
|
|
|
260
260
|
// Not an error - custom tools are optional
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
|
-
//
|
|
263
|
+
// MCP tools loading simplified - removed function-calling dependency
|
|
264
264
|
if (!this.mcpTools) {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
const result = await getAvailableFunctionTools();
|
|
268
|
-
if (isValidToolsObject(result)) {
|
|
269
|
-
this.mcpTools = result.toolsObject;
|
|
270
|
-
}
|
|
271
|
-
else {
|
|
272
|
-
logger.debug(`Invalid or empty toolsObject for ${this.providerName}: Expected an object with at least one key, but got ${typeof result?.toolsObject} with ${result?.toolsObject
|
|
273
|
-
? Object.keys(result.toolsObject).length
|
|
274
|
-
: 0} keys. Full result:`, result);
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
catch (error) {
|
|
278
|
-
logger.debug(`MCP tools not available for ${this.providerName}:`, error);
|
|
279
|
-
// Not an error - MCP tools are optional
|
|
280
|
-
}
|
|
265
|
+
// Set empty tools object - MCP tools are handled at a higher level
|
|
266
|
+
this.mcpTools = {};
|
|
281
267
|
}
|
|
282
268
|
// Add MCP tools if available
|
|
283
269
|
if (this.mcpTools) {
|
|
@@ -353,7 +339,7 @@ export class BaseProvider {
|
|
|
353
339
|
return enhancedResult;
|
|
354
340
|
}
|
|
355
341
|
async createAnalytics(result, responseTime, options) {
|
|
356
|
-
const { createAnalytics } = await import("
|
|
342
|
+
const { createAnalytics } = await import("./analytics.js");
|
|
357
343
|
return createAnalytics(this.providerName, this.modelName, result, responseTime, options.context);
|
|
358
344
|
}
|
|
359
345
|
async createEvaluation(result, options) {
|
|
@@ -21,8 +21,8 @@ declare const ModelConfigSchema: z.ZodObject<{
|
|
|
21
21
|
releaseDate: z.ZodString;
|
|
22
22
|
}, "strip", z.ZodTypeAny, {
|
|
23
23
|
id: string;
|
|
24
|
-
capabilities: string[];
|
|
25
24
|
displayName: string;
|
|
25
|
+
capabilities: string[];
|
|
26
26
|
deprecated: boolean;
|
|
27
27
|
pricing: {
|
|
28
28
|
input: number;
|
|
@@ -32,8 +32,8 @@ declare const ModelConfigSchema: z.ZodObject<{
|
|
|
32
32
|
releaseDate: string;
|
|
33
33
|
}, {
|
|
34
34
|
id: string;
|
|
35
|
-
capabilities: string[];
|
|
36
35
|
displayName: string;
|
|
36
|
+
capabilities: string[];
|
|
37
37
|
deprecated: boolean;
|
|
38
38
|
pricing: {
|
|
39
39
|
input: number;
|
|
@@ -64,8 +64,8 @@ declare const ModelRegistrySchema: z.ZodObject<{
|
|
|
64
64
|
releaseDate: z.ZodString;
|
|
65
65
|
}, "strip", z.ZodTypeAny, {
|
|
66
66
|
id: string;
|
|
67
|
-
capabilities: string[];
|
|
68
67
|
displayName: string;
|
|
68
|
+
capabilities: string[];
|
|
69
69
|
deprecated: boolean;
|
|
70
70
|
pricing: {
|
|
71
71
|
input: number;
|
|
@@ -75,8 +75,8 @@ declare const ModelRegistrySchema: z.ZodObject<{
|
|
|
75
75
|
releaseDate: string;
|
|
76
76
|
}, {
|
|
77
77
|
id: string;
|
|
78
|
-
capabilities: string[];
|
|
79
78
|
displayName: string;
|
|
79
|
+
capabilities: string[];
|
|
80
80
|
deprecated: boolean;
|
|
81
81
|
pricing: {
|
|
82
82
|
input: number;
|
|
@@ -89,11 +89,10 @@ declare const ModelRegistrySchema: z.ZodObject<{
|
|
|
89
89
|
defaults: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
90
90
|
}, "strip", z.ZodTypeAny, {
|
|
91
91
|
version: string;
|
|
92
|
-
lastUpdated: string;
|
|
93
92
|
models: Record<string, Record<string, {
|
|
94
93
|
id: string;
|
|
95
|
-
capabilities: string[];
|
|
96
94
|
displayName: string;
|
|
95
|
+
capabilities: string[];
|
|
97
96
|
deprecated: boolean;
|
|
98
97
|
pricing: {
|
|
99
98
|
input: number;
|
|
@@ -102,15 +101,15 @@ declare const ModelRegistrySchema: z.ZodObject<{
|
|
|
102
101
|
contextWindow: number;
|
|
103
102
|
releaseDate: string;
|
|
104
103
|
}>>;
|
|
104
|
+
lastUpdated: string;
|
|
105
105
|
aliases?: Record<string, string> | undefined;
|
|
106
106
|
defaults?: Record<string, string> | undefined;
|
|
107
107
|
}, {
|
|
108
108
|
version: string;
|
|
109
|
-
lastUpdated: string;
|
|
110
109
|
models: Record<string, Record<string, {
|
|
111
110
|
id: string;
|
|
112
|
-
capabilities: string[];
|
|
113
111
|
displayName: string;
|
|
112
|
+
capabilities: string[];
|
|
114
113
|
deprecated: boolean;
|
|
115
114
|
pricing: {
|
|
116
115
|
input: number;
|
|
@@ -119,6 +118,7 @@ declare const ModelRegistrySchema: z.ZodObject<{
|
|
|
119
118
|
contextWindow: number;
|
|
120
119
|
releaseDate: string;
|
|
121
120
|
}>>;
|
|
121
|
+
lastUpdated: string;
|
|
122
122
|
aliases?: Record<string, string> | undefined;
|
|
123
123
|
defaults?: Record<string, string> | undefined;
|
|
124
124
|
}>;
|
package/dist/core/factory.js
CHANGED
|
@@ -89,13 +89,12 @@ export class AIProviderFactory {
|
|
|
89
89
|
// );
|
|
90
90
|
// }
|
|
91
91
|
// }
|
|
92
|
-
let provider;
|
|
93
92
|
// PURE FACTORY PATTERN: No switch statements - use ProviderFactory exclusively
|
|
94
93
|
const normalizedName = this.normalizeProviderName(providerName);
|
|
95
94
|
const finalModelName = resolvedModelName === "default" || resolvedModelName === null
|
|
96
95
|
? undefined
|
|
97
96
|
: resolvedModelName;
|
|
98
|
-
provider = await ProviderFactory.createProvider(normalizedName, finalModelName, sdk);
|
|
97
|
+
const provider = await ProviderFactory.createProvider(normalizedName, finalModelName, sdk);
|
|
99
98
|
logger.debug(componentIdentifier, "Pure factory pattern provider created", {
|
|
100
99
|
providerName: normalizedName,
|
|
101
100
|
modelName: finalModelName,
|
|
@@ -105,15 +104,8 @@ export class AIProviderFactory {
|
|
|
105
104
|
// Wrap with MCP if enabled
|
|
106
105
|
if (enableMCP) {
|
|
107
106
|
try {
|
|
108
|
-
logger.debug(`[${functionTag}]
|
|
109
|
-
|
|
110
|
-
provider = createMCPAwareProviderV3(provider, {
|
|
111
|
-
providerName,
|
|
112
|
-
modelName: resolvedModelName || undefined,
|
|
113
|
-
enableMCP: true,
|
|
114
|
-
enableFunctionCalling: true,
|
|
115
|
-
});
|
|
116
|
-
logger.debug(`[${functionTag}] Provider wrapped with MCP support`);
|
|
107
|
+
logger.debug(`[${functionTag}] MCP wrapping disabled - function-calling removed`);
|
|
108
|
+
// MCP wrapping simplified - removed function-calling dependency
|
|
117
109
|
}
|
|
118
110
|
catch (mcpError) {
|
|
119
111
|
logger.warn(`[${functionTag}] Failed to wrap with MCP, using base provider`, {
|
package/dist/index.d.ts
CHANGED
|
@@ -10,8 +10,6 @@ import { AIProviderFactory } from "./core/factory.js";
|
|
|
10
10
|
export { AIProviderFactory };
|
|
11
11
|
export type { AIProvider, AIProviderName, ProviderConfig, StreamingOptions, ProviderAttempt, SupportedModelName, } from "./core/types.js";
|
|
12
12
|
export type { GenerateOptions, GenerateResult, EnhancedProvider, } from "./types/generate-types.js";
|
|
13
|
-
export { CompatibilityConversionFactory } from "./factories/compatibility-factory.js";
|
|
14
|
-
export { ProviderGenerateFactory } from "./factories/provider-generate-factory.js";
|
|
15
13
|
export type { SimpleTool, ToolContext } from "./sdk/tool-registration.js";
|
|
16
14
|
export { createTool, createTypedTool, validateTool, } from "./sdk/tool-registration.js";
|
|
17
15
|
export type { InMemoryMCPServerConfig, InMemoryToolInfo, InMemoryToolResult, } from "./types/mcp-types.js";
|
|
@@ -78,8 +76,8 @@ export declare function createBestAIProvider(requestedProvider?: string, modelNa
|
|
|
78
76
|
* await writeFile('output.txt', 'Hello from MCP!');
|
|
79
77
|
* ```
|
|
80
78
|
*/
|
|
81
|
-
export {
|
|
82
|
-
export type {
|
|
79
|
+
export { initializeMCPEcosystem, listMCPs, executeMCP, getMCPStats, mcpLogger, } from "./mcp/index.js";
|
|
80
|
+
export type { McpMetadata, ExecutionContext, DiscoveredMcp, ToolInfo, ToolExecutionResult, LogLevel, } from "./mcp/index.js";
|
|
83
81
|
export declare function initializeTelemetry(): Promise<boolean>;
|
|
84
82
|
export declare function getTelemetryStatus(): {
|
|
85
83
|
enabled: boolean;
|
package/dist/index.js
CHANGED
|
@@ -9,8 +9,6 @@
|
|
|
9
9
|
// Core exports
|
|
10
10
|
import { AIProviderFactory } from "./core/factory.js";
|
|
11
11
|
export { AIProviderFactory };
|
|
12
|
-
export { CompatibilityConversionFactory } from "./factories/compatibility-factory.js";
|
|
13
|
-
export { ProviderGenerateFactory } from "./factories/provider-generate-factory.js";
|
|
14
12
|
export { createTool, createTypedTool, validateTool, } from "./sdk/tool-registration.js";
|
|
15
13
|
// Model enums
|
|
16
14
|
export { BedrockModels, OpenAIModels, VertexModels, DEFAULT_PROVIDER_CONFIGS, } from "./core/types.js";
|
|
@@ -86,15 +84,8 @@ export async function createBestAIProvider(requestedProvider, modelName) {
|
|
|
86
84
|
*/
|
|
87
85
|
export {
|
|
88
86
|
// Core MCP ecosystem
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
PluginManager, pluginManager, listMCPs, executeMCP, getMCPStats,
|
|
92
|
-
// Quick filesystem operations
|
|
93
|
-
readFile, writeFile, listFiles, createDirectory,
|
|
94
|
-
// Core contracts and types
|
|
95
|
-
MCP, SecurityManager, mcpLogger,
|
|
96
|
-
// Core plugins
|
|
97
|
-
FileSystemMCP, } from "./mcp/index.js";
|
|
87
|
+
// Simplified MCP exports
|
|
88
|
+
initializeMCPEcosystem, listMCPs, executeMCP, getMCPStats, mcpLogger, } from "./mcp/index.js";
|
|
98
89
|
// ============================================================================
|
|
99
90
|
// REAL-TIME SERVICES & TELEMETRY - Enterprise Platform Features
|
|
100
91
|
// ============================================================================
|
|
@@ -17,8 +17,18 @@ export interface AnalyticsData {
|
|
|
17
17
|
responseTime: number;
|
|
18
18
|
context?: Record<string, JsonValue>;
|
|
19
19
|
timestamp: string;
|
|
20
|
+
evaluation?: {
|
|
21
|
+
relevanceScore: number;
|
|
22
|
+
accuracyScore: number;
|
|
23
|
+
completenessScore: number;
|
|
24
|
+
overall: number;
|
|
25
|
+
evaluationProvider?: string;
|
|
26
|
+
evaluationTime?: number;
|
|
27
|
+
evaluationAttempt?: number;
|
|
28
|
+
};
|
|
29
|
+
costDetails?: UnknownRecord;
|
|
20
30
|
}
|
|
21
31
|
/**
|
|
22
32
|
* Create analytics data structure from AI response
|
|
23
33
|
*/
|
|
24
|
-
export declare function createAnalytics(provider: string, model: string, result:
|
|
34
|
+
export declare function createAnalytics(provider: string, model: string, result: unknown, responseTime: number, context?: Record<string, unknown>): AnalyticsData;
|
|
@@ -21,7 +21,7 @@ export function createAnalytics(provider, model, result, responseTime, context)
|
|
|
21
21
|
tokens,
|
|
22
22
|
cost,
|
|
23
23
|
responseTime,
|
|
24
|
-
context,
|
|
24
|
+
context: context,
|
|
25
25
|
timestamp: new Date().toISOString(),
|
|
26
26
|
};
|
|
27
27
|
logger.debug(`[${functionTag}] Analytics created`, {
|
|
@@ -41,7 +41,7 @@ export function createAnalytics(provider, model, result, responseTime, context)
|
|
|
41
41
|
model,
|
|
42
42
|
tokens: { input: 0, output: 0, total: 0 },
|
|
43
43
|
responseTime,
|
|
44
|
-
context,
|
|
44
|
+
context: context,
|
|
45
45
|
timestamp: new Date().toISOString(),
|
|
46
46
|
};
|
|
47
47
|
}
|
|
@@ -260,24 +260,10 @@ export class BaseProvider {
|
|
|
260
260
|
// Not an error - custom tools are optional
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
|
-
//
|
|
263
|
+
// MCP tools loading simplified - removed function-calling dependency
|
|
264
264
|
if (!this.mcpTools) {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
const result = await getAvailableFunctionTools();
|
|
268
|
-
if (isValidToolsObject(result)) {
|
|
269
|
-
this.mcpTools = result.toolsObject;
|
|
270
|
-
}
|
|
271
|
-
else {
|
|
272
|
-
logger.debug(`Invalid or empty toolsObject for ${this.providerName}: Expected an object with at least one key, but got ${typeof result?.toolsObject} with ${result?.toolsObject
|
|
273
|
-
? Object.keys(result.toolsObject).length
|
|
274
|
-
: 0} keys. Full result:`, result);
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
catch (error) {
|
|
278
|
-
logger.debug(`MCP tools not available for ${this.providerName}:`, error);
|
|
279
|
-
// Not an error - MCP tools are optional
|
|
280
|
-
}
|
|
265
|
+
// Set empty tools object - MCP tools are handled at a higher level
|
|
266
|
+
this.mcpTools = {};
|
|
281
267
|
}
|
|
282
268
|
// Add MCP tools if available
|
|
283
269
|
if (this.mcpTools) {
|
|
@@ -353,7 +339,7 @@ export class BaseProvider {
|
|
|
353
339
|
return enhancedResult;
|
|
354
340
|
}
|
|
355
341
|
async createAnalytics(result, responseTime, options) {
|
|
356
|
-
const { createAnalytics } = await import("
|
|
342
|
+
const { createAnalytics } = await import("./analytics.js");
|
|
357
343
|
return createAnalytics(this.providerName, this.modelName, result, responseTime, options.context);
|
|
358
344
|
}
|
|
359
345
|
async createEvaluation(result, options) {
|
|
@@ -21,8 +21,8 @@ declare const ModelConfigSchema: z.ZodObject<{
|
|
|
21
21
|
releaseDate: z.ZodString;
|
|
22
22
|
}, "strip", z.ZodTypeAny, {
|
|
23
23
|
id: string;
|
|
24
|
-
capabilities: string[];
|
|
25
24
|
displayName: string;
|
|
25
|
+
capabilities: string[];
|
|
26
26
|
deprecated: boolean;
|
|
27
27
|
pricing: {
|
|
28
28
|
input: number;
|
|
@@ -32,8 +32,8 @@ declare const ModelConfigSchema: z.ZodObject<{
|
|
|
32
32
|
releaseDate: string;
|
|
33
33
|
}, {
|
|
34
34
|
id: string;
|
|
35
|
-
capabilities: string[];
|
|
36
35
|
displayName: string;
|
|
36
|
+
capabilities: string[];
|
|
37
37
|
deprecated: boolean;
|
|
38
38
|
pricing: {
|
|
39
39
|
input: number;
|
|
@@ -64,8 +64,8 @@ declare const ModelRegistrySchema: z.ZodObject<{
|
|
|
64
64
|
releaseDate: z.ZodString;
|
|
65
65
|
}, "strip", z.ZodTypeAny, {
|
|
66
66
|
id: string;
|
|
67
|
-
capabilities: string[];
|
|
68
67
|
displayName: string;
|
|
68
|
+
capabilities: string[];
|
|
69
69
|
deprecated: boolean;
|
|
70
70
|
pricing: {
|
|
71
71
|
input: number;
|
|
@@ -75,8 +75,8 @@ declare const ModelRegistrySchema: z.ZodObject<{
|
|
|
75
75
|
releaseDate: string;
|
|
76
76
|
}, {
|
|
77
77
|
id: string;
|
|
78
|
-
capabilities: string[];
|
|
79
78
|
displayName: string;
|
|
79
|
+
capabilities: string[];
|
|
80
80
|
deprecated: boolean;
|
|
81
81
|
pricing: {
|
|
82
82
|
input: number;
|
|
@@ -89,11 +89,10 @@ declare const ModelRegistrySchema: z.ZodObject<{
|
|
|
89
89
|
defaults: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
90
90
|
}, "strip", z.ZodTypeAny, {
|
|
91
91
|
version: string;
|
|
92
|
-
lastUpdated: string;
|
|
93
92
|
models: Record<string, Record<string, {
|
|
94
93
|
id: string;
|
|
95
|
-
capabilities: string[];
|
|
96
94
|
displayName: string;
|
|
95
|
+
capabilities: string[];
|
|
97
96
|
deprecated: boolean;
|
|
98
97
|
pricing: {
|
|
99
98
|
input: number;
|
|
@@ -102,15 +101,15 @@ declare const ModelRegistrySchema: z.ZodObject<{
|
|
|
102
101
|
contextWindow: number;
|
|
103
102
|
releaseDate: string;
|
|
104
103
|
}>>;
|
|
104
|
+
lastUpdated: string;
|
|
105
105
|
aliases?: Record<string, string> | undefined;
|
|
106
106
|
defaults?: Record<string, string> | undefined;
|
|
107
107
|
}, {
|
|
108
108
|
version: string;
|
|
109
|
-
lastUpdated: string;
|
|
110
109
|
models: Record<string, Record<string, {
|
|
111
110
|
id: string;
|
|
112
|
-
capabilities: string[];
|
|
113
111
|
displayName: string;
|
|
112
|
+
capabilities: string[];
|
|
114
113
|
deprecated: boolean;
|
|
115
114
|
pricing: {
|
|
116
115
|
input: number;
|
|
@@ -119,6 +118,7 @@ declare const ModelRegistrySchema: z.ZodObject<{
|
|
|
119
118
|
contextWindow: number;
|
|
120
119
|
releaseDate: string;
|
|
121
120
|
}>>;
|
|
121
|
+
lastUpdated: string;
|
|
122
122
|
aliases?: Record<string, string> | undefined;
|
|
123
123
|
defaults?: Record<string, string> | undefined;
|
|
124
124
|
}>;
|
package/dist/lib/core/factory.js
CHANGED
|
@@ -87,13 +87,12 @@ export class AIProviderFactory {
|
|
|
87
87
|
// );
|
|
88
88
|
// }
|
|
89
89
|
// }
|
|
90
|
-
let provider;
|
|
91
90
|
// PURE FACTORY PATTERN: No switch statements - use ProviderFactory exclusively
|
|
92
91
|
const normalizedName = this.normalizeProviderName(providerName);
|
|
93
92
|
const finalModelName = resolvedModelName === "default" || resolvedModelName === null
|
|
94
93
|
? undefined
|
|
95
94
|
: resolvedModelName;
|
|
96
|
-
provider = await ProviderFactory.createProvider(normalizedName, finalModelName, sdk);
|
|
95
|
+
const provider = await ProviderFactory.createProvider(normalizedName, finalModelName, sdk);
|
|
97
96
|
logger.debug(componentIdentifier, "Pure factory pattern provider created", {
|
|
98
97
|
providerName: normalizedName,
|
|
99
98
|
modelName: finalModelName,
|
|
@@ -103,15 +102,8 @@ export class AIProviderFactory {
|
|
|
103
102
|
// Wrap with MCP if enabled
|
|
104
103
|
if (enableMCP) {
|
|
105
104
|
try {
|
|
106
|
-
logger.debug(`[${functionTag}]
|
|
107
|
-
|
|
108
|
-
provider = createMCPAwareProviderV3(provider, {
|
|
109
|
-
providerName,
|
|
110
|
-
modelName: resolvedModelName || undefined,
|
|
111
|
-
enableMCP: true,
|
|
112
|
-
enableFunctionCalling: true,
|
|
113
|
-
});
|
|
114
|
-
logger.debug(`[${functionTag}] Provider wrapped with MCP support`);
|
|
105
|
+
logger.debug(`[${functionTag}] MCP wrapping disabled - function-calling removed`);
|
|
106
|
+
// MCP wrapping simplified - removed function-calling dependency
|
|
115
107
|
}
|
|
116
108
|
catch (mcpError) {
|
|
117
109
|
logger.warn(`[${functionTag}] Failed to wrap with MCP, using base provider`, {
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -10,8 +10,6 @@ import { AIProviderFactory } from "./core/factory.js";
|
|
|
10
10
|
export { AIProviderFactory };
|
|
11
11
|
export type { AIProvider, AIProviderName, ProviderConfig, StreamingOptions, ProviderAttempt, SupportedModelName, } from "./core/types.js";
|
|
12
12
|
export type { GenerateOptions, GenerateResult, EnhancedProvider, } from "./types/generate-types.js";
|
|
13
|
-
export { CompatibilityConversionFactory } from "./factories/compatibility-factory.js";
|
|
14
|
-
export { ProviderGenerateFactory } from "./factories/provider-generate-factory.js";
|
|
15
13
|
export type { SimpleTool, ToolContext } from "./sdk/tool-registration.js";
|
|
16
14
|
export { createTool, createTypedTool, validateTool, } from "./sdk/tool-registration.js";
|
|
17
15
|
export type { InMemoryMCPServerConfig, InMemoryToolInfo, InMemoryToolResult, } from "./types/mcp-types.js";
|
|
@@ -78,8 +76,8 @@ export declare function createBestAIProvider(requestedProvider?: string, modelNa
|
|
|
78
76
|
* await writeFile('output.txt', 'Hello from MCP!');
|
|
79
77
|
* ```
|
|
80
78
|
*/
|
|
81
|
-
export {
|
|
82
|
-
export type {
|
|
79
|
+
export { initializeMCPEcosystem, listMCPs, executeMCP, getMCPStats, mcpLogger, } from "./mcp/index.js";
|
|
80
|
+
export type { McpMetadata, ExecutionContext, DiscoveredMcp, ToolInfo, ToolExecutionResult, LogLevel, } from "./mcp/index.js";
|
|
83
81
|
export declare function initializeTelemetry(): Promise<boolean>;
|
|
84
82
|
export declare function getTelemetryStatus(): {
|
|
85
83
|
enabled: boolean;
|