@juspay/neurolink 7.48.1 → 7.49.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 +13 -0
- package/README.md +215 -16
- package/dist/agent/directTools.d.ts +55 -0
- package/dist/agent/directTools.js +266 -0
- package/dist/cli/factories/commandFactory.d.ts +2 -0
- package/dist/cli/factories/commandFactory.js +130 -16
- package/dist/cli/index.js +0 -0
- package/dist/cli/loop/conversationSelector.d.ts +45 -0
- package/dist/cli/loop/conversationSelector.js +222 -0
- package/dist/cli/loop/optionsSchema.d.ts +1 -1
- package/dist/cli/loop/session.d.ts +36 -8
- package/dist/cli/loop/session.js +257 -61
- package/dist/core/baseProvider.js +9 -2
- package/dist/core/evaluation.js +5 -2
- package/dist/factories/providerRegistry.js +2 -2
- package/dist/lib/agent/directTools.d.ts +55 -0
- package/dist/lib/agent/directTools.js +266 -0
- package/dist/lib/core/baseProvider.js +9 -2
- package/dist/lib/core/evaluation.js +5 -2
- package/dist/lib/factories/providerRegistry.js +2 -2
- package/dist/lib/mcp/factory.d.ts +2 -157
- package/dist/lib/mcp/flexibleToolValidator.d.ts +1 -5
- package/dist/lib/mcp/index.d.ts +3 -2
- package/dist/lib/mcp/mcpCircuitBreaker.d.ts +1 -75
- package/dist/lib/mcp/mcpClientFactory.d.ts +1 -20
- package/dist/lib/mcp/mcpClientFactory.js +1 -0
- package/dist/lib/mcp/registry.d.ts +3 -10
- package/dist/lib/mcp/servers/agent/directToolsServer.d.ts +1 -1
- package/dist/lib/mcp/servers/aiProviders/aiCoreServer.d.ts +1 -1
- package/dist/lib/mcp/servers/utilities/utilityServer.d.ts +1 -1
- package/dist/lib/mcp/toolDiscoveryService.d.ts +3 -84
- package/dist/lib/mcp/toolRegistry.d.ts +2 -24
- package/dist/lib/middleware/builtin/guardrails.d.ts +5 -16
- package/dist/lib/middleware/builtin/guardrails.js +44 -39
- package/dist/lib/middleware/utils/guardrailsUtils.d.ts +64 -0
- package/dist/lib/middleware/utils/guardrailsUtils.js +387 -0
- package/dist/lib/neurolink.d.ts +1 -1
- package/dist/lib/providers/anthropic.js +46 -3
- package/dist/lib/providers/azureOpenai.js +8 -2
- package/dist/lib/providers/googleAiStudio.js +8 -2
- package/dist/lib/providers/googleVertex.js +11 -2
- package/dist/lib/providers/huggingFace.js +1 -1
- package/dist/lib/providers/litellm.js +1 -1
- package/dist/lib/providers/mistral.js +1 -1
- package/dist/lib/providers/openAI.js +46 -3
- package/dist/lib/session/globalSessionState.d.ts +26 -0
- package/dist/lib/session/globalSessionState.js +49 -0
- package/dist/lib/types/cli.d.ts +28 -0
- package/dist/lib/types/content.d.ts +18 -5
- package/dist/lib/types/contextTypes.d.ts +1 -1
- package/dist/lib/types/conversation.d.ts +55 -4
- package/dist/lib/types/fileTypes.d.ts +65 -0
- package/dist/lib/types/fileTypes.js +4 -0
- package/dist/lib/types/generateTypes.d.ts +12 -0
- package/dist/lib/types/guardrails.d.ts +103 -0
- package/dist/lib/types/guardrails.js +1 -0
- package/dist/lib/types/index.d.ts +4 -2
- package/dist/lib/types/index.js +4 -0
- package/dist/lib/types/mcpTypes.d.ts +407 -14
- package/dist/lib/types/streamTypes.d.ts +7 -0
- package/dist/lib/types/tools.d.ts +132 -35
- package/dist/lib/utils/csvProcessor.d.ts +68 -0
- package/dist/lib/utils/csvProcessor.js +277 -0
- package/dist/lib/utils/fileDetector.d.ts +57 -0
- package/dist/lib/utils/fileDetector.js +457 -0
- package/dist/lib/utils/imageProcessor.d.ts +10 -0
- package/dist/lib/utils/imageProcessor.js +22 -0
- package/dist/lib/utils/loopUtils.d.ts +71 -0
- package/dist/lib/utils/loopUtils.js +262 -0
- package/dist/lib/utils/messageBuilder.d.ts +2 -1
- package/dist/lib/utils/messageBuilder.js +197 -2
- package/dist/lib/utils/optionsUtils.d.ts +1 -1
- package/dist/mcp/factory.d.ts +2 -157
- package/dist/mcp/flexibleToolValidator.d.ts +1 -5
- package/dist/mcp/index.d.ts +3 -2
- package/dist/mcp/mcpCircuitBreaker.d.ts +1 -75
- package/dist/mcp/mcpClientFactory.d.ts +1 -20
- package/dist/mcp/mcpClientFactory.js +1 -0
- package/dist/mcp/registry.d.ts +3 -10
- package/dist/mcp/servers/agent/directToolsServer.d.ts +1 -1
- package/dist/mcp/servers/aiProviders/aiCoreServer.d.ts +1 -1
- package/dist/mcp/servers/utilities/utilityServer.d.ts +1 -1
- package/dist/mcp/toolDiscoveryService.d.ts +3 -84
- package/dist/mcp/toolRegistry.d.ts +2 -24
- package/dist/middleware/builtin/guardrails.d.ts +5 -16
- package/dist/middleware/builtin/guardrails.js +44 -39
- package/dist/middleware/utils/guardrailsUtils.d.ts +64 -0
- package/dist/middleware/utils/guardrailsUtils.js +387 -0
- package/dist/neurolink.d.ts +1 -1
- package/dist/providers/anthropic.js +46 -3
- package/dist/providers/azureOpenai.js +8 -2
- package/dist/providers/googleAiStudio.js +8 -2
- package/dist/providers/googleVertex.js +11 -2
- package/dist/providers/huggingFace.js +1 -1
- package/dist/providers/litellm.js +1 -1
- package/dist/providers/mistral.js +1 -1
- package/dist/providers/openAI.js +46 -3
- package/dist/session/globalSessionState.d.ts +26 -0
- package/dist/session/globalSessionState.js +49 -0
- package/dist/types/cli.d.ts +28 -0
- package/dist/types/content.d.ts +18 -5
- package/dist/types/contextTypes.d.ts +1 -1
- package/dist/types/conversation.d.ts +55 -4
- package/dist/types/fileTypes.d.ts +65 -0
- package/dist/types/fileTypes.js +4 -0
- package/dist/types/generateTypes.d.ts +12 -0
- package/dist/types/guardrails.d.ts +103 -0
- package/dist/types/guardrails.js +1 -0
- package/dist/types/index.d.ts +4 -2
- package/dist/types/index.js +4 -0
- package/dist/types/mcpTypes.d.ts +407 -14
- package/dist/types/modelTypes.d.ts +6 -6
- package/dist/types/streamTypes.d.ts +7 -0
- package/dist/types/tools.d.ts +132 -35
- package/dist/utils/csvProcessor.d.ts +68 -0
- package/dist/utils/csvProcessor.js +277 -0
- package/dist/utils/fileDetector.d.ts +57 -0
- package/dist/utils/fileDetector.js +457 -0
- package/dist/utils/imageProcessor.d.ts +10 -0
- package/dist/utils/imageProcessor.js +22 -0
- package/dist/utils/loopUtils.d.ts +71 -0
- package/dist/utils/loopUtils.js +262 -0
- package/dist/utils/messageBuilder.d.ts +2 -1
- package/dist/utils/messageBuilder.js +197 -2
- package/dist/utils/optionsUtils.d.ts +1 -1
- package/package.json +9 -3
- package/dist/lib/mcp/contracts/mcpContract.d.ts +0 -106
- package/dist/lib/mcp/contracts/mcpContract.js +0 -5
- package/dist/mcp/contracts/mcpContract.d.ts +0 -106
- package/dist/mcp/contracts/mcpContract.js +0 -5
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MCP Contract - Core Type Definitions
|
|
3
|
-
* Industry standard camelCase interfaces for maximum flexibility
|
|
4
|
-
*/
|
|
5
|
-
import type { StandardRecord } from "../../types/typeAliases.js";
|
|
6
|
-
/**
|
|
7
|
-
* Generic execution context for MCP operations
|
|
8
|
-
* All properties optional for maximum flexibility
|
|
9
|
-
*/
|
|
10
|
-
export interface ExecutionContext<T = StandardRecord> {
|
|
11
|
-
sessionId?: string;
|
|
12
|
-
userId?: string;
|
|
13
|
-
config?: T;
|
|
14
|
-
metadata?: StandardRecord;
|
|
15
|
-
cacheOptions?: CacheOptions;
|
|
16
|
-
fallbackOptions?: FallbackOptions;
|
|
17
|
-
timeoutMs?: number;
|
|
18
|
-
startTime?: number;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Cache configuration options
|
|
22
|
-
*/
|
|
23
|
-
export interface CacheOptions {
|
|
24
|
-
enabled?: boolean;
|
|
25
|
-
ttlMs?: number;
|
|
26
|
-
strategy?: "memory" | "writeThrough" | "cacheAside";
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Fallback configuration options
|
|
30
|
-
*/
|
|
31
|
-
export interface FallbackOptions {
|
|
32
|
-
enabled?: boolean;
|
|
33
|
-
maxAttempts?: number;
|
|
34
|
-
delayMs?: number;
|
|
35
|
-
circuitBreaker?: boolean;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Tool information with extensibility
|
|
39
|
-
*/
|
|
40
|
-
export interface ToolInfo {
|
|
41
|
-
name: string;
|
|
42
|
-
description?: string;
|
|
43
|
-
category?: string;
|
|
44
|
-
serverId?: string;
|
|
45
|
-
inputSchema?: StandardRecord;
|
|
46
|
-
outputSchema?: StandardRecord;
|
|
47
|
-
[key: string]: unknown;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Discovered MCP server/plugin definition
|
|
51
|
-
*/
|
|
52
|
-
export interface DiscoveredMcp<TTools = StandardRecord> {
|
|
53
|
-
metadata: McpMetadata;
|
|
54
|
-
tools?: TTools;
|
|
55
|
-
capabilities?: string[];
|
|
56
|
-
version?: string;
|
|
57
|
-
configuration?: Record<string, string | number | boolean>;
|
|
58
|
-
[key: string]: unknown;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* MCP server metadata
|
|
62
|
-
*/
|
|
63
|
-
export interface McpMetadata {
|
|
64
|
-
name: string;
|
|
65
|
-
description?: string;
|
|
66
|
-
version?: string;
|
|
67
|
-
author?: string;
|
|
68
|
-
homepage?: string;
|
|
69
|
-
repository?: string;
|
|
70
|
-
category?: string;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Tool execution result
|
|
74
|
-
*/
|
|
75
|
-
export interface ToolExecutionResult<T = unknown> {
|
|
76
|
-
result: T;
|
|
77
|
-
context?: ExecutionContext;
|
|
78
|
-
performance?: {
|
|
79
|
-
duration: number;
|
|
80
|
-
tokensUsed?: number;
|
|
81
|
-
cost?: number;
|
|
82
|
-
};
|
|
83
|
-
validation?: ValidationResult;
|
|
84
|
-
cached?: boolean;
|
|
85
|
-
fallback?: boolean;
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Validation result for runtime checks
|
|
89
|
-
*/
|
|
90
|
-
export interface ValidationResult {
|
|
91
|
-
valid: boolean;
|
|
92
|
-
missing: string[];
|
|
93
|
-
warnings: string[];
|
|
94
|
-
recommendations: string[];
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Provider status information
|
|
98
|
-
*/
|
|
99
|
-
export interface ProviderStatus {
|
|
100
|
-
available: boolean;
|
|
101
|
-
lastCheck: number;
|
|
102
|
-
reason?: string;
|
|
103
|
-
model?: string;
|
|
104
|
-
cost?: number;
|
|
105
|
-
latencyMs?: number;
|
|
106
|
-
}
|