@juspay/neurolink 10.10.7 → 10.10.8
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 +37 -8
- package/dist/browser/neurolink.min.js +315 -315
- package/dist/cli/factories/commandFactory.js +8 -4
- package/dist/lib/processors/media/VideoProcessor.d.ts +13 -3
- package/dist/lib/processors/media/VideoProcessor.js +53 -12
- package/dist/lib/types/file.d.ts +37 -0
- package/dist/lib/types/generate.d.ts +4 -0
- package/dist/lib/types/stream.d.ts +4 -0
- package/dist/lib/utils/errorHandling.d.ts +21 -0
- package/dist/lib/utils/errorHandling.js +53 -0
- package/dist/lib/utils/fileDetector.js +9 -6
- package/dist/lib/utils/messageBuilder.js +111 -36
- package/dist/lib/utils/pdfProcessor.d.ts +11 -0
- package/dist/lib/utils/pdfProcessor.js +17 -0
- package/dist/processors/media/VideoProcessor.d.ts +13 -3
- package/dist/processors/media/VideoProcessor.js +53 -12
- package/dist/types/file.d.ts +37 -0
- package/dist/types/generate.d.ts +4 -0
- package/dist/types/stream.d.ts +4 -0
- package/dist/utils/errorHandling.d.ts +21 -0
- package/dist/utils/errorHandling.js +53 -0
- package/dist/utils/fileDetector.js +9 -6
- package/dist/utils/messageBuilder.js +111 -36
- package/dist/utils/pdfProcessor.d.ts +11 -0
- package/dist/utils/pdfProcessor.js +17 -0
- package/package.json +1 -1
|
@@ -212,6 +212,23 @@ export class PDFProcessor {
|
|
|
212
212
|
static getProviderConfig(provider) {
|
|
213
213
|
return PDF_PROVIDER_CONFIGS[provider] || null;
|
|
214
214
|
}
|
|
215
|
+
/**
|
|
216
|
+
* Best-effort page count for a PDF whose count the caller did not supply
|
|
217
|
+
* (#309). Mirrors what `process()` derives for the `input.pdfFiles` path:
|
|
218
|
+
* the accurate pdfjs count when the document parses, otherwise the header
|
|
219
|
+
* regex estimate. Returns null when neither can determine a count.
|
|
220
|
+
*
|
|
221
|
+
* Exists so the aggregate page-limit guard can enforce against PDFs handed
|
|
222
|
+
* in via `input.content`, where `metadata.pages` is optional and routinely
|
|
223
|
+
* omitted — without it, an absent count silently sums as zero.
|
|
224
|
+
*/
|
|
225
|
+
static async resolvePageCount(buffer) {
|
|
226
|
+
const accurate = await PDFProcessor.getAccuratePageCount(buffer);
|
|
227
|
+
if (accurate !== null) {
|
|
228
|
+
return accurate;
|
|
229
|
+
}
|
|
230
|
+
return PDFProcessor.extractBasicMetadata(buffer).estimatedPages;
|
|
231
|
+
}
|
|
215
232
|
static isValidPDF(buffer) {
|
|
216
233
|
if (buffer.length < 5) {
|
|
217
234
|
return false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juspay/neurolink",
|
|
3
|
-
"version": "10.10.
|
|
3
|
+
"version": "10.10.8",
|
|
4
4
|
"packageManager": "pnpm@10.15.1",
|
|
5
5
|
"description": "TypeScript AI SDK with 24+ LLM providers behind one consistent API. MCP-native (connect any MCP server), voice TTS/STT/realtime, RAG, agents, memory, context compaction. OpenAI · Anthropic · Gemini · Bedrock · Azure · Ollama · DeepSeek · NVIDIA NIM and more.",
|
|
6
6
|
"author": {
|