@absolutejs/rag 0.15.2 → 0.16.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 +6 -0
- package/README.md +18 -0
- package/changelog.json +13 -0
- package/dist/index.js +21210 -362
- package/dist/index.js.map +162 -3
- package/dist/src/index.d.ts +2 -1
- package/dist/src/ingestion/pdfPages.d.ts +14 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,12 @@ This file is generated by `absolute-changelog` from the entries in
|
|
|
6
6
|
`changelog/`. Edit an entry, not this file — and add new ones under
|
|
7
7
|
`changelog/unreleased/`.
|
|
8
8
|
|
|
9
|
+
## 0.16.0 — 2026-09-23
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- **Add page-by-page PDF extraction with OCR for image-bearing pages, preserving mixed-document evidence and rejecting incomplete extraction.** (`createRAGPagedPDFExtractor`)
|
|
14
|
+
|
|
9
15
|
## 0.15.2 — 2026-09-23
|
|
10
16
|
|
|
11
17
|
### Fixed
|
package/README.md
CHANGED
|
@@ -210,3 +210,21 @@ binds each bounded text excerpt to a source ID, while source entries provide
|
|
|
210
210
|
compact numbered `inlineCitation` links. This lets adapters present source-local
|
|
211
211
|
evidence without dumping raw retrieval metadata into a model's response context.
|
|
212
212
|
The combined document text respects `maxChars`; truncated excerpts are marked.
|
|
213
|
+
|
|
214
|
+
### Scanned and mixed PDFs
|
|
215
|
+
|
|
216
|
+
`createRAGPagedPDFExtractor({ provider, signal, onProgress })` preserves native
|
|
217
|
+
text pages and sends image-bearing pages individually to a configured
|
|
218
|
+
`RAGOCRProvider`. It also handles pages with visible drawing operations but no
|
|
219
|
+
extractable text. This catches scans inside otherwise readable documents; a
|
|
220
|
+
long embedded header does not cause a scanned body to be skipped. Page numbers
|
|
221
|
+
and native/OCR provenance remain attached to each extracted document. Native
|
|
222
|
+
text omitted by OCR is retained alongside the transcription.
|
|
223
|
+
|
|
224
|
+
The provider receives a valid one-page PDF plus its original `pageNumber` and
|
|
225
|
+
`pageCount` in metadata. The host owns credentials, metering, and model output
|
|
226
|
+
limits; providers must reject truncated responses. Page failures reject the
|
|
227
|
+
whole extraction instead of reporting an incomplete document as complete.
|
|
228
|
+
`signal` is checked between pages and after OCR; pass the same signal into the
|
|
229
|
+
provider to cancel its in-flight request. `onProgress` reports completed pages.
|
|
230
|
+
Blank pages are skipped; an entirely unreadable document is rejected.
|
package/changelog.json
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
"contract": 1,
|
|
3
3
|
"name": "@absolutejs/rag",
|
|
4
4
|
"releases": [
|
|
5
|
+
{
|
|
6
|
+
"changes": [
|
|
7
|
+
{
|
|
8
|
+
"kind": "added",
|
|
9
|
+
"summary": "Add page-by-page PDF extraction with OCR for image-bearing pages, preserving mixed-document evidence and rejecting incomplete extraction.",
|
|
10
|
+
"symbols": [
|
|
11
|
+
"createRAGPagedPDFExtractor"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"date": "2026-09-23",
|
|
16
|
+
"version": "0.16.0"
|
|
17
|
+
},
|
|
5
18
|
{
|
|
6
19
|
"changes": [
|
|
7
20
|
{
|