@absolutejs/absolute 0.19.0-beta.617 → 0.19.0-beta.618

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/dist/ai/index.js CHANGED
@@ -2054,6 +2054,7 @@ var createRAGFileRetrievalLaneHandoffDecisionStore = (path) => ({
2054
2054
  });
2055
2055
  var createRAGFileRetrievalReleaseIncidentStore = (path) => ({
2056
2056
  listIncidents: async ({
2057
+ corpusGroupKey,
2057
2058
  groupKey,
2058
2059
  limit,
2059
2060
  severity,
@@ -2070,7 +2071,7 @@ var createRAGFileRetrievalReleaseIncidentStore = (path) => ({
2070
2071
  throw error;
2071
2072
  }
2072
2073
  }
2073
- const filtered = parsed.filter((entry) => (!groupKey || entry.groupKey === groupKey) && (!targetRolloutLabel || entry.targetRolloutLabel === targetRolloutLabel) && (!severity || entry.severity === severity) && (!status || entry.status === status));
2074
+ const filtered = parsed.filter((entry) => (!corpusGroupKey || entry.corpusGroupKey === corpusGroupKey) && (!groupKey || entry.groupKey === groupKey) && (!targetRolloutLabel || entry.targetRolloutLabel === targetRolloutLabel) && (!severity || entry.severity === severity) && (!status || entry.status === status));
2074
2075
  const sorted = normalizeRetrievalReleaseIncidentRecords(filtered);
2075
2076
  return typeof limit === "number" ? sorted.slice(0, limit) : sorted;
2076
2077
  },
@@ -3053,12 +3054,14 @@ var loadRAGRetrievalLaneHandoffDecisions = async ({
3053
3054
  })));
3054
3055
  var loadRAGRetrievalReleaseIncidents = async ({
3055
3056
  store,
3057
+ corpusGroupKey,
3056
3058
  groupKey,
3057
3059
  limit,
3058
3060
  targetRolloutLabel,
3059
3061
  status,
3060
3062
  severity
3061
3063
  }) => normalizeRetrievalReleaseIncidentRecords(await Promise.resolve(store.listIncidents({
3064
+ corpusGroupKey,
3062
3065
  groupKey,
3063
3066
  limit,
3064
3067
  severity,
@@ -13688,6 +13691,24 @@ var ragChat = (config) => {
13688
13691
  limit: 100,
13689
13692
  store: config.retrievalReleaseIncidentStore
13690
13693
  });
13694
+ const baselineCorpusGroups = config.retrievalBaselineStore ? await loadRAGRetrievalBaselines({
13695
+ limit: 200,
13696
+ store: config.retrievalBaselineStore
13697
+ }) : [];
13698
+ const comparisonRunCorpusGroups = config.retrievalComparisonHistoryStore ? await loadRAGRetrievalComparisonHistory({
13699
+ limit: 200,
13700
+ store: config.retrievalComparisonHistoryStore
13701
+ }) : [];
13702
+ const releaseDecisionCorpusGroups = config.retrievalReleaseDecisionStore ? await loadRAGRetrievalReleaseDecisions({
13703
+ limit: 200,
13704
+ store: config.retrievalReleaseDecisionStore
13705
+ }) : [];
13706
+ const resolveIncidentCorpusGroupKey = (groupKey) => {
13707
+ if (!groupKey) {
13708
+ return;
13709
+ }
13710
+ return existing.find((entry) => entry.groupKey === groupKey && typeof entry.corpusGroupKey === "string")?.corpusGroupKey ?? comparisonRunCorpusGroups.find((entry) => entry.groupKey === groupKey && typeof entry.corpusGroupKey === "string")?.corpusGroupKey ?? baselineCorpusGroups.find((entry) => entry.groupKey === groupKey && typeof entry.corpusGroupKey === "string")?.corpusGroupKey ?? releaseDecisionCorpusGroups.find((entry) => entry.groupKey === groupKey && typeof entry.corpusGroupKey === "string")?.corpusGroupKey;
13711
+ };
13691
13712
  const nextByKey = new Map;
13692
13713
  for (const candidate of input.promotionCandidates) {
13693
13714
  if (!candidate.groupKey || !candidate.targetRolloutLabel) {
@@ -13701,6 +13722,7 @@ var ragChat = (config) => {
13701
13722
  nextByKey.set(key, {
13702
13723
  baselineRetrievalId: candidate.baselineRetrievalId,
13703
13724
  candidateRetrievalId: candidate.candidateRetrievalId,
13725
+ corpusGroupKey: resolveIncidentCorpusGroupKey(candidate.groupKey),
13704
13726
  groupKey: candidate.groupKey,
13705
13727
  id: key,
13706
13728
  kind,
@@ -13726,6 +13748,7 @@ var ragChat = (config) => {
13726
13748
  nextByKey.set(key, {
13727
13749
  baselineRetrievalId: handoff.targetBaselineRetrievalId,
13728
13750
  candidateRetrievalId: handoff.candidateRetrievalId,
13751
+ corpusGroupKey: handoff.corpusGroupKey,
13729
13752
  groupKey: handoff.groupKey,
13730
13753
  id: key,
13731
13754
  kind: "handoff_stale",
@@ -13738,7 +13761,7 @@ var ragChat = (config) => {
13738
13761
  });
13739
13762
  }
13740
13763
  for (const incident of nextByKey.values()) {
13741
- const matchingIncidents = existing.filter((entry) => entry.groupKey === incident.groupKey && entry.kind === incident.kind && (entry.targetRolloutLabel ?? undefined) === (incident.targetRolloutLabel ?? undefined)).sort((left, right) => right.triggeredAt - left.triggeredAt);
13764
+ const matchingIncidents = existing.filter((entry) => entry.corpusGroupKey === incident.corpusGroupKey && entry.groupKey === incident.groupKey && entry.kind === incident.kind && (entry.targetRolloutLabel ?? undefined) === (incident.targetRolloutLabel ?? undefined)).sort((left, right) => right.triggeredAt - left.triggeredAt);
13742
13765
  const openIncident = matchingIncidents.find((entry) => entry.status === "open");
13743
13766
  const latestMatchingIncident = matchingIncidents[0];
13744
13767
  if (!openIncident) {
@@ -15151,6 +15174,7 @@ var ragChat = (config) => {
15151
15174
  const acknowledged = getStringProperty(queryInput, "acknowledged");
15152
15175
  const targetRolloutLabel = getStringProperty(queryInput, "targetRolloutLabel");
15153
15176
  const incidents = await loadRAGRetrievalReleaseIncidents({
15177
+ corpusGroupKey: getStringProperty(queryInput, "corpusGroupKey"),
15154
15178
  groupKey: getStringProperty(queryInput, "groupKey"),
15155
15179
  limit: getIntegerLikeProperty(queryInput, "limit"),
15156
15180
  severity: severity === "warning" || severity === "critical" ? severity : undefined,
@@ -15801,6 +15825,7 @@ var ragChat = (config) => {
15801
15825
  });
15802
15826
  return {
15803
15827
  incidents: await loadRAGRetrievalReleaseIncidents({
15828
+ corpusGroupKey: incident.corpusGroupKey,
15804
15829
  groupKey: incident.groupKey,
15805
15830
  limit: 20,
15806
15831
  store: config.retrievalReleaseIncidentStore
@@ -15844,6 +15869,7 @@ var ragChat = (config) => {
15844
15869
  });
15845
15870
  return {
15846
15871
  incidents: await loadRAGRetrievalReleaseIncidents({
15872
+ corpusGroupKey: incident.corpusGroupKey,
15847
15873
  groupKey: incident.groupKey,
15848
15874
  limit: 20,
15849
15875
  store: config.retrievalReleaseIncidentStore
@@ -15887,6 +15913,7 @@ var ragChat = (config) => {
15887
15913
  });
15888
15914
  return {
15889
15915
  incidents: await loadRAGRetrievalReleaseIncidents({
15916
+ corpusGroupKey: incident.corpusGroupKey,
15890
15917
  groupKey: incident.groupKey,
15891
15918
  limit: 20,
15892
15919
  store: config.retrievalReleaseIncidentStore
@@ -23860,5 +23887,5 @@ export {
23860
23887
  aiChat
23861
23888
  };
23862
23889
 
23863
- //# debugId=98118EA892F30E7564756E2164756E21
23890
+ //# debugId=3A168E4E2E133AED64756E2164756E21
23864
23891
  //# sourceMappingURL=index.js.map