@absolutejs/rag 0.24.1 → 0.24.3
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 +12 -0
- package/RESEARCH.md +2 -0
- package/changelog.json +27 -0
- package/dist/research/index.js +20 -7
- package/dist/research/index.js.map +3 -3
- package/dist/src/research/types.d.ts +2 -0
- package/dist/web-index/index.js +20 -7
- package/dist/web-index/index.js.map +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,18 @@ 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.24.3 — 2026-11-03
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- **Resume persisted review drafts by JSON pointer and value across database key reordering, preserving completed verdicts and rejecting changed identities.** (`createResearch`)
|
|
14
|
+
|
|
15
|
+
## 0.24.2 — 2026-11-03
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- **Shrink settled failed review batches on explicit continuation, preserving prior verdicts and legacy checkpoints without automatic retries.** (`createResearch`, `ResearchReviewCheckpoint`)
|
|
20
|
+
|
|
9
21
|
## 0.24.1 — 2026-11-03
|
|
10
22
|
|
|
11
23
|
### Fixed
|
package/RESEARCH.md
CHANGED
|
@@ -346,3 +346,5 @@ review processing finished, not that every claim was supported. Reopening a
|
|
|
346
346
|
finished checkpoint performs no provider work. Checkpoints during evidence
|
|
347
347
|
correction remain pending until the new extraction is safely retained, preventing
|
|
348
348
|
replay of uncertain correction calls.
|
|
349
|
+
|
|
350
|
+
Settled failed review batches retain a reduced `nextBatchSize` in the private checkpoint. Explicit continuation halves the failed batch down to one field while retaining completed verdicts; it does not increase output limits or automatically repeat calls. Safe checkpoints written before this hint was introduced remain resumable. Unknown or pending calls still require reconciliation.
|
package/changelog.json
CHANGED
|
@@ -2,6 +2,33 @@
|
|
|
2
2
|
"contract": 1,
|
|
3
3
|
"name": "@absolutejs/rag",
|
|
4
4
|
"releases": [
|
|
5
|
+
{
|
|
6
|
+
"changes": [
|
|
7
|
+
{
|
|
8
|
+
"kind": "fixed",
|
|
9
|
+
"summary": "Resume persisted review drafts by JSON pointer and value across database key reordering, preserving completed verdicts and rejecting changed identities.",
|
|
10
|
+
"symbols": [
|
|
11
|
+
"createResearch"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"date": "2026-11-03",
|
|
16
|
+
"version": "0.24.3"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"changes": [
|
|
20
|
+
{
|
|
21
|
+
"kind": "fixed",
|
|
22
|
+
"summary": "Shrink settled failed review batches on explicit continuation, preserving prior verdicts and legacy checkpoints without automatic retries.",
|
|
23
|
+
"symbols": [
|
|
24
|
+
"createResearch",
|
|
25
|
+
"ResearchReviewCheckpoint"
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"date": "2026-11-03",
|
|
30
|
+
"version": "0.24.2"
|
|
31
|
+
},
|
|
5
32
|
{
|
|
6
33
|
"changes": [
|
|
7
34
|
{
|
package/dist/research/index.js
CHANGED
|
@@ -122280,8 +122280,10 @@ var createResearch = (config) => {
|
|
|
122280
122280
|
reviewBatchSize
|
|
122281
122281
|
});
|
|
122282
122282
|
const resumed = input.resumeReview;
|
|
122283
|
-
if (resumed && (resumed.version !== 1 || resumed.fingerprint !== fingerprint || resumed.pending || !Number.isSafeInteger(resumed.nextField) || resumed.nextField < 0 || !Number.isSafeInteger(resumed.pass) || resumed.pass < 0 || resumed.pass > evidenceRepairs))
|
|
122283
|
+
if (resumed && (resumed.version !== 1 || resumed.fingerprint !== fingerprint || resumed.pending || resumed.nextBatchSize !== undefined && (!Number.isSafeInteger(resumed.nextBatchSize) || resumed.nextBatchSize < 1 || resumed.nextBatchSize > reviewBatchSize) || !Number.isSafeInteger(resumed.nextField) || resumed.nextField < 0 || !Number.isSafeInteger(resumed.pass) || resumed.pass < 0 || resumed.pass > evidenceRepairs))
|
|
122284
122284
|
throw new Error("Review checkpoint requires reconciliation or does not match this task");
|
|
122285
|
+
const legacyFailedReview = resumed && !resumed.pending && resumed.result.operations.at(-1)?.kind === "review" && resumed.result.operations.at(-1)?.status === "unknown";
|
|
122286
|
+
let nextBatchSize = resumed?.nextBatchSize ?? (legacyFailedReview ? Math.max(1, Math.floor(reviewBatchSize / 2)) : reviewBatchSize);
|
|
122285
122287
|
const result = resumed ? structuredClone(resumed.result) : {
|
|
122286
122288
|
id: crypto.randomUUID(),
|
|
122287
122289
|
status: "unavailable",
|
|
@@ -122316,6 +122318,7 @@ var createResearch = (config) => {
|
|
|
122316
122318
|
pass,
|
|
122317
122319
|
stage,
|
|
122318
122320
|
nextField,
|
|
122321
|
+
nextBatchSize,
|
|
122319
122322
|
pending,
|
|
122320
122323
|
finished,
|
|
122321
122324
|
draft: structuredClone(draft),
|
|
@@ -122685,9 +122688,17 @@ Correct the previous schema-invalid response using the validation diagnostics. T
|
|
|
122685
122688
|
if (!continuing)
|
|
122686
122689
|
result.fields = [];
|
|
122687
122690
|
await persistReview(pass, continuing ? resumed.nextField : 0, false, data);
|
|
122688
|
-
|
|
122689
|
-
if (continuing
|
|
122690
|
-
|
|
122691
|
+
let leaves = researchLeaves(data, Number.MAX_SAFE_INTEGER);
|
|
122692
|
+
if (continuing) {
|
|
122693
|
+
const byPath = new Map(leaves.map((field) => [field.path, field]));
|
|
122694
|
+
const completedPaths = new Set(result.fields.map((field) => field.path));
|
|
122695
|
+
if (resumed.nextField > leaves.length || result.fields.length !== resumed.nextField || completedPaths.size !== result.fields.length || result.fields.some((field) => !byPath.has(field.path) || byPath.get(field.path).value !== field.value))
|
|
122696
|
+
throw new Error("Review checkpoint fields do not match draft");
|
|
122697
|
+
leaves = [
|
|
122698
|
+
...result.fields.map(({ path, value }) => ({ path, value })),
|
|
122699
|
+
...leaves.filter((field) => !completedPaths.has(field.path))
|
|
122700
|
+
];
|
|
122701
|
+
}
|
|
122691
122702
|
if (!leaves.length) {
|
|
122692
122703
|
result.data = data;
|
|
122693
122704
|
result.status = result.limitations.length ? "partial" : "empty";
|
|
@@ -122696,13 +122707,13 @@ Correct the previous schema-invalid response using the validation diagnostics. T
|
|
|
122696
122707
|
}
|
|
122697
122708
|
const reviewSources = researchPassages(result.sources);
|
|
122698
122709
|
const reviewStart = continuing ? resumed.nextField : 0;
|
|
122699
|
-
for (let offset = reviewStart;offset < leaves.length; offset += Math.min(
|
|
122710
|
+
for (let offset = reviewStart;offset < leaves.length; offset += Math.min(nextBatchSize, limits.fields - (offset - reviewStart))) {
|
|
122700
122711
|
if (offset - reviewStart >= limits.fields) {
|
|
122701
122712
|
result.status = "partial";
|
|
122702
122713
|
result.limitations.push("Review field allowance reached; remaining fields are saved for explicit continuation");
|
|
122703
122714
|
return result;
|
|
122704
122715
|
}
|
|
122705
|
-
const batch = leaves.slice(offset, offset + Math.min(
|
|
122716
|
+
const batch = leaves.slice(offset, offset + Math.min(nextBatchSize, limits.fields - (offset - reviewStart)));
|
|
122706
122717
|
await persistReview(pass, offset, true, data);
|
|
122707
122718
|
let reviewed;
|
|
122708
122719
|
try {
|
|
@@ -122719,6 +122730,8 @@ Correct the previous schema-invalid response using the validation diagnostics. T
|
|
|
122719
122730
|
});
|
|
122720
122731
|
} catch (error) {
|
|
122721
122732
|
const known = error instanceof Error && error.message === "Research budget denied" || !admit && await config.isReviewFailureSettled?.(error) === true;
|
|
122733
|
+
if (known && !(error instanceof Error && error.message === "Research budget denied"))
|
|
122734
|
+
nextBatchSize = Math.max(1, Math.floor(batch.length / 2));
|
|
122722
122735
|
await persistReview(pass, offset, !known, data);
|
|
122723
122736
|
throw error;
|
|
122724
122737
|
}
|
|
@@ -123534,5 +123547,5 @@ export {
|
|
|
123534
123547
|
selectResearchMonitorEvents
|
|
123535
123548
|
};
|
|
123536
123549
|
|
|
123537
|
-
//# debugId=
|
|
123550
|
+
//# debugId=98A9BACE966FD2EB64756E2164756E21
|
|
123538
123551
|
//# sourceMappingURL=index.js.map
|