@juspay/neurolink 7.50.0 → 7.51.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 +7 -0
- package/README.md +12 -9
- package/dist/adapters/providerImageAdapter.js +82 -10
- package/dist/agent/directTools.d.ts +10 -10
- package/dist/agent/directTools.js +5 -3
- package/dist/cli/commands/config.js +1 -0
- package/dist/cli/commands/mcp.js +1 -0
- package/dist/cli/commands/models.js +1 -0
- package/dist/cli/commands/ollama.js +1 -0
- package/dist/cli/commands/setup-anthropic.js +1 -0
- package/dist/cli/commands/setup-azure.js +1 -0
- package/dist/cli/commands/setup-bedrock.js +1 -0
- package/dist/cli/commands/setup-gcp.js +1 -0
- package/dist/cli/commands/setup-google-ai.js +1 -0
- package/dist/cli/commands/setup-huggingface.js +1 -0
- package/dist/cli/commands/setup-mistral.js +1 -0
- package/dist/cli/commands/setup-openai.js +1 -0
- package/dist/cli/commands/setup.js +1 -0
- package/dist/cli/errorHandler.js +1 -0
- package/dist/cli/factories/commandFactory.d.ts +1 -0
- package/dist/cli/factories/commandFactory.js +23 -6
- package/dist/cli/factories/ollamaCommandFactory.js +1 -0
- package/dist/cli/factories/sagemakerCommandFactory.js +1 -0
- package/dist/cli/factories/setupCommandFactory.js +1 -0
- package/dist/cli/index.js +1 -0
- package/dist/cli/loop/conversationSelector.js +1 -0
- package/dist/cli/loop/optionsSchema.js +1 -0
- package/dist/cli/loop/session.js +1 -0
- package/dist/cli/parser.js +1 -0
- package/dist/cli/utils/completeSetup.js +1 -0
- package/dist/cli/utils/envManager.js +1 -0
- package/dist/cli/utils/interactiveSetup.js +1 -0
- package/dist/cli/utils/ollamaUtils.js +1 -0
- package/dist/constants/index.js +1 -1
- package/dist/core/baseProvider.d.ts +5 -0
- package/dist/core/baseProvider.js +70 -20
- package/dist/index.d.ts +3 -3
- package/dist/lib/adapters/providerImageAdapter.js +83 -10
- package/dist/lib/agent/directTools.d.ts +10 -10
- package/dist/lib/agent/directTools.js +6 -3
- package/dist/lib/config/configManager.js +1 -0
- package/dist/lib/config/conversationMemory.js +1 -0
- package/dist/lib/config/taskClassificationConfig.js +1 -0
- package/dist/lib/constants/index.js +2 -1
- package/dist/lib/constants/performance.js +1 -0
- package/dist/lib/constants/retry.js +1 -0
- package/dist/lib/constants/timeouts.js +1 -0
- package/dist/lib/constants/tokens.js +1 -0
- package/dist/lib/core/analytics.js +1 -0
- package/dist/lib/core/baseProvider.d.ts +5 -0
- package/dist/lib/core/baseProvider.js +71 -20
- package/dist/lib/core/constants.js +1 -0
- package/dist/lib/core/conversationMemoryFactory.js +1 -0
- package/dist/lib/core/conversationMemoryInitializer.js +1 -0
- package/dist/lib/core/conversationMemoryManager.js +1 -0
- package/dist/lib/core/dynamicModels.js +1 -0
- package/dist/lib/core/evaluation.js +1 -0
- package/dist/lib/core/evaluationProviders.js +1 -0
- package/dist/lib/core/factory.js +1 -0
- package/dist/lib/core/modelConfiguration.js +1 -0
- package/dist/lib/core/redisConversationMemoryManager.js +1 -0
- package/dist/lib/core/serviceRegistry.js +1 -0
- package/dist/lib/core/streamAnalytics.js +1 -0
- package/dist/lib/evaluation/contextBuilder.js +1 -0
- package/dist/lib/evaluation/index.js +1 -0
- package/dist/lib/evaluation/prompts.js +1 -0
- package/dist/lib/evaluation/ragasEvaluator.js +1 -0
- package/dist/lib/evaluation/retryManager.js +1 -0
- package/dist/lib/evaluation/scoring.js +1 -0
- package/dist/lib/factories/providerFactory.js +1 -0
- package/dist/lib/factories/providerRegistry.js +1 -0
- package/dist/lib/hitl/hitlErrors.js +1 -0
- package/dist/lib/hitl/hitlManager.js +1 -0
- package/dist/lib/hitl/index.js +1 -0
- package/dist/lib/hitl/types.js +1 -0
- package/dist/lib/index.d.ts +3 -3
- package/dist/lib/index.js +1 -0
- package/dist/lib/mcp/externalServerManager.js +1 -0
- package/dist/lib/mcp/factory.js +1 -0
- package/dist/lib/mcp/flexibleToolValidator.js +1 -0
- package/dist/lib/mcp/index.js +1 -0
- package/dist/lib/mcp/mcpCircuitBreaker.js +1 -0
- package/dist/lib/mcp/mcpClientFactory.js +2 -1
- package/dist/lib/mcp/registry.js +1 -0
- package/dist/lib/mcp/servers/agent/directToolsServer.js +2 -0
- package/dist/lib/mcp/servers/aiProviders/aiAnalysisTools.js +1 -0
- package/dist/lib/mcp/servers/aiProviders/aiCoreServer.js +1 -0
- package/dist/lib/mcp/servers/aiProviders/aiWorkflowTools.js +1 -0
- package/dist/lib/mcp/servers/utilities/utilityServer.js +1 -0
- package/dist/lib/mcp/toolDiscoveryService.js +1 -0
- package/dist/lib/mcp/toolRegistry.js +1 -0
- package/dist/lib/memory/mem0Initializer.js +1 -0
- package/dist/lib/middleware/builtin/analytics.js +1 -0
- package/dist/lib/middleware/builtin/autoEvaluation.js +1 -0
- package/dist/lib/middleware/builtin/guardrails.js +1 -0
- package/dist/lib/middleware/factory.js +1 -0
- package/dist/lib/middleware/index.js +1 -0
- package/dist/lib/middleware/registry.js +1 -0
- package/dist/lib/middleware/utils/guardrailsUtils.js +1 -0
- package/dist/lib/models/modelRegistry.js +1 -0
- package/dist/lib/models/modelResolver.js +2 -0
- package/dist/lib/neurolink.d.ts +6 -0
- package/dist/lib/neurolink.js +135 -5
- package/dist/lib/providers/amazonBedrock.d.ts +1 -0
- package/dist/lib/providers/amazonBedrock.js +166 -14
- package/dist/lib/providers/amazonSagemaker.js +1 -0
- package/dist/lib/providers/anthropic.js +7 -21
- package/dist/lib/providers/anthropicBaseProvider.js +1 -0
- package/dist/lib/providers/azureOpenai.js +5 -21
- package/dist/lib/providers/googleAiStudio.js +5 -21
- package/dist/lib/providers/googleVertex.js +8 -1
- package/dist/lib/providers/huggingFace.js +34 -3
- package/dist/lib/providers/index.js +1 -0
- package/dist/lib/providers/litellm.js +34 -3
- package/dist/lib/providers/mistral.js +32 -2
- package/dist/lib/providers/ollama.d.ts +37 -1
- package/dist/lib/providers/ollama.js +544 -58
- package/dist/lib/providers/openAI.js +5 -21
- package/dist/lib/providers/openaiCompatible.js +41 -4
- package/dist/lib/providers/sagemaker/adaptive-semaphore.js +1 -0
- package/dist/lib/providers/sagemaker/client.js +1 -0
- package/dist/lib/providers/sagemaker/config.js +1 -0
- package/dist/lib/providers/sagemaker/detection.js +1 -0
- package/dist/lib/providers/sagemaker/diagnostics.js +1 -0
- package/dist/lib/providers/sagemaker/error-constants.js +1 -0
- package/dist/lib/providers/sagemaker/errors.js +1 -0
- package/dist/lib/providers/sagemaker/index.js +1 -0
- package/dist/lib/providers/sagemaker/language-model.js +1 -0
- package/dist/lib/providers/sagemaker/parsers.js +1 -0
- package/dist/lib/providers/sagemaker/streaming.js +1 -0
- package/dist/lib/providers/sagemaker/structured-parser.js +1 -0
- package/dist/lib/proxy/awsProxyIntegration.js +1 -0
- package/dist/lib/proxy/proxyFetch.js +1 -0
- package/dist/lib/proxy/utils/noProxyUtils.js +1 -0
- package/dist/lib/sdk/toolRegistration.js +2 -0
- package/dist/lib/services/server/ai/observability/instrumentation.js +1 -0
- package/dist/lib/session/globalSessionState.js +1 -0
- package/dist/lib/telemetry/index.js +1 -0
- package/dist/lib/telemetry/telemetryService.js +1 -0
- package/dist/lib/types/analytics.js +1 -0
- package/dist/lib/types/cli.js +1 -0
- package/dist/lib/types/common.js +1 -0
- package/dist/lib/types/configTypes.js +1 -0
- package/dist/lib/types/content.d.ts +14 -1
- package/dist/lib/types/content.js +1 -0
- package/dist/lib/types/contextTypes.js +1 -0
- package/dist/lib/types/conversation.js +1 -0
- package/dist/lib/types/domainTypes.js +1 -0
- package/dist/lib/types/errors.js +1 -0
- package/dist/lib/types/evaluation.js +1 -0
- package/dist/lib/types/evaluationProviders.js +1 -0
- package/dist/lib/types/evaluationTypes.js +1 -0
- package/dist/lib/types/externalMcp.js +1 -0
- package/dist/lib/types/fileTypes.d.ts +44 -0
- package/dist/lib/types/fileTypes.js +1 -0
- package/dist/lib/types/generateTypes.d.ts +1 -0
- package/dist/lib/types/generateTypes.js +1 -0
- package/dist/lib/types/guardrails.js +1 -0
- package/dist/lib/types/index.js +1 -0
- package/dist/lib/types/mcpTypes.js +1 -0
- package/dist/lib/types/middlewareTypes.js +1 -0
- package/dist/lib/types/modelTypes.js +1 -0
- package/dist/lib/types/observability.js +1 -0
- package/dist/lib/types/providers.d.ts +44 -0
- package/dist/lib/types/providers.js +1 -0
- package/dist/lib/types/sdkTypes.js +1 -0
- package/dist/lib/types/serviceTypes.js +1 -0
- package/dist/lib/types/streamTypes.d.ts +1 -0
- package/dist/lib/types/streamTypes.js +1 -0
- package/dist/lib/types/taskClassificationTypes.js +1 -0
- package/dist/lib/types/tools.js +2 -0
- package/dist/lib/types/typeAliases.js +1 -0
- package/dist/lib/types/universalProviderOptions.js +1 -0
- package/dist/lib/utils/analyticsUtils.js +1 -0
- package/dist/lib/utils/conversationMemory.js +1 -0
- package/dist/lib/utils/conversationMemoryUtils.js +1 -0
- package/dist/lib/utils/csvProcessor.js +1 -0
- package/dist/lib/utils/errorHandling.js +1 -0
- package/dist/lib/utils/evaluationUtils.js +1 -0
- package/dist/lib/utils/factoryProcessing.js +1 -0
- package/dist/lib/utils/fileDetector.js +7 -3
- package/dist/lib/utils/imageProcessor.js +1 -0
- package/dist/lib/utils/logger.js +1 -0
- package/dist/lib/utils/loopUtils.js +1 -0
- package/dist/lib/utils/mcpDefaults.js +1 -0
- package/dist/lib/utils/messageBuilder.js +96 -9
- package/dist/lib/utils/modelRouter.js +1 -0
- package/dist/lib/utils/multimodalOptionsBuilder.d.ts +67 -0
- package/dist/lib/utils/multimodalOptionsBuilder.js +65 -0
- package/dist/lib/utils/optionsConversion.js +1 -0
- package/dist/lib/utils/optionsUtils.js +1 -0
- package/dist/lib/utils/parameterValidation.js +1 -0
- package/dist/lib/utils/pdfProcessor.d.ts +10 -0
- package/dist/lib/utils/pdfProcessor.js +199 -0
- package/dist/lib/utils/performance.js +1 -0
- package/dist/lib/utils/promptRedaction.js +1 -0
- package/dist/lib/utils/providerConfig.js +1 -0
- package/dist/lib/utils/providerHealth.js +1 -0
- package/dist/lib/utils/providerSetupMessages.js +1 -0
- package/dist/lib/utils/providerUtils.js +1 -0
- package/dist/lib/utils/redis.js +1 -0
- package/dist/lib/utils/retryHandler.js +1 -0
- package/dist/lib/utils/schemaConversion.js +1 -0
- package/dist/lib/utils/taskClassificationUtils.js +1 -0
- package/dist/lib/utils/taskClassifier.js +1 -0
- package/dist/lib/utils/timeout.js +1 -0
- package/dist/lib/utils/tokenLimits.js +1 -0
- package/dist/lib/utils/toolUtils.js +1 -0
- package/dist/lib/utils/transformationUtils.js +1 -0
- package/dist/lib/utils/typeUtils.js +1 -0
- package/dist/mcp/mcpClientFactory.js +1 -1
- package/dist/mcp/servers/agent/directToolsServer.js +1 -0
- package/dist/models/modelResolver.js +1 -0
- package/dist/neurolink.d.ts +6 -0
- package/dist/neurolink.js +134 -5
- package/dist/providers/amazonBedrock.d.ts +1 -0
- package/dist/providers/amazonBedrock.js +165 -14
- package/dist/providers/anthropic.js +6 -21
- package/dist/providers/azureOpenai.js +4 -21
- package/dist/providers/googleAiStudio.js +4 -21
- package/dist/providers/googleVertex.js +7 -1
- package/dist/providers/huggingFace.js +33 -3
- package/dist/providers/litellm.js +33 -3
- package/dist/providers/mistral.js +31 -2
- package/dist/providers/ollama.d.ts +37 -1
- package/dist/providers/ollama.js +543 -58
- package/dist/providers/openAI.js +4 -21
- package/dist/providers/openaiCompatible.js +40 -4
- package/dist/sdk/toolRegistration.js +1 -0
- package/dist/types/content.d.ts +14 -1
- package/dist/types/fileTypes.d.ts +44 -0
- package/dist/types/generateTypes.d.ts +1 -0
- package/dist/types/providers.d.ts +44 -0
- package/dist/types/streamTypes.d.ts +1 -0
- package/dist/types/tools.js +1 -0
- package/dist/utils/fileDetector.js +6 -3
- package/dist/utils/messageBuilder.js +95 -9
- package/dist/utils/multimodalOptionsBuilder.d.ts +67 -0
- package/dist/utils/multimodalOptionsBuilder.js +64 -0
- package/dist/utils/pdfProcessor.d.ts +10 -0
- package/dist/utils/pdfProcessor.js +198 -0
- package/package.json +3 -3
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { logger } from "./logger.js";
|
|
2
|
+
const PDF_PROVIDER_CONFIGS = {
|
|
3
|
+
anthropic: {
|
|
4
|
+
maxSizeMB: 5,
|
|
5
|
+
maxPages: 100,
|
|
6
|
+
supportsNative: true,
|
|
7
|
+
requiresCitations: false,
|
|
8
|
+
apiType: "document",
|
|
9
|
+
},
|
|
10
|
+
bedrock: {
|
|
11
|
+
maxSizeMB: 5,
|
|
12
|
+
maxPages: 100,
|
|
13
|
+
supportsNative: true,
|
|
14
|
+
requiresCitations: "auto",
|
|
15
|
+
apiType: "document",
|
|
16
|
+
},
|
|
17
|
+
"google-vertex": {
|
|
18
|
+
maxSizeMB: 5,
|
|
19
|
+
maxPages: 100,
|
|
20
|
+
supportsNative: true,
|
|
21
|
+
requiresCitations: false,
|
|
22
|
+
apiType: "document",
|
|
23
|
+
},
|
|
24
|
+
vertex: {
|
|
25
|
+
maxSizeMB: 5,
|
|
26
|
+
maxPages: 100,
|
|
27
|
+
supportsNative: true,
|
|
28
|
+
requiresCitations: false,
|
|
29
|
+
apiType: "document",
|
|
30
|
+
},
|
|
31
|
+
"google-ai-studio": {
|
|
32
|
+
maxSizeMB: 2000,
|
|
33
|
+
maxPages: 100,
|
|
34
|
+
supportsNative: true,
|
|
35
|
+
requiresCitations: false,
|
|
36
|
+
apiType: "files-api",
|
|
37
|
+
},
|
|
38
|
+
gemini: {
|
|
39
|
+
maxSizeMB: 2000,
|
|
40
|
+
maxPages: 100,
|
|
41
|
+
supportsNative: true,
|
|
42
|
+
requiresCitations: false,
|
|
43
|
+
apiType: "files-api",
|
|
44
|
+
},
|
|
45
|
+
"google-ai": {
|
|
46
|
+
maxSizeMB: 2000,
|
|
47
|
+
maxPages: 100,
|
|
48
|
+
supportsNative: true,
|
|
49
|
+
requiresCitations: false,
|
|
50
|
+
apiType: "files-api",
|
|
51
|
+
},
|
|
52
|
+
openai: {
|
|
53
|
+
maxSizeMB: 10,
|
|
54
|
+
maxPages: 100,
|
|
55
|
+
supportsNative: true,
|
|
56
|
+
requiresCitations: false,
|
|
57
|
+
apiType: "files-api",
|
|
58
|
+
},
|
|
59
|
+
azure: {
|
|
60
|
+
maxSizeMB: 10,
|
|
61
|
+
maxPages: 100,
|
|
62
|
+
supportsNative: true,
|
|
63
|
+
requiresCitations: false,
|
|
64
|
+
apiType: "files-api",
|
|
65
|
+
},
|
|
66
|
+
"azure-openai": {
|
|
67
|
+
maxSizeMB: 10,
|
|
68
|
+
maxPages: 100,
|
|
69
|
+
supportsNative: true,
|
|
70
|
+
requiresCitations: false,
|
|
71
|
+
apiType: "files-api",
|
|
72
|
+
},
|
|
73
|
+
litellm: {
|
|
74
|
+
maxSizeMB: 10,
|
|
75
|
+
maxPages: 100,
|
|
76
|
+
supportsNative: true,
|
|
77
|
+
requiresCitations: false,
|
|
78
|
+
apiType: "files-api",
|
|
79
|
+
},
|
|
80
|
+
"openai-compatible": {
|
|
81
|
+
maxSizeMB: 10,
|
|
82
|
+
maxPages: 100,
|
|
83
|
+
supportsNative: true,
|
|
84
|
+
requiresCitations: false,
|
|
85
|
+
apiType: "files-api",
|
|
86
|
+
},
|
|
87
|
+
mistral: {
|
|
88
|
+
maxSizeMB: 10,
|
|
89
|
+
maxPages: 100,
|
|
90
|
+
supportsNative: true,
|
|
91
|
+
requiresCitations: false,
|
|
92
|
+
apiType: "files-api",
|
|
93
|
+
},
|
|
94
|
+
"hugging-face": {
|
|
95
|
+
maxSizeMB: 10,
|
|
96
|
+
maxPages: 100,
|
|
97
|
+
supportsNative: true,
|
|
98
|
+
requiresCitations: false,
|
|
99
|
+
apiType: "files-api",
|
|
100
|
+
},
|
|
101
|
+
huggingface: {
|
|
102
|
+
maxSizeMB: 10,
|
|
103
|
+
maxPages: 100,
|
|
104
|
+
supportsNative: true,
|
|
105
|
+
requiresCitations: false,
|
|
106
|
+
apiType: "files-api",
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
export class PDFProcessor {
|
|
110
|
+
// PDF magic bytes: %PDF-
|
|
111
|
+
static PDF_SIGNATURE = Buffer.from("%PDF-", "ascii");
|
|
112
|
+
static async process(content, options) {
|
|
113
|
+
const provider = (options?.provider || "unknown").toLowerCase();
|
|
114
|
+
const config = PDF_PROVIDER_CONFIGS[provider];
|
|
115
|
+
if (!this.isValidPDF(content)) {
|
|
116
|
+
throw new Error("Invalid PDF file format. File must start with %PDF- header.");
|
|
117
|
+
}
|
|
118
|
+
if (!config || !config.supportsNative) {
|
|
119
|
+
const supportedProviders = Object.keys(PDF_PROVIDER_CONFIGS)
|
|
120
|
+
.filter((p) => PDF_PROVIDER_CONFIGS[p].supportsNative)
|
|
121
|
+
.join(", ");
|
|
122
|
+
throw new Error(`PDF files are not currently supported with ${provider} provider.\n` +
|
|
123
|
+
`Supported providers: ${supportedProviders}\n` +
|
|
124
|
+
`Current provider: ${provider}\n\n` +
|
|
125
|
+
`Options:\n` +
|
|
126
|
+
`1. Switch to a supported provider (--provider openai or --provider vertex)\n` +
|
|
127
|
+
`2. Convert your PDF to text manually`);
|
|
128
|
+
}
|
|
129
|
+
const sizeMB = content.length / (1024 * 1024);
|
|
130
|
+
if (sizeMB > config.maxSizeMB) {
|
|
131
|
+
throw new Error(`PDF size ${sizeMB.toFixed(2)}MB exceeds ${config.maxSizeMB}MB limit for ${provider}`);
|
|
132
|
+
}
|
|
133
|
+
const metadata = this.extractBasicMetadata(content);
|
|
134
|
+
if (metadata.estimatedPages && metadata.estimatedPages > config.maxPages) {
|
|
135
|
+
logger.warn(`[PDF] PDF appears to have ${metadata.estimatedPages}+ pages. ` +
|
|
136
|
+
`${provider} supports up to ${config.maxPages} pages.`);
|
|
137
|
+
}
|
|
138
|
+
if (provider === "bedrock" && options?.bedrockApiMode === "converse") {
|
|
139
|
+
logger.info("[PDF] Using Bedrock Converse API. " +
|
|
140
|
+
"Visual PDF analysis requires citations enabled. " +
|
|
141
|
+
"Text-only mode: ~1,000 tokens/3 pages. " +
|
|
142
|
+
"Visual mode: ~7,000 tokens/3 pages.");
|
|
143
|
+
}
|
|
144
|
+
logger.info("[PDF] ✅ Validated PDF file", {
|
|
145
|
+
provider,
|
|
146
|
+
size: `${sizeMB.toFixed(2)}MB`,
|
|
147
|
+
version: metadata.version,
|
|
148
|
+
estimatedPages: metadata.estimatedPages,
|
|
149
|
+
apiType: config.apiType,
|
|
150
|
+
});
|
|
151
|
+
return {
|
|
152
|
+
type: "pdf",
|
|
153
|
+
content,
|
|
154
|
+
mimeType: "application/pdf",
|
|
155
|
+
metadata: {
|
|
156
|
+
confidence: 100,
|
|
157
|
+
size: content.length,
|
|
158
|
+
...metadata,
|
|
159
|
+
provider,
|
|
160
|
+
apiType: config.apiType,
|
|
161
|
+
},
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
static supportsNativePDF(provider) {
|
|
165
|
+
const config = PDF_PROVIDER_CONFIGS[provider];
|
|
166
|
+
return config?.supportsNative || false;
|
|
167
|
+
}
|
|
168
|
+
static getProviderConfig(provider) {
|
|
169
|
+
return PDF_PROVIDER_CONFIGS[provider] || null;
|
|
170
|
+
}
|
|
171
|
+
static isValidPDF(buffer) {
|
|
172
|
+
if (buffer.length < 5) {
|
|
173
|
+
return false;
|
|
174
|
+
}
|
|
175
|
+
return buffer.subarray(0, 5).equals(this.PDF_SIGNATURE);
|
|
176
|
+
}
|
|
177
|
+
static extractBasicMetadata(buffer) {
|
|
178
|
+
const headerSize = Math.min(10000, buffer.length);
|
|
179
|
+
const header = buffer.toString("utf-8", 0, headerSize);
|
|
180
|
+
const versionMatch = header.match(/%PDF-(\d\.\d)/);
|
|
181
|
+
const version = versionMatch ? versionMatch[1] : "unknown";
|
|
182
|
+
const pageMatches = header.match(/\/Type\s*\/Page[^s]/g);
|
|
183
|
+
const estimatedPages = pageMatches ? pageMatches.length : null;
|
|
184
|
+
return {
|
|
185
|
+
version,
|
|
186
|
+
estimatedPages,
|
|
187
|
+
filename: undefined,
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
static estimateTokens(pageCount, mode = "visual") {
|
|
191
|
+
if (mode === "text-only") {
|
|
192
|
+
return Math.ceil((pageCount / 3) * 1000);
|
|
193
|
+
}
|
|
194
|
+
else {
|
|
195
|
+
return Math.ceil((pageCount / 3) * 7000);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juspay/neurolink",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.51.0",
|
|
4
4
|
"description": "Universal AI Development Platform with working MCP integration, multi-provider support, and professional CLI. Built-in tools operational, 58+ external MCP servers discoverable. Connect to filesystem, GitHub, database operations, and more. Build, test, and deploy AI applications with 9 major providers: OpenAI, Anthropic, Google AI, AWS Bedrock, Azure, Hugging Face, Ollama, and Mistral AI.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Juspay Technologies",
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
"scripts": {
|
|
29
29
|
"dev": "vite dev",
|
|
30
30
|
"build": "vite build && pnpm run prepack",
|
|
31
|
-
"build:cli": "echo 'Building CLI...' && tsc --project tsconfig.cli.json && pnpm link --global",
|
|
31
|
+
"build:cli": "echo 'Building CLI...' && svelte-kit sync && tsc --project tsconfig.cli.json && pnpm link --global",
|
|
32
32
|
"cli": "node dist/cli/index.js",
|
|
33
33
|
"preview": "vite preview",
|
|
34
34
|
"prepare": "git rev-parse --git-dir > /dev/null 2>&1 && husky install || echo 'Skipping husky in non-git environment'",
|
|
35
35
|
"prepack": "svelte-kit sync && svelte-package && pnpm run build:cli && publint",
|
|
36
|
-
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json && tsc --noEmit --strict
|
|
36
|
+
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json && tsc --noEmit --strict",
|
|
37
37
|
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
38
38
|
"test": "vitest",
|
|
39
39
|
"test:run": "vitest run",
|