@absolutejs/rag 0.15.2 → 0.17.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 CHANGED
@@ -6,6 +6,22 @@ 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.17.0 — 2026-09-24
10
+
11
+ ### Security
12
+
13
+ - **Reject additional reserved IPv6 ranges through the shared public-address validator** (`isPublicWebAddress`)
14
+
15
+ ### Added
16
+
17
+ - **Reuse shared pinned transport and add a typed remote website-reader client with caller cancellation and reserved fallback time**
18
+
19
+ ## 0.16.0 — 2026-09-23
20
+
21
+ ### Added
22
+
23
+ - **Add page-by-page PDF extraction with OCR for image-bearing pages, preserving mixed-document evidence and rejecting incomplete extraction.** (`createRAGPagedPDFExtractor`)
24
+
9
25
  ## 0.15.2 — 2026-09-23
10
26
 
11
27
  ### Fixed
package/README.md CHANGED
@@ -210,3 +210,23 @@ 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.
231
+
232
+ `createWebsiteReaderClient` from `@absolutejs/rag/web` connects to a trusted host-managed reader service and validates its status, text, source URLs and limitations. Configure the service endpoint and inject a static fallback. The client reserves fallback time within one total deadline, propagates caller cancellation, and keeps service saturation retryable. RAG's public HTTP/HTTPS reader shares the low-level pinned transport with `@absolutejs/egress/transport`; egress still enforces its own allowlisted HTTPS policy.
package/changelog.json CHANGED
@@ -1,207 +1,237 @@
1
1
  {
2
- "contract": 1,
3
- "name": "@absolutejs/rag",
4
- "releases": [
5
- {
6
- "changes": [
7
- {
8
- "kind": "fixed",
9
- "summary": "Decode real PDFs with PDF.js, preserving page evidence across compressed streams and font encodings without application intake caps; retain explicit OCR support.",
10
- "symbols": [
11
- "createPDFFileExtractor",
12
- "createRAGPDFOCRExtractor"
13
- ]
14
- }
15
- ],
16
- "date": "2026-09-23",
17
- "version": "0.15.2"
18
- },
19
- {
20
- "changes": [
21
- {
22
- "kind": "fixed",
23
- "summary": "Preserve all sections of public websites instead of extracting one article fragment, and retain labeled image evidence in source-bound documents.",
24
- "symbols": [
25
- "readRAGWebpage",
26
- "readRAGWebsite"
27
- ]
28
- }
29
- ],
30
- "date": "2026-09-20",
31
- "version": "0.15.1"
32
- },
33
- {
34
- "changes": [
35
- {
36
- "kind": "added",
37
- "summary": "Expose bounded website documents bound to source IDs and compact inline citation links for native MCP evidence presentation.",
38
- "symbols": [
39
- "readRAGWebsite"
40
- ]
41
- }
42
- ],
43
- "date": "2026-09-18",
44
- "version": "0.15.0"
45
- },
46
- {
47
- "changes": [
48
- {
49
- "kind": "changed",
50
- "summary": "Require nearby source links for factual answers and distinguish supported customer examples from unsupported exclusions, ownership relationships and rebrand history.",
51
- "symbols": [
52
- "readRAGWebsite"
53
- ]
54
- },
55
- {
56
- "kind": "added",
57
- "summary": "Return copy-ready source citations before website evidence and repeat links beside each retrieved page; exclude failed reads and unread links from the source list.",
58
- "symbols": [
59
- "readRAGWebsite"
60
- ]
61
- }
62
- ],
63
- "date": "2026-09-18",
64
- "version": "0.14.0"
65
- },
66
- {
67
- "changes": [
68
- {
69
- "kind": "changed",
70
- "summary": "Balance repeated customer, service and company reads across an eight-page default budget (maximum twelve) with 48000 characters, preventing case-study archives from starving service details.",
71
- "symbols": [
72
- "readRAGWebsite"
73
- ]
74
- },
75
- {
76
- "kind": "added",
77
- "summary": "Expose stop reasons and actual incomplete page reads separately from unvisited links; guide targeted continuation and concise nontechnical answers.",
78
- "symbols": [
79
- "readRAGWebsite"
80
- ]
81
- }
82
- ],
83
- "date": "2026-09-18",
84
- "version": "0.13.0"
85
- },
86
- {
87
- "changes": [
88
- {
89
- "kind": "added",
90
- "summary": "Add bounded multi-page website research with exact page citations, semantic links and image labels, media and caption evidence, redirect chains and explicit coverage limits."
91
- },
92
- {
93
- "kind": "changed",
94
- "summary": "Expand website result and renderer contracts with semantic evidence, redirect hops and explicit readiness/coverage metadata; existing renderers may omit the new optional renderer fields.",
95
- "symbols": [
96
- "WebFetchResult",
97
- "WebReadResult",
98
- "WebRenderer",
99
- "readRAGWebpage",
100
- "createPlaywrightWebRenderer"
101
- ]
102
- }
103
- ],
104
- "date": "2026-09-18",
105
- "version": "0.12.0"
106
- },
107
- {
108
- "changes": [
109
- {
110
- "kind": "fixed",
111
- "summary": "Honor HTML response MIME types for extensionless URL ingestion instead of treating website markup as plain text, including XHTML and batch URL loading.",
112
- "symbols": [
113
- "loadRAGDocumentFromURL",
114
- "loadRAGDocumentsFromURLs"
115
- ]
116
- },
117
- {
118
- "kind": "added",
119
- "summary": "Add a bounded public website reader with prepared evidence, per-attempt diagnostics, automatic JavaScript rendering through an optional Playwright adapter, isolated browser contexts and DNS-pinned public-only resource fetching.",
120
- "symbols": [
121
- "readRAGWebpage",
122
- "createPlaywrightWebRenderer",
123
- "fetchPublicWebResource"
124
- ]
125
- }
126
- ],
127
- "date": "2026-09-18",
128
- "version": "0.11.0"
129
- },
130
- {
131
- "changes": [
132
- {
133
- "kind": "added",
134
- "summary": "Encode retrieved original-text passages as request-scoped quote references and restore exact quotes without rewriting source text",
135
- "symbols": [
136
- "createRAGQuoteReferences"
137
- ]
138
- },
139
- {
140
- "kind": "changed",
141
- "summary": "Accept AI 0.2 alongside existing compatible AI releases; validate retrieval against AI 0.2.0",
142
- "symbols": [
143
- "ragChat",
144
- "createRAGWorkflow"
145
- ]
146
- }
147
- ],
148
- "date": "2026-09-16",
149
- "version": "0.10.0"
150
- },
151
- {
152
- "changes": [
153
- {
154
- "kind": "changed",
155
- "summary": "Forward AI context policy through RAG WebSocket and SSE chat; accept the next AI 0.1 release while retaining compatibility with the prior AI peer range",
156
- "symbols": [
157
- "ragChat",
158
- "createRAGWorkflow",
159
- "useRAG",
160
- "useRAGWorkflow",
161
- "useRAGStream",
162
- "createRAG",
163
- "RAGWorkflowService",
164
- "RAGStreamService"
165
- ]
166
- },
167
- {
168
- "kind": "added",
169
- "summary": "Allow servers to request a smaller original-source search result set while preserving candidate ranking, authorization, and exact token budgeting",
170
- "symbols": [
171
- "createRAGOriginalTextTools"
172
- ]
173
- },
174
- {
175
- "kind": "changed",
176
- "summary": "Count a complete authorized source-result envelope once when it fits, avoiding serial tokenizer round trips while retaining exact budget validation and oversized-result packing",
177
- "symbols": [
178
- "createRAGOriginalTextTools"
179
- ]
180
- },
181
- {
182
- "kind": "added",
183
- "summary": "Add verbatim versioned text ingestion and authorized hybrid source tools with caller-supplied model token budgets; preserve multilingual keyword matches",
184
- "symbols": [
185
- "chunkRAGOriginalText",
186
- "readRAGOriginalText",
187
- "createRAGOriginalTextTools"
188
- ]
189
- },
190
- {
191
- "kind": "breaking",
192
- "migration": {
193
- "instruction": "Use a store implementing queryLexical for lexical/hybrid retrieval, or explicitly select vector mode on vector-only stores. Scoped heuristic queries now retain the requested channels; update trace consumers from Scoped direct route to Scoped retrieval route.",
194
- "manual": true
195
- },
196
- "summary": "Reject unsupported lexical and hybrid retrieval instead of silently omitting keyword results; preserve requested channels for scoped heuristic queries",
197
- "symbols": [
198
- "createRAGCollection",
199
- "createHeuristicRAGRetrievalStrategy"
200
- ]
201
- }
202
- ],
203
- "date": "2026-09-16",
204
- "version": "0.9.0"
205
- }
206
- ]
2
+ "contract": 1,
3
+ "name": "@absolutejs/rag",
4
+ "releases": [
5
+ {
6
+ "changes": [
7
+ {
8
+ "kind": "added",
9
+ "summary": "Reuse shared pinned transport and add a typed remote website-reader client with caller cancellation and reserved fallback time"
10
+ },
11
+ {
12
+ "kind": "security",
13
+ "summary": "Reject additional reserved IPv6 ranges through the shared public-address validator",
14
+ "symbols": [
15
+ "isPublicWebAddress"
16
+ ]
17
+ }
18
+ ],
19
+ "date": "2026-09-24",
20
+ "version": "0.17.0"
21
+ },
22
+ {
23
+ "changes": [
24
+ {
25
+ "kind": "added",
26
+ "summary": "Add page-by-page PDF extraction with OCR for image-bearing pages, preserving mixed-document evidence and rejecting incomplete extraction.",
27
+ "symbols": [
28
+ "createRAGPagedPDFExtractor"
29
+ ]
30
+ }
31
+ ],
32
+ "date": "2026-09-23",
33
+ "version": "0.16.0"
34
+ },
35
+ {
36
+ "changes": [
37
+ {
38
+ "kind": "fixed",
39
+ "summary": "Decode real PDFs with PDF.js, preserving page evidence across compressed streams and font encodings without application intake caps; retain explicit OCR support.",
40
+ "symbols": [
41
+ "createPDFFileExtractor",
42
+ "createRAGPDFOCRExtractor"
43
+ ]
44
+ }
45
+ ],
46
+ "date": "2026-09-23",
47
+ "version": "0.15.2"
48
+ },
49
+ {
50
+ "changes": [
51
+ {
52
+ "kind": "fixed",
53
+ "summary": "Preserve all sections of public websites instead of extracting one article fragment, and retain labeled image evidence in source-bound documents.",
54
+ "symbols": [
55
+ "readRAGWebpage",
56
+ "readRAGWebsite"
57
+ ]
58
+ }
59
+ ],
60
+ "date": "2026-09-20",
61
+ "version": "0.15.1"
62
+ },
63
+ {
64
+ "changes": [
65
+ {
66
+ "kind": "added",
67
+ "summary": "Expose bounded website documents bound to source IDs and compact inline citation links for native MCP evidence presentation.",
68
+ "symbols": [
69
+ "readRAGWebsite"
70
+ ]
71
+ }
72
+ ],
73
+ "date": "2026-09-18",
74
+ "version": "0.15.0"
75
+ },
76
+ {
77
+ "changes": [
78
+ {
79
+ "kind": "changed",
80
+ "summary": "Require nearby source links for factual answers and distinguish supported customer examples from unsupported exclusions, ownership relationships and rebrand history.",
81
+ "symbols": [
82
+ "readRAGWebsite"
83
+ ]
84
+ },
85
+ {
86
+ "kind": "added",
87
+ "summary": "Return copy-ready source citations before website evidence and repeat links beside each retrieved page; exclude failed reads and unread links from the source list.",
88
+ "symbols": [
89
+ "readRAGWebsite"
90
+ ]
91
+ }
92
+ ],
93
+ "date": "2026-09-18",
94
+ "version": "0.14.0"
95
+ },
96
+ {
97
+ "changes": [
98
+ {
99
+ "kind": "changed",
100
+ "summary": "Balance repeated customer, service and company reads across an eight-page default budget (maximum twelve) with 48000 characters, preventing case-study archives from starving service details.",
101
+ "symbols": [
102
+ "readRAGWebsite"
103
+ ]
104
+ },
105
+ {
106
+ "kind": "added",
107
+ "summary": "Expose stop reasons and actual incomplete page reads separately from unvisited links; guide targeted continuation and concise nontechnical answers.",
108
+ "symbols": [
109
+ "readRAGWebsite"
110
+ ]
111
+ }
112
+ ],
113
+ "date": "2026-09-18",
114
+ "version": "0.13.0"
115
+ },
116
+ {
117
+ "changes": [
118
+ {
119
+ "kind": "added",
120
+ "summary": "Add bounded multi-page website research with exact page citations, semantic links and image labels, media and caption evidence, redirect chains and explicit coverage limits."
121
+ },
122
+ {
123
+ "kind": "changed",
124
+ "summary": "Expand website result and renderer contracts with semantic evidence, redirect hops and explicit readiness/coverage metadata; existing renderers may omit the new optional renderer fields.",
125
+ "symbols": [
126
+ "WebFetchResult",
127
+ "WebReadResult",
128
+ "WebRenderer",
129
+ "readRAGWebpage",
130
+ "createPlaywrightWebRenderer"
131
+ ]
132
+ }
133
+ ],
134
+ "date": "2026-09-18",
135
+ "version": "0.12.0"
136
+ },
137
+ {
138
+ "changes": [
139
+ {
140
+ "kind": "fixed",
141
+ "summary": "Honor HTML response MIME types for extensionless URL ingestion instead of treating website markup as plain text, including XHTML and batch URL loading.",
142
+ "symbols": [
143
+ "loadRAGDocumentFromURL",
144
+ "loadRAGDocumentsFromURLs"
145
+ ]
146
+ },
147
+ {
148
+ "kind": "added",
149
+ "summary": "Add a bounded public website reader with prepared evidence, per-attempt diagnostics, automatic JavaScript rendering through an optional Playwright adapter, isolated browser contexts and DNS-pinned public-only resource fetching.",
150
+ "symbols": [
151
+ "readRAGWebpage",
152
+ "createPlaywrightWebRenderer",
153
+ "fetchPublicWebResource"
154
+ ]
155
+ }
156
+ ],
157
+ "date": "2026-09-18",
158
+ "version": "0.11.0"
159
+ },
160
+ {
161
+ "changes": [
162
+ {
163
+ "kind": "added",
164
+ "summary": "Encode retrieved original-text passages as request-scoped quote references and restore exact quotes without rewriting source text",
165
+ "symbols": [
166
+ "createRAGQuoteReferences"
167
+ ]
168
+ },
169
+ {
170
+ "kind": "changed",
171
+ "summary": "Accept AI 0.2 alongside existing compatible AI releases; validate retrieval against AI 0.2.0",
172
+ "symbols": [
173
+ "ragChat",
174
+ "createRAGWorkflow"
175
+ ]
176
+ }
177
+ ],
178
+ "date": "2026-09-16",
179
+ "version": "0.10.0"
180
+ },
181
+ {
182
+ "changes": [
183
+ {
184
+ "kind": "changed",
185
+ "summary": "Forward AI context policy through RAG WebSocket and SSE chat; accept the next AI 0.1 release while retaining compatibility with the prior AI peer range",
186
+ "symbols": [
187
+ "ragChat",
188
+ "createRAGWorkflow",
189
+ "useRAG",
190
+ "useRAGWorkflow",
191
+ "useRAGStream",
192
+ "createRAG",
193
+ "RAGWorkflowService",
194
+ "RAGStreamService"
195
+ ]
196
+ },
197
+ {
198
+ "kind": "added",
199
+ "summary": "Allow servers to request a smaller original-source search result set while preserving candidate ranking, authorization, and exact token budgeting",
200
+ "symbols": [
201
+ "createRAGOriginalTextTools"
202
+ ]
203
+ },
204
+ {
205
+ "kind": "changed",
206
+ "summary": "Count a complete authorized source-result envelope once when it fits, avoiding serial tokenizer round trips while retaining exact budget validation and oversized-result packing",
207
+ "symbols": [
208
+ "createRAGOriginalTextTools"
209
+ ]
210
+ },
211
+ {
212
+ "kind": "added",
213
+ "summary": "Add verbatim versioned text ingestion and authorized hybrid source tools with caller-supplied model token budgets; preserve multilingual keyword matches",
214
+ "symbols": [
215
+ "chunkRAGOriginalText",
216
+ "readRAGOriginalText",
217
+ "createRAGOriginalTextTools"
218
+ ]
219
+ },
220
+ {
221
+ "kind": "breaking",
222
+ "migration": {
223
+ "instruction": "Use a store implementing queryLexical for lexical/hybrid retrieval, or explicitly select vector mode on vector-only stores. Scoped heuristic queries now retain the requested channels; update trace consumers from Scoped direct route to Scoped retrieval route.",
224
+ "manual": true
225
+ },
226
+ "summary": "Reject unsupported lexical and hybrid retrieval instead of silently omitting keyword results; preserve requested channels for scoped heuristic queries",
227
+ "symbols": [
228
+ "createRAGCollection",
229
+ "createHeuristicRAGRetrievalStrategy"
230
+ ]
231
+ }
232
+ ],
233
+ "date": "2026-09-16",
234
+ "version": "0.9.0"
235
+ }
236
+ ]
207
237
  }