@absolutejs/rag 0.24.0 → 0.24.1

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.
@@ -37,6 +37,13 @@ export type ResearchReviewCheckpoint = {
37
37
  pending: boolean;
38
38
  finished?: boolean;
39
39
  draft: unknown;
40
+ searched?: string[];
41
+ read?: string[];
42
+ links?: Array<{
43
+ url: string;
44
+ label: string;
45
+ discoveredOn: string;
46
+ }>;
40
47
  result: ResearchResult;
41
48
  };
42
49
  export type ResearchResult<T = unknown> = {
@@ -123602,7 +123602,10 @@ var createResearch = (config) => {
123602
123602
  pending,
123603
123603
  finished,
123604
123604
  draft: structuredClone(draft),
123605
- result: structuredClone(snapshot)
123605
+ result: structuredClone(snapshot),
123606
+ searched: [...queries],
123607
+ read: [...urls],
123608
+ links: [...discoveredLinks.values()]
123606
123609
  };
123607
123610
  try {
123608
123611
  await input.onReviewCheckpoint?.(checkpoint);
@@ -123715,8 +123718,12 @@ Correct the previous schema-invalid response using the validation diagnostics. T
123715
123718
  document2.url,
123716
123719
  document2.text
123717
123720
  ]));
123718
- for (const prior of result.searches)
123719
- queries.add(prior.query);
123721
+ for (const prior of resumed?.searched ?? result.searches.map((search) => search.query))
123722
+ queries.add(prior);
123723
+ for (const prior of resumed?.read ?? [])
123724
+ urls.add(prior);
123725
+ for (const link of resumed?.links ?? [])
123726
+ discoveredLinks.set(link.url, link);
123720
123727
  for (const prior of result.sources)
123721
123728
  if (prior.contentFetchedAt)
123722
123729
  urls.add(prior.url);
@@ -123967,6 +123974,7 @@ Correct the previous schema-invalid response using the validation diagnostics. T
123967
123974
  if (!leaves.length) {
123968
123975
  result.data = data;
123969
123976
  result.status = result.limitations.length ? "partial" : "empty";
123977
+ await persistReview(pass, 0, false, data, true);
123970
123978
  return result;
123971
123979
  }
123972
123980
  const reviewSources = researchPassages(result.sources);
@@ -124190,5 +124198,5 @@ export {
124190
124198
  webIndexPostgresSchemaSql
124191
124199
  };
124192
124200
 
124193
- //# debugId=6A98E00B3B9B720D64756E2164756E21
124201
+ //# debugId=1C3B8A3EB19C58AF64756E2164756E21
124194
124202
  //# sourceMappingURL=index.js.map