@absolutejs/rag 0.24.0 → 0.24.2

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,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.2 — 2026-11-03
10
+
11
+ ### Fixed
12
+
13
+ - **Shrink settled failed review batches on explicit continuation, preserving prior verdicts and legacy checkpoints without automatic retries.** (`createResearch`, `ResearchReviewCheckpoint`)
14
+
15
+ ## 0.24.1 — 2026-11-03
16
+
17
+ ### Fixed
18
+
19
+ - **Mark empty extractions complete and retain retrieval cursors across review continuation without repeating searches or reads.** (`createResearch`, `ResearchReviewCheckpoint`)
20
+
9
21
  ## 0.24.0 — 2026-11-03
10
22
 
11
23
  ### Added
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,34 @@
2
2
  "contract": 1,
3
3
  "name": "@absolutejs/rag",
4
4
  "releases": [
5
+ {
6
+ "changes": [
7
+ {
8
+ "kind": "fixed",
9
+ "summary": "Shrink settled failed review batches on explicit continuation, preserving prior verdicts and legacy checkpoints without automatic retries.",
10
+ "symbols": [
11
+ "createResearch",
12
+ "ResearchReviewCheckpoint"
13
+ ]
14
+ }
15
+ ],
16
+ "date": "2026-11-03",
17
+ "version": "0.24.2"
18
+ },
19
+ {
20
+ "changes": [
21
+ {
22
+ "kind": "fixed",
23
+ "summary": "Mark empty extractions complete and retain retrieval cursors across review continuation without repeating searches or reads.",
24
+ "symbols": [
25
+ "createResearch",
26
+ "ResearchReviewCheckpoint"
27
+ ]
28
+ }
29
+ ],
30
+ "date": "2026-11-03",
31
+ "version": "0.24.1"
32
+ },
5
33
  {
6
34
  "changes": [
7
35
  {
@@ -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,10 +122318,14 @@ 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),
122322
- result: structuredClone(snapshot)
122325
+ result: structuredClone(snapshot),
122326
+ searched: [...queries],
122327
+ read: [...urls],
122328
+ links: [...discoveredLinks.values()]
122323
122329
  };
122324
122330
  try {
122325
122331
  await input.onReviewCheckpoint?.(checkpoint);
@@ -122432,8 +122438,12 @@ Correct the previous schema-invalid response using the validation diagnostics. T
122432
122438
  document2.url,
122433
122439
  document2.text
122434
122440
  ]));
122435
- for (const prior of result.searches)
122436
- queries.add(prior.query);
122441
+ for (const prior of resumed?.searched ?? result.searches.map((search) => search.query))
122442
+ queries.add(prior);
122443
+ for (const prior of resumed?.read ?? [])
122444
+ urls.add(prior);
122445
+ for (const link of resumed?.links ?? [])
122446
+ discoveredLinks.set(link.url, link);
122437
122447
  for (const prior of result.sources)
122438
122448
  if (prior.contentFetchedAt)
122439
122449
  urls.add(prior.url);
@@ -122684,17 +122694,18 @@ Correct the previous schema-invalid response using the validation diagnostics. T
122684
122694
  if (!leaves.length) {
122685
122695
  result.data = data;
122686
122696
  result.status = result.limitations.length ? "partial" : "empty";
122697
+ await persistReview(pass, 0, false, data, true);
122687
122698
  return result;
122688
122699
  }
122689
122700
  const reviewSources = researchPassages(result.sources);
122690
122701
  const reviewStart = continuing ? resumed.nextField : 0;
122691
- for (let offset = reviewStart;offset < leaves.length; offset += Math.min(reviewBatchSize, limits.fields - (offset - reviewStart))) {
122702
+ for (let offset = reviewStart;offset < leaves.length; offset += Math.min(nextBatchSize, limits.fields - (offset - reviewStart))) {
122692
122703
  if (offset - reviewStart >= limits.fields) {
122693
122704
  result.status = "partial";
122694
122705
  result.limitations.push("Review field allowance reached; remaining fields are saved for explicit continuation");
122695
122706
  return result;
122696
122707
  }
122697
- const batch = leaves.slice(offset, offset + Math.min(reviewBatchSize, limits.fields - (offset - reviewStart)));
122708
+ const batch = leaves.slice(offset, offset + Math.min(nextBatchSize, limits.fields - (offset - reviewStart)));
122698
122709
  await persistReview(pass, offset, true, data);
122699
122710
  let reviewed;
122700
122711
  try {
@@ -122711,6 +122722,8 @@ Correct the previous schema-invalid response using the validation diagnostics. T
122711
122722
  });
122712
122723
  } catch (error) {
122713
122724
  const known = error instanceof Error && error.message === "Research budget denied" || !admit && await config.isReviewFailureSettled?.(error) === true;
122725
+ if (known && !(error instanceof Error && error.message === "Research budget denied"))
122726
+ nextBatchSize = Math.max(1, Math.floor(batch.length / 2));
122714
122727
  await persistReview(pass, offset, !known, data);
122715
122728
  throw error;
122716
122729
  }
@@ -123526,5 +123539,5 @@ export {
123526
123539
  selectResearchMonitorEvents
123527
123540
  };
123528
123541
 
123529
- //# debugId=DA8131B431BAFF9764756E2164756E21
123542
+ //# debugId=8B8DD9C3BFAE701F64756E2164756E21
123530
123543
  //# sourceMappingURL=index.js.map