@juspay/neurolink 5.3.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +76 -2
- package/dist/chat/client-utils.d.ts +3 -0
- package/dist/chat/client-utils.js +22 -5
- package/dist/chat/index.d.ts +4 -7
- package/dist/chat/index.js +0 -8
- package/dist/chat/session-storage.d.ts +2 -2
- package/dist/chat/session.d.ts +4 -3
- package/dist/chat/session.js +1 -1
- package/dist/chat/sse-handler.js +13 -21
- package/dist/chat/types.d.ts +3 -2
- package/dist/chat/websocket-chat-handler.d.ts +4 -3
- package/dist/chat/websocket-chat-handler.js +12 -12
- package/dist/cli/commands/config.d.ts +2 -2
- package/dist/cli/commands/mcp.d.ts +3 -2
- package/dist/cli/commands/mcp.js +39 -29
- package/dist/cli/commands/ollama.js +8 -4
- package/dist/cli/factories/command-factory.d.ts +2 -1
- package/dist/cli/index.js +22 -19
- package/dist/core/analytics.d.ts +3 -2
- package/dist/core/analytics.js +16 -7
- package/dist/core/base-provider.d.ts +35 -7
- package/dist/core/base-provider.js +36 -13
- package/dist/core/defaults.d.ts +2 -1
- package/dist/core/evaluation.d.ts +4 -4
- package/dist/core/evaluation.js +17 -7
- package/dist/core/factory.d.ts +3 -2
- package/dist/core/service-registry.d.ts +4 -4
- package/dist/core/types.d.ts +11 -4
- package/dist/factories/compatibility-factory.d.ts +16 -1
- package/dist/factories/compatibility-factory.js +3 -1
- package/dist/factories/provider-factory.d.ts +5 -4
- package/dist/factories/provider-factory.js +15 -24
- package/dist/factories/provider-generate-factory.js +26 -20
- package/dist/lib/chat/client-utils.d.ts +3 -0
- package/dist/lib/chat/client-utils.js +22 -5
- package/dist/lib/chat/index.d.ts +4 -7
- package/dist/lib/chat/index.js +0 -8
- package/dist/lib/chat/session-storage.d.ts +2 -2
- package/dist/lib/chat/session.d.ts +4 -3
- package/dist/lib/chat/session.js +1 -1
- package/dist/lib/chat/sse-handler.js +13 -21
- package/dist/lib/chat/types.d.ts +3 -2
- package/dist/lib/chat/websocket-chat-handler.d.ts +4 -3
- package/dist/lib/chat/websocket-chat-handler.js +12 -12
- package/dist/lib/core/analytics.d.ts +3 -2
- package/dist/lib/core/analytics.js +16 -7
- package/dist/lib/core/base-provider.d.ts +35 -7
- package/dist/lib/core/base-provider.js +36 -13
- package/dist/lib/core/defaults.d.ts +2 -1
- package/dist/lib/core/evaluation.d.ts +4 -4
- package/dist/lib/core/evaluation.js +17 -7
- package/dist/lib/core/factory.d.ts +3 -2
- package/dist/lib/core/service-registry.d.ts +4 -4
- package/dist/lib/core/types.d.ts +11 -4
- package/dist/lib/factories/compatibility-factory.d.ts +16 -1
- package/dist/lib/factories/compatibility-factory.js +3 -1
- package/dist/lib/factories/provider-factory.d.ts +5 -4
- package/dist/lib/factories/provider-factory.js +15 -24
- package/dist/lib/factories/provider-generate-factory.js +26 -20
- package/dist/lib/mcp/adapters/plugin-bridge.d.ts +5 -4
- package/dist/lib/mcp/adapters/plugin-bridge.js +13 -6
- package/dist/lib/mcp/client.d.ts +2 -1
- package/dist/lib/mcp/client.js +12 -10
- package/dist/lib/mcp/context-manager.d.ts +1 -1
- package/dist/lib/mcp/contracts/mcp-contract.d.ts +15 -8
- package/dist/lib/mcp/core/plugin-manager.d.ts +3 -2
- package/dist/lib/mcp/core/plugin-manager.js +1 -1
- package/dist/lib/mcp/demo/plugin-demo.js +3 -1
- package/dist/lib/mcp/dynamic-chain-executor.d.ts +64 -40
- package/dist/lib/mcp/dynamic-chain-executor.js +3 -3
- package/dist/lib/mcp/dynamic-orchestrator.d.ts +14 -8
- package/dist/lib/mcp/ecosystem.d.ts +4 -4
- package/dist/lib/mcp/error-manager.d.ts +2 -2
- package/dist/lib/mcp/error-recovery.d.ts +4 -3
- package/dist/lib/mcp/external-client.d.ts +1 -1
- package/dist/lib/mcp/external-client.js +14 -10
- package/dist/lib/mcp/external-manager.d.ts +3 -3
- package/dist/lib/mcp/external-manager.js +9 -3
- package/dist/lib/mcp/factory.d.ts +7 -7
- package/dist/lib/mcp/function-calling.d.ts +3 -2
- package/dist/lib/mcp/health-monitor.d.ts +2 -1
- package/dist/lib/mcp/health-monitor.js +16 -7
- package/dist/lib/mcp/index.d.ts +5 -5
- package/dist/lib/mcp/initialize-tools.d.ts +2 -1
- package/dist/lib/mcp/initialize-tools.js +10 -2
- package/dist/lib/mcp/manager.d.ts +2 -1
- package/dist/lib/mcp/neurolink-mcp-client.js +1 -1
- package/dist/lib/mcp/orchestrator.d.ts +13 -12
- package/dist/lib/mcp/orchestrator.js +10 -8
- package/dist/lib/mcp/plugin-manager.js +4 -2
- package/dist/lib/mcp/plugins/core/filesystem-mcp.d.ts +3 -2
- package/dist/lib/mcp/plugins/core/filesystem-mcp.js +5 -2
- package/dist/lib/mcp/plugins/filesystem-mcp.d.ts +2 -1
- package/dist/lib/mcp/registry.d.ts +2 -1
- package/dist/lib/mcp/registry.js +2 -1
- package/dist/lib/mcp/security-manager.d.ts +4 -2
- package/dist/lib/mcp/servers/agent/direct-tools-server.js +18 -6
- package/dist/lib/mcp/servers/ai-providers/ai-analysis-tools.d.ts +1 -16
- package/dist/lib/mcp/servers/ai-providers/ai-analysis-tools.js +21 -17
- package/dist/lib/mcp/servers/ai-providers/ai-core-server.d.ts +2 -2
- package/dist/lib/mcp/servers/ai-providers/ai-core-server.js +15 -133
- package/dist/lib/mcp/servers/ai-providers/ai-workflow-tools.d.ts +1 -97
- package/dist/lib/mcp/servers/ai-providers/ai-workflow-tools.js +18 -18
- package/dist/lib/mcp/session-manager.d.ts +4 -3
- package/dist/lib/mcp/session-persistence.js +5 -2
- package/dist/lib/mcp/tool-integration.d.ts +3 -2
- package/dist/lib/mcp/tool-integration.js +3 -1
- package/dist/lib/mcp/tool-registry.d.ts +18 -1
- package/dist/lib/mcp/tool-registry.js +11 -8
- package/dist/lib/mcp/transport-manager.d.ts +2 -1
- package/dist/lib/mcp/transport-manager.js +5 -1
- package/dist/lib/mcp/unified-mcp.d.ts +5 -5
- package/dist/lib/mcp/unified-registry.d.ts +18 -2
- package/dist/lib/mcp/unified-registry.js +52 -3
- package/dist/lib/neurolink.d.ts +2 -2
- package/dist/lib/neurolink.js +40 -15
- package/dist/lib/providers/amazon-bedrock.d.ts +1 -1
- package/dist/lib/providers/amazon-bedrock.js +8 -7
- package/dist/lib/providers/analytics-helper.d.ts +8 -23
- package/dist/lib/providers/analytics-helper.js +95 -33
- package/dist/lib/providers/anthropic-baseprovider.d.ts +3 -3
- package/dist/lib/providers/anthropic-baseprovider.js +6 -5
- package/dist/lib/providers/anthropic.d.ts +2 -2
- package/dist/lib/providers/anthropic.js +11 -4
- package/dist/lib/providers/azure-openai.d.ts +5 -4
- package/dist/lib/providers/azure-openai.js +10 -4
- package/dist/lib/providers/function-calling-provider.d.ts +2 -2
- package/dist/lib/providers/function-calling-provider.js +1 -1
- package/dist/lib/providers/google-ai-studio.d.ts +2 -2
- package/dist/lib/providers/google-ai-studio.js +9 -3
- package/dist/lib/providers/google-vertex.d.ts +2 -2
- package/dist/lib/providers/google-vertex.js +18 -12
- package/dist/lib/providers/huggingFace.d.ts +1 -1
- package/dist/lib/providers/huggingFace.js +8 -4
- package/dist/lib/providers/mcp-provider.d.ts +3 -3
- package/dist/lib/providers/mistral.d.ts +34 -27
- package/dist/lib/providers/mistral.js +115 -107
- package/dist/lib/providers/ollama.d.ts +2 -1
- package/dist/lib/providers/ollama.js +43 -3
- package/dist/lib/providers/openAI.d.ts +1 -1
- package/dist/lib/providers/openAI.js +8 -4
- package/dist/lib/proxy/proxy-fetch.js +3 -2
- package/dist/lib/sdk/tool-extension.d.ts +12 -12
- package/dist/lib/sdk/tool-extension.js +2 -1
- package/dist/lib/sdk/tool-registration.d.ts +16 -12
- package/dist/lib/sdk/tool-registration.js +3 -2
- package/dist/lib/services/types.d.ts +5 -4
- package/dist/lib/services/websocket/websocket-server.d.ts +1 -1
- package/dist/lib/services/websocket/websocket-server.js +1 -1
- package/dist/lib/telemetry/telemetry-service.js +1 -1
- package/dist/lib/types/cli.d.ts +247 -0
- package/dist/lib/types/cli.js +22 -0
- package/dist/lib/types/common.d.ts +76 -0
- package/dist/lib/types/common.js +52 -0
- package/dist/lib/types/generate-types.d.ts +6 -6
- package/dist/lib/types/index.d.ts +12 -0
- package/dist/lib/types/index.js +12 -0
- package/dist/lib/types/mcp-types.d.ts +7 -7
- package/dist/lib/types/providers.d.ts +158 -0
- package/dist/lib/types/providers.js +23 -0
- package/dist/lib/types/stream-types.d.ts +4 -3
- package/dist/lib/types/tools.d.ts +154 -0
- package/dist/lib/types/tools.js +24 -0
- package/dist/lib/utils/logger.d.ts +5 -5
- package/dist/lib/utils/provider-validation.d.ts +2 -1
- package/dist/mcp/adapters/plugin-bridge.d.ts +5 -4
- package/dist/mcp/adapters/plugin-bridge.js +13 -6
- package/dist/mcp/client.d.ts +2 -1
- package/dist/mcp/client.js +12 -10
- package/dist/mcp/context-manager.d.ts +1 -1
- package/dist/mcp/contracts/mcp-contract.d.ts +15 -8
- package/dist/mcp/core/plugin-manager.d.ts +3 -2
- package/dist/mcp/core/plugin-manager.js +1 -1
- package/dist/mcp/demo/plugin-demo.js +3 -1
- package/dist/mcp/dynamic-chain-executor.d.ts +64 -40
- package/dist/mcp/dynamic-chain-executor.js +3 -3
- package/dist/mcp/dynamic-orchestrator.d.ts +14 -8
- package/dist/mcp/dynamic-orchestrator.js +1 -1
- package/dist/mcp/ecosystem.d.ts +4 -4
- package/dist/mcp/error-manager.d.ts +2 -2
- package/dist/mcp/error-recovery.d.ts +4 -3
- package/dist/mcp/external-client.d.ts +1 -1
- package/dist/mcp/external-client.js +14 -10
- package/dist/mcp/external-manager.d.ts +3 -3
- package/dist/mcp/external-manager.js +9 -3
- package/dist/mcp/factory.d.ts +7 -7
- package/dist/mcp/function-calling.d.ts +3 -2
- package/dist/mcp/health-monitor.d.ts +2 -1
- package/dist/mcp/health-monitor.js +16 -7
- package/dist/mcp/index.d.ts +5 -5
- package/dist/mcp/initialize-tools.d.ts +2 -1
- package/dist/mcp/initialize-tools.js +10 -2
- package/dist/mcp/manager.d.ts +2 -1
- package/dist/mcp/neurolink-mcp-client.js +1 -1
- package/dist/mcp/orchestrator.d.ts +13 -12
- package/dist/mcp/orchestrator.js +10 -8
- package/dist/mcp/plugin-manager.js +4 -2
- package/dist/mcp/plugins/core/filesystem-mcp.d.ts +3 -2
- package/dist/mcp/plugins/core/filesystem-mcp.js +5 -2
- package/dist/mcp/plugins/filesystem-mcp.d.ts +2 -1
- package/dist/mcp/registry.d.ts +2 -1
- package/dist/mcp/registry.js +2 -1
- package/dist/mcp/security-manager.d.ts +4 -2
- package/dist/mcp/servers/agent/direct-tools-server.js +19 -6
- package/dist/mcp/servers/ai-providers/ai-analysis-tools.d.ts +1 -16
- package/dist/mcp/servers/ai-providers/ai-analysis-tools.js +21 -17
- package/dist/mcp/servers/ai-providers/ai-core-server.d.ts +2 -2
- package/dist/mcp/servers/ai-providers/ai-core-server.js +15 -132
- package/dist/mcp/servers/ai-providers/ai-workflow-tools.d.ts +1 -97
- package/dist/mcp/servers/ai-providers/ai-workflow-tools.js +18 -18
- package/dist/mcp/session-manager.d.ts +4 -3
- package/dist/mcp/session-persistence.js +5 -2
- package/dist/mcp/tool-integration.d.ts +3 -2
- package/dist/mcp/tool-integration.js +3 -1
- package/dist/mcp/tool-registry.d.ts +18 -1
- package/dist/mcp/tool-registry.js +11 -8
- package/dist/mcp/transport-manager.d.ts +2 -1
- package/dist/mcp/transport-manager.js +5 -1
- package/dist/mcp/unified-mcp.d.ts +5 -5
- package/dist/mcp/unified-registry.d.ts +18 -2
- package/dist/mcp/unified-registry.js +52 -3
- package/dist/neurolink.d.ts +2 -2
- package/dist/neurolink.js +40 -15
- package/dist/providers/amazon-bedrock.d.ts +1 -1
- package/dist/providers/amazon-bedrock.js +8 -7
- package/dist/providers/analytics-helper.d.ts +8 -23
- package/dist/providers/analytics-helper.js +95 -33
- package/dist/providers/anthropic-baseprovider.d.ts +3 -3
- package/dist/providers/anthropic-baseprovider.js +6 -5
- package/dist/providers/anthropic.d.ts +2 -2
- package/dist/providers/anthropic.js +11 -4
- package/dist/providers/azure-openai.d.ts +5 -4
- package/dist/providers/azure-openai.js +10 -4
- package/dist/providers/function-calling-provider.d.ts +2 -2
- package/dist/providers/function-calling-provider.js +1 -1
- package/dist/providers/google-ai-studio.d.ts +2 -2
- package/dist/providers/google-ai-studio.js +9 -3
- package/dist/providers/google-vertex.d.ts +2 -2
- package/dist/providers/google-vertex.js +18 -12
- package/dist/providers/huggingFace.d.ts +1 -1
- package/dist/providers/huggingFace.js +8 -4
- package/dist/providers/mcp-provider.d.ts +3 -3
- package/dist/providers/mistral.d.ts +34 -27
- package/dist/providers/mistral.js +116 -108
- package/dist/providers/ollama.d.ts +2 -1
- package/dist/providers/ollama.js +43 -3
- package/dist/providers/openAI.d.ts +1 -1
- package/dist/providers/openAI.js +8 -4
- package/dist/proxy/proxy-fetch.js +3 -2
- package/dist/sdk/tool-extension.d.ts +12 -12
- package/dist/sdk/tool-extension.js +2 -1
- package/dist/sdk/tool-registration.d.ts +16 -12
- package/dist/sdk/tool-registration.js +3 -2
- package/dist/services/types.d.ts +5 -4
- package/dist/services/websocket/websocket-server.d.ts +1 -1
- package/dist/services/websocket/websocket-server.js +2 -1
- package/dist/telemetry/telemetry-service.js +1 -1
- package/dist/types/cli.d.ts +247 -0
- package/dist/types/cli.js +22 -0
- package/dist/types/common.d.ts +76 -0
- package/dist/types/common.js +52 -0
- package/dist/types/generate-types.d.ts +6 -6
- package/dist/types/index.d.ts +12 -0
- package/dist/types/index.js +12 -0
- package/dist/types/mcp-types.d.ts +7 -7
- package/dist/types/providers.d.ts +158 -0
- package/dist/types/providers.js +23 -0
- package/dist/types/stream-types.d.ts +4 -3
- package/dist/types/tools.d.ts +154 -0
- package/dist/types/tools.js +25 -0
- package/dist/utils/logger.d.ts +5 -5
- package/dist/utils/provider-validation.d.ts +2 -1
- package/package.json +1 -1
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Common utility types for NeuroLink
|
|
3
|
+
* These types provide type-safe alternatives to 'any' usage
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Type-safe unknown value - use instead of 'any' when type is truly unknown
|
|
7
|
+
*/
|
|
8
|
+
export type Unknown = unknown;
|
|
9
|
+
/**
|
|
10
|
+
* Type-safe record for metadata and configuration objects
|
|
11
|
+
*/
|
|
12
|
+
export type UnknownRecord = Record<string, unknown>;
|
|
13
|
+
/**
|
|
14
|
+
* Type-safe array of unknown items
|
|
15
|
+
*/
|
|
16
|
+
export type UnknownArray = unknown[];
|
|
17
|
+
/**
|
|
18
|
+
* JSON-serializable value type
|
|
19
|
+
*/
|
|
20
|
+
export type JsonValue = string | number | boolean | null | JsonObject | JsonArray;
|
|
21
|
+
export interface JsonObject {
|
|
22
|
+
[key: string]: JsonValue;
|
|
23
|
+
}
|
|
24
|
+
export interface JsonArray extends Array<JsonValue> {
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Type-safe error handling
|
|
28
|
+
*/
|
|
29
|
+
export interface ErrorInfo {
|
|
30
|
+
message: string;
|
|
31
|
+
code?: string | number;
|
|
32
|
+
stack?: string;
|
|
33
|
+
cause?: unknown;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Generic success/error result type
|
|
37
|
+
*/
|
|
38
|
+
export interface Result<T = unknown, E = ErrorInfo> {
|
|
39
|
+
success: boolean;
|
|
40
|
+
data?: T;
|
|
41
|
+
error?: E;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Function parameter type for dynamic functions
|
|
45
|
+
*/
|
|
46
|
+
export interface FunctionParameters {
|
|
47
|
+
[key: string]: unknown;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Generic async function type
|
|
51
|
+
*/
|
|
52
|
+
export type AsyncFunction<TParams = FunctionParameters, TResult = unknown> = (params: TParams) => Promise<TResult>;
|
|
53
|
+
/**
|
|
54
|
+
* Sync function type
|
|
55
|
+
*/
|
|
56
|
+
export type SyncFunction<TParams = FunctionParameters, TResult = unknown> = (params: TParams) => TResult;
|
|
57
|
+
/**
|
|
58
|
+
* Union of async and sync functions
|
|
59
|
+
*/
|
|
60
|
+
export type AnyFunction<TParams = FunctionParameters, TResult = unknown> = AsyncFunction<TParams, TResult> | SyncFunction<TParams, TResult>;
|
|
61
|
+
/**
|
|
62
|
+
* Type guard to check if value is Error
|
|
63
|
+
*/
|
|
64
|
+
export declare function isError(value: unknown): value is Error;
|
|
65
|
+
/**
|
|
66
|
+
* Type guard to check if value is ErrorInfo
|
|
67
|
+
*/
|
|
68
|
+
export declare function isErrorInfo(value: unknown): value is ErrorInfo;
|
|
69
|
+
/**
|
|
70
|
+
* Safe error message extraction
|
|
71
|
+
*/
|
|
72
|
+
export declare function getErrorMessage(error: unknown): string;
|
|
73
|
+
/**
|
|
74
|
+
* Safe error conversion
|
|
75
|
+
*/
|
|
76
|
+
export declare function toErrorInfo(error: unknown): ErrorInfo;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Common utility types for NeuroLink
|
|
3
|
+
* These types provide type-safe alternatives to 'any' usage
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Type guard to check if value is Error
|
|
7
|
+
*/
|
|
8
|
+
export function isError(value) {
|
|
9
|
+
return value instanceof Error;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Type guard to check if value is ErrorInfo
|
|
13
|
+
*/
|
|
14
|
+
export function isErrorInfo(value) {
|
|
15
|
+
return (typeof value === "object" &&
|
|
16
|
+
value !== null &&
|
|
17
|
+
"message" in value &&
|
|
18
|
+
typeof value.message === "string");
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Safe error message extraction
|
|
22
|
+
*/
|
|
23
|
+
export function getErrorMessage(error) {
|
|
24
|
+
if (isError(error)) {
|
|
25
|
+
return error.message;
|
|
26
|
+
}
|
|
27
|
+
if (isErrorInfo(error)) {
|
|
28
|
+
return error.message;
|
|
29
|
+
}
|
|
30
|
+
if (typeof error === "string") {
|
|
31
|
+
return error;
|
|
32
|
+
}
|
|
33
|
+
return String(error);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Safe error conversion
|
|
37
|
+
*/
|
|
38
|
+
export function toErrorInfo(error) {
|
|
39
|
+
if (isError(error)) {
|
|
40
|
+
return {
|
|
41
|
+
message: error.message,
|
|
42
|
+
stack: error.stack,
|
|
43
|
+
code: error.code,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
if (isErrorInfo(error)) {
|
|
47
|
+
return error;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
message: getErrorMessage(error),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -23,7 +23,7 @@ export interface GenerateOptions {
|
|
|
23
23
|
disableTools?: boolean;
|
|
24
24
|
enableEvaluation?: boolean;
|
|
25
25
|
enableAnalytics?: boolean;
|
|
26
|
-
context?: Record<string,
|
|
26
|
+
context?: Record<string, unknown>;
|
|
27
27
|
evaluationDomain?: string;
|
|
28
28
|
toolUsageContext?: string;
|
|
29
29
|
conversationHistory?: Array<{
|
|
@@ -51,21 +51,21 @@ export interface GenerateResult {
|
|
|
51
51
|
toolCalls?: Array<{
|
|
52
52
|
toolCallId: string;
|
|
53
53
|
toolName: string;
|
|
54
|
-
args: Record<string,
|
|
54
|
+
args: Record<string, unknown>;
|
|
55
55
|
}>;
|
|
56
|
-
toolResults?:
|
|
56
|
+
toolResults?: unknown[];
|
|
57
57
|
toolsUsed?: string[];
|
|
58
58
|
toolExecutions?: Array<{
|
|
59
59
|
name: string;
|
|
60
|
-
input: Record<string,
|
|
61
|
-
output:
|
|
60
|
+
input: Record<string, unknown>;
|
|
61
|
+
output: unknown;
|
|
62
62
|
duration: number;
|
|
63
63
|
}>;
|
|
64
64
|
enhancedWithTools?: boolean;
|
|
65
65
|
availableTools?: Array<{
|
|
66
66
|
name: string;
|
|
67
67
|
description: string;
|
|
68
|
-
parameters: Record<string,
|
|
68
|
+
parameters: Record<string, unknown>;
|
|
69
69
|
}>;
|
|
70
70
|
analytics?: AnalyticsData;
|
|
71
71
|
evaluation?: EvaluationData;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized type exports for NeuroLink
|
|
3
|
+
* Provides type-safe alternatives to 'any' usage throughout the codebase
|
|
4
|
+
*/
|
|
5
|
+
export * from "./common.js";
|
|
6
|
+
export * from "./tools.js";
|
|
7
|
+
export * from "./providers.js";
|
|
8
|
+
export * from "./cli.js";
|
|
9
|
+
export type { Unknown, UnknownRecord, UnknownArray, JsonValue, JsonObject, JsonArray, ErrorInfo, Result, FunctionParameters, } from "./common.js";
|
|
10
|
+
export type { ToolArgs, ToolContext, ToolResult, ToolDefinition, SimpleTool, AvailableTool, ToolExecution, } from "./tools.js";
|
|
11
|
+
export type { AISDKModel, ProviderError, TokenUsage, AnalyticsData, EvaluationData, ProviderConfig, } from "./providers.js";
|
|
12
|
+
export type { BaseCommandArgs, GenerateCommandArgs, CommandResult, GenerateResult, StreamChunk, } from "./cli.js";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized type exports for NeuroLink
|
|
3
|
+
* Provides type-safe alternatives to 'any' usage throughout the codebase
|
|
4
|
+
*/
|
|
5
|
+
// Common utility types
|
|
6
|
+
export * from "./common.js";
|
|
7
|
+
// Tool system types
|
|
8
|
+
export * from "./tools.js";
|
|
9
|
+
// Provider types
|
|
10
|
+
export * from "./providers.js";
|
|
11
|
+
// CLI types
|
|
12
|
+
export * from "./cli.js";
|
|
@@ -34,7 +34,7 @@ export interface InMemoryMCPServerConfig {
|
|
|
34
34
|
provider?: string;
|
|
35
35
|
version?: string;
|
|
36
36
|
author?: string;
|
|
37
|
-
[key: string]:
|
|
37
|
+
[key: string]: unknown;
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
@@ -48,11 +48,11 @@ export interface InMemoryToolInfo {
|
|
|
48
48
|
/**
|
|
49
49
|
* Tool execution function
|
|
50
50
|
*/
|
|
51
|
-
execute: (params:
|
|
51
|
+
execute: (params: unknown) => Promise<InMemoryToolResult> | InMemoryToolResult;
|
|
52
52
|
/**
|
|
53
53
|
* Input parameter schema (Zod or JSON Schema)
|
|
54
54
|
*/
|
|
55
|
-
inputSchema?:
|
|
55
|
+
inputSchema?: unknown;
|
|
56
56
|
/**
|
|
57
57
|
* Whether the tool is implemented (default: true)
|
|
58
58
|
*/
|
|
@@ -60,7 +60,7 @@ export interface InMemoryToolInfo {
|
|
|
60
60
|
/**
|
|
61
61
|
* Optional metadata
|
|
62
62
|
*/
|
|
63
|
-
metadata?: Record<string,
|
|
63
|
+
metadata?: Record<string, unknown>;
|
|
64
64
|
}
|
|
65
65
|
/**
|
|
66
66
|
* Result from in-memory tool execution
|
|
@@ -73,7 +73,7 @@ export interface InMemoryToolResult {
|
|
|
73
73
|
/**
|
|
74
74
|
* Result data if successful
|
|
75
75
|
*/
|
|
76
|
-
data?:
|
|
76
|
+
data?: unknown;
|
|
77
77
|
/**
|
|
78
78
|
* Error message if failed
|
|
79
79
|
*/
|
|
@@ -85,7 +85,7 @@ export interface InMemoryToolResult {
|
|
|
85
85
|
executionTime?: number;
|
|
86
86
|
toolName?: string;
|
|
87
87
|
serverId?: string;
|
|
88
|
-
[key: string]:
|
|
88
|
+
[key: string]: unknown;
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
91
|
/**
|
|
@@ -108,7 +108,7 @@ export interface UnifiedMCPRegistry {
|
|
|
108
108
|
/**
|
|
109
109
|
* Execute a tool
|
|
110
110
|
*/
|
|
111
|
-
executeTool(toolName: string, params:
|
|
111
|
+
executeTool(toolName: string, params: unknown, context: unknown): Promise<unknown>;
|
|
112
112
|
/**
|
|
113
113
|
* Check if connected to a server
|
|
114
114
|
*/
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provider-specific type definitions for NeuroLink
|
|
3
|
+
* Replaces 'any' types in provider implementations
|
|
4
|
+
*/
|
|
5
|
+
import type { UnknownRecord, JsonValue } from "./common.js";
|
|
6
|
+
/**
|
|
7
|
+
* Generic AI SDK model interface
|
|
8
|
+
*/
|
|
9
|
+
export interface AISDKModel {
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Provider error information
|
|
14
|
+
*/
|
|
15
|
+
export interface ProviderError extends Error {
|
|
16
|
+
code?: string | number;
|
|
17
|
+
statusCode?: number;
|
|
18
|
+
provider?: string;
|
|
19
|
+
originalError?: unknown;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Token usage information
|
|
23
|
+
*/
|
|
24
|
+
export interface TokenUsage {
|
|
25
|
+
inputTokens: number;
|
|
26
|
+
outputTokens: number;
|
|
27
|
+
totalTokens: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Analytics data structure
|
|
31
|
+
*/
|
|
32
|
+
export interface AnalyticsData {
|
|
33
|
+
provider: string;
|
|
34
|
+
model: string;
|
|
35
|
+
requestDuration: number;
|
|
36
|
+
tokenUsage: {
|
|
37
|
+
inputTokens: number;
|
|
38
|
+
outputTokens: number;
|
|
39
|
+
totalTokens: number;
|
|
40
|
+
};
|
|
41
|
+
timestamp: number;
|
|
42
|
+
context?: JsonValue;
|
|
43
|
+
[key: string]: JsonValue | undefined;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Evaluation data structure
|
|
47
|
+
*/
|
|
48
|
+
export interface EvaluationData {
|
|
49
|
+
relevance?: number;
|
|
50
|
+
accuracy?: number;
|
|
51
|
+
completeness?: number;
|
|
52
|
+
coherence?: number;
|
|
53
|
+
overall?: number;
|
|
54
|
+
feedback?: string;
|
|
55
|
+
[key: string]: JsonValue | undefined;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Provider capabilities
|
|
59
|
+
*/
|
|
60
|
+
export interface ProviderCapabilities {
|
|
61
|
+
supportsStreaming: boolean;
|
|
62
|
+
supportsTools: boolean;
|
|
63
|
+
supportsImages: boolean;
|
|
64
|
+
supportsAudio: boolean;
|
|
65
|
+
maxTokens?: number;
|
|
66
|
+
supportedModels: string[];
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Provider configuration
|
|
70
|
+
*/
|
|
71
|
+
export interface ProviderConfig {
|
|
72
|
+
apiKey?: string;
|
|
73
|
+
baseURL?: string;
|
|
74
|
+
timeout?: number;
|
|
75
|
+
retries?: number;
|
|
76
|
+
model?: string;
|
|
77
|
+
[key: string]: unknown;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Amazon Bedrock specific types
|
|
81
|
+
*/
|
|
82
|
+
export declare namespace BedrockTypes {
|
|
83
|
+
interface Client {
|
|
84
|
+
send(command: unknown): Promise<unknown>;
|
|
85
|
+
config: {
|
|
86
|
+
region?: string;
|
|
87
|
+
credentials?: unknown;
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
interface InvokeModelCommand {
|
|
91
|
+
input: {
|
|
92
|
+
modelId: string;
|
|
93
|
+
body: string;
|
|
94
|
+
contentType?: string;
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Mistral specific types
|
|
100
|
+
*/
|
|
101
|
+
export declare namespace MistralTypes {
|
|
102
|
+
interface Client {
|
|
103
|
+
chat?: {
|
|
104
|
+
complete?: (options: unknown) => Promise<unknown>;
|
|
105
|
+
stream?: (options: unknown) => AsyncIterable<unknown>;
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* OpenTelemetry specific types (for telemetry service)
|
|
111
|
+
*/
|
|
112
|
+
export declare namespace TelemetryTypes {
|
|
113
|
+
interface Meter {
|
|
114
|
+
createCounter(name: string, options?: unknown): Counter;
|
|
115
|
+
createHistogram(name: string, options?: unknown): Histogram;
|
|
116
|
+
}
|
|
117
|
+
interface Tracer {
|
|
118
|
+
startSpan(name: string, options?: unknown): Span;
|
|
119
|
+
}
|
|
120
|
+
interface Counter {
|
|
121
|
+
add(value: number, attributes?: UnknownRecord): void;
|
|
122
|
+
}
|
|
123
|
+
interface Histogram {
|
|
124
|
+
record(value: number, attributes?: UnknownRecord): void;
|
|
125
|
+
}
|
|
126
|
+
interface Span {
|
|
127
|
+
end(): void;
|
|
128
|
+
setStatus(status: unknown): void;
|
|
129
|
+
recordException(exception: unknown): void;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Provider factory function type
|
|
134
|
+
*/
|
|
135
|
+
export type ProviderFactory = (modelName?: string, providerName?: string, sdk?: unknown) => Promise<unknown>;
|
|
136
|
+
/**
|
|
137
|
+
* Provider constructor type
|
|
138
|
+
*/
|
|
139
|
+
export interface ProviderConstructor {
|
|
140
|
+
new (modelName?: string, providerName?: string, sdk?: unknown): unknown;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Provider registration entry
|
|
144
|
+
*/
|
|
145
|
+
export interface ProviderRegistration {
|
|
146
|
+
name: string;
|
|
147
|
+
constructor: ProviderConstructor | ProviderFactory;
|
|
148
|
+
capabilities?: ProviderCapabilities;
|
|
149
|
+
defaultConfig?: ProviderConfig;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Type guard for provider error
|
|
153
|
+
*/
|
|
154
|
+
export declare function isProviderError(error: unknown): error is ProviderError;
|
|
155
|
+
/**
|
|
156
|
+
* Type guard for token usage
|
|
157
|
+
*/
|
|
158
|
+
export declare function isTokenUsage(value: unknown): value is TokenUsage;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provider-specific type definitions for NeuroLink
|
|
3
|
+
* Replaces 'any' types in provider implementations
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Type guard for provider error
|
|
7
|
+
*/
|
|
8
|
+
export function isProviderError(error) {
|
|
9
|
+
return error instanceof Error && "provider" in error;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Type guard for token usage
|
|
13
|
+
*/
|
|
14
|
+
export function isTokenUsage(value) {
|
|
15
|
+
return (typeof value === "object" &&
|
|
16
|
+
value !== null &&
|
|
17
|
+
"inputTokens" in value &&
|
|
18
|
+
"outputTokens" in value &&
|
|
19
|
+
"totalTokens" in value &&
|
|
20
|
+
typeof value.inputTokens === "number" &&
|
|
21
|
+
typeof value.outputTokens === "number" &&
|
|
22
|
+
typeof value.totalTokens === "number");
|
|
23
|
+
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { ZodType, ZodTypeDef } from "zod";
|
|
2
2
|
import type { Tool, Schema } from "ai";
|
|
3
3
|
import type { AIProviderName, AnalyticsData, EvaluationData } from "../core/types.js";
|
|
4
|
+
import type { UnknownRecord, Unknown } from "./common.js";
|
|
4
5
|
/**
|
|
5
6
|
* Interface for tool execution calls
|
|
6
7
|
*/
|
|
7
8
|
export interface ToolCall {
|
|
8
9
|
toolName: string;
|
|
9
|
-
parameters:
|
|
10
|
+
parameters: UnknownRecord;
|
|
10
11
|
id?: string;
|
|
11
12
|
}
|
|
12
13
|
/**
|
|
@@ -15,7 +16,7 @@ export interface ToolCall {
|
|
|
15
16
|
export interface ToolResult {
|
|
16
17
|
toolName: string;
|
|
17
18
|
status: "success" | "failure";
|
|
18
|
-
output?:
|
|
19
|
+
output?: Unknown;
|
|
19
20
|
error?: string;
|
|
20
21
|
id?: string;
|
|
21
22
|
executionTime?: number;
|
|
@@ -48,7 +49,7 @@ export interface StreamOptions {
|
|
|
48
49
|
maxSteps?: number;
|
|
49
50
|
enableEvaluation?: boolean;
|
|
50
51
|
enableAnalytics?: boolean;
|
|
51
|
-
context?:
|
|
52
|
+
context?: UnknownRecord;
|
|
52
53
|
evaluationDomain?: string;
|
|
53
54
|
toolUsageContext?: string;
|
|
54
55
|
conversationHistory?: Array<{
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool system type definitions for NeuroLink
|
|
3
|
+
* Replaces 'any' types in tool registration and execution
|
|
4
|
+
*/
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
import type { Result, JsonValue, ErrorInfo } from "./common.js";
|
|
7
|
+
/**
|
|
8
|
+
* Tool parameter schema types
|
|
9
|
+
*/
|
|
10
|
+
export type ToolParameterSchema = z.ZodSchema | Record<string, JsonValue>;
|
|
11
|
+
/**
|
|
12
|
+
* Standard tool input parameters
|
|
13
|
+
*/
|
|
14
|
+
export interface BaseToolArgs {
|
|
15
|
+
[key: string]: JsonValue | undefined;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Tool execution arguments with specific common patterns
|
|
19
|
+
*/
|
|
20
|
+
export interface ToolArgs extends BaseToolArgs {
|
|
21
|
+
input?: JsonValue;
|
|
22
|
+
data?: JsonValue;
|
|
23
|
+
options?: JsonValue;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Tool execution metadata
|
|
27
|
+
*/
|
|
28
|
+
export interface ToolExecutionMetadata {
|
|
29
|
+
requestId?: string;
|
|
30
|
+
startTime?: number;
|
|
31
|
+
version?: string;
|
|
32
|
+
[key: string]: JsonValue | undefined;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Tool execution context
|
|
36
|
+
*/
|
|
37
|
+
export interface ToolContext {
|
|
38
|
+
sessionId?: string;
|
|
39
|
+
userId?: string;
|
|
40
|
+
aiProvider?: string;
|
|
41
|
+
metadata?: ToolExecutionMetadata;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Tool execution result metadata
|
|
45
|
+
*/
|
|
46
|
+
export interface ToolResultMetadata {
|
|
47
|
+
toolName?: string;
|
|
48
|
+
executionTime?: number;
|
|
49
|
+
timestamp?: number;
|
|
50
|
+
source?: string;
|
|
51
|
+
version?: string;
|
|
52
|
+
serverId?: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Tool execution result
|
|
56
|
+
*/
|
|
57
|
+
export interface ToolResult<T = JsonValue> extends Result<T, ErrorInfo> {
|
|
58
|
+
success: boolean;
|
|
59
|
+
data?: T;
|
|
60
|
+
error?: ErrorInfo;
|
|
61
|
+
metadata?: ToolResultMetadata;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Tool metadata for registration
|
|
65
|
+
*/
|
|
66
|
+
export interface ToolMetadata {
|
|
67
|
+
category?: string;
|
|
68
|
+
version?: string;
|
|
69
|
+
author?: string;
|
|
70
|
+
tags?: string[];
|
|
71
|
+
documentation?: string;
|
|
72
|
+
[key: string]: JsonValue | undefined;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Tool definition interface
|
|
76
|
+
*/
|
|
77
|
+
export interface ToolDefinition<TArgs = ToolArgs, TResult = JsonValue> {
|
|
78
|
+
description: string;
|
|
79
|
+
parameters?: ToolParameterSchema;
|
|
80
|
+
metadata?: ToolMetadata;
|
|
81
|
+
execute: (args: TArgs, context?: ToolContext) => Promise<ToolResult<TResult>> | ToolResult<TResult>;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Simple tool interface (for SDK)
|
|
85
|
+
*/
|
|
86
|
+
export interface SimpleTool<TArgs = ToolArgs, TResult = JsonValue> {
|
|
87
|
+
description: string;
|
|
88
|
+
parameters?: z.ZodSchema;
|
|
89
|
+
metadata?: ToolMetadata;
|
|
90
|
+
execute: (args: TArgs, context?: ToolContext) => Promise<TResult> | TResult;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Tool registry entry
|
|
94
|
+
*/
|
|
95
|
+
export interface ToolRegistryEntry {
|
|
96
|
+
name: string;
|
|
97
|
+
description: string;
|
|
98
|
+
serverId?: string;
|
|
99
|
+
isImplemented?: boolean;
|
|
100
|
+
parameters?: ToolParameterSchema;
|
|
101
|
+
execute?: ToolDefinition["execute"];
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Tool execution information
|
|
105
|
+
*/
|
|
106
|
+
export interface ToolExecution {
|
|
107
|
+
toolName: string;
|
|
108
|
+
args: ToolArgs;
|
|
109
|
+
result: ToolResult;
|
|
110
|
+
executionTime: number;
|
|
111
|
+
timestamp: number;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Available tool information
|
|
115
|
+
*/
|
|
116
|
+
export interface AvailableTool {
|
|
117
|
+
name: string;
|
|
118
|
+
description: string;
|
|
119
|
+
serverId?: string;
|
|
120
|
+
toolName?: string;
|
|
121
|
+
parameters?: ToolParameterSchema;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Tool validation options
|
|
125
|
+
*/
|
|
126
|
+
export interface ToolValidationOptions {
|
|
127
|
+
customValidator?: (toolName: string, args: ToolArgs) => boolean | Promise<boolean>;
|
|
128
|
+
validateSchema?: boolean;
|
|
129
|
+
allowUnknownProperties?: boolean;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Tool call information (for AI SDK integration)
|
|
133
|
+
*/
|
|
134
|
+
export interface ToolCall {
|
|
135
|
+
toolName: string;
|
|
136
|
+
parameters: ToolArgs;
|
|
137
|
+
id?: string;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Tool call result (for AI SDK integration)
|
|
141
|
+
*/
|
|
142
|
+
export interface ToolCallResult {
|
|
143
|
+
id?: string;
|
|
144
|
+
result: ToolResult;
|
|
145
|
+
formattedForAI: string;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Type guard for tool result
|
|
149
|
+
*/
|
|
150
|
+
export declare function isToolResult(value: unknown): value is ToolResult;
|
|
151
|
+
/**
|
|
152
|
+
* Type guard for tool definition
|
|
153
|
+
*/
|
|
154
|
+
export declare function isToolDefinition(value: unknown): value is ToolDefinition;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool system type definitions for NeuroLink
|
|
3
|
+
* Replaces 'any' types in tool registration and execution
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Type guard for tool result
|
|
7
|
+
*/
|
|
8
|
+
export function isToolResult(value) {
|
|
9
|
+
return (typeof value === "object" &&
|
|
10
|
+
value !== null &&
|
|
11
|
+
"success" in value &&
|
|
12
|
+
typeof value.success === "boolean");
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Type guard for tool definition
|
|
16
|
+
*/
|
|
17
|
+
export function isToolDefinition(value) {
|
|
18
|
+
return (typeof value === "object" &&
|
|
19
|
+
value !== null &&
|
|
20
|
+
"description" in value &&
|
|
21
|
+
"execute" in value &&
|
|
22
|
+
typeof value.description === "string" &&
|
|
23
|
+
typeof value.execute === "function");
|
|
24
|
+
}
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* Provides conditional logging based on NEUROLINK_DEBUG environment variable
|
|
5
5
|
*/
|
|
6
6
|
export declare const logger: {
|
|
7
|
-
debug: (...args:
|
|
8
|
-
info: (...args:
|
|
9
|
-
warn: (...args:
|
|
10
|
-
error: (...args:
|
|
11
|
-
always: (...args:
|
|
7
|
+
debug: (...args: unknown[]) => void;
|
|
8
|
+
info: (...args: unknown[]) => void;
|
|
9
|
+
warn: (...args: unknown[]) => void;
|
|
10
|
+
error: (...args: unknown[]) => void;
|
|
11
|
+
always: (...args: unknown[]) => void;
|
|
12
12
|
};
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* - Proper error classification
|
|
8
8
|
* - Rate-limit friendly validation
|
|
9
9
|
*/
|
|
10
|
+
import type { UnknownRecord } from "../types/common.js";
|
|
10
11
|
export interface ProviderValidationResult {
|
|
11
12
|
configured: boolean;
|
|
12
13
|
formatValid: boolean;
|
|
@@ -15,7 +16,7 @@ export interface ProviderValidationResult {
|
|
|
15
16
|
error?: string;
|
|
16
17
|
errorType?: "config" | "format" | "auth" | "network" | "quota" | "unknown";
|
|
17
18
|
responseTime?: number;
|
|
18
|
-
details?:
|
|
19
|
+
details?: UnknownRecord;
|
|
19
20
|
}
|
|
20
21
|
/**
|
|
21
22
|
* Validate API key format for a specific provider
|