@anuma/sdk 5.0.2 → 5.0.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/dist/expo/index.cjs +14 -3
- package/dist/expo/index.mjs +14 -3
- package/dist/react/index.cjs +14 -3
- package/dist/react/index.mjs +14 -3
- package/dist/server/index.cjs +14 -3
- package/dist/server/index.mjs +14 -3
- package/package.json +1 -1
package/dist/expo/index.cjs
CHANGED
|
@@ -17281,7 +17281,14 @@ async function synthesizeProfile(ctx, options = {}) {
|
|
|
17281
17281
|
observationTrends
|
|
17282
17282
|
};
|
|
17283
17283
|
}
|
|
17284
|
-
const staleKeys = await computeStaleFacetKeys(
|
|
17284
|
+
const staleKeys = await computeStaleFacetKeys(
|
|
17285
|
+
ctx,
|
|
17286
|
+
memories,
|
|
17287
|
+
facets,
|
|
17288
|
+
previous,
|
|
17289
|
+
watermark,
|
|
17290
|
+
options.reviewedMemoryIds
|
|
17291
|
+
);
|
|
17285
17292
|
const settled = await Promise.allSettled(
|
|
17286
17293
|
facets.map(async (facet) => {
|
|
17287
17294
|
const prior = previous?.sections.find((s) => s.key === facet.key);
|
|
@@ -17342,7 +17349,7 @@ function computeVaultWatermark(memories) {
|
|
|
17342
17349
|
}
|
|
17343
17350
|
return max;
|
|
17344
17351
|
}
|
|
17345
|
-
async function computeStaleFacetKeys(ctx, memories, facets, previous, watermark) {
|
|
17352
|
+
async function computeStaleFacetKeys(ctx, memories, facets, previous, watermark, reviewedMemoryIds) {
|
|
17346
17353
|
const allKeys = new Set(facets.map((f) => f.key));
|
|
17347
17354
|
if (previous && watermark < previous.vaultWatermark) return allKeys;
|
|
17348
17355
|
if (!previous) return allKeys;
|
|
@@ -17365,9 +17372,13 @@ async function computeStaleFacetKeys(ctx, memories, facets, previous, watermark)
|
|
|
17365
17372
|
if (!previous.sections.some((s) => s.key === facet.key)) stale.add(facet.key);
|
|
17366
17373
|
}
|
|
17367
17374
|
const citedIds = new Set(previous.sections.flatMap((s) => s.sourceMemoryIds));
|
|
17368
|
-
|
|
17375
|
+
let toAttribute = changed.filter(
|
|
17369
17376
|
(m) => !m.isDeleted && !m.supersededBy && !citedIds.has(m.uniqueId)
|
|
17370
17377
|
);
|
|
17378
|
+
if (reviewedMemoryIds !== void 0) {
|
|
17379
|
+
const allowed = new Set(reviewedMemoryIds);
|
|
17380
|
+
toAttribute = toAttribute.filter((m) => allowed.has(m.uniqueId));
|
|
17381
|
+
}
|
|
17371
17382
|
if (toAttribute.length > 0) {
|
|
17372
17383
|
const attributed = await attributeFacts(ctx, toAttribute, facets);
|
|
17373
17384
|
if (attributed === null) return allKeys;
|
package/dist/expo/index.mjs
CHANGED
|
@@ -8237,7 +8237,14 @@ async function synthesizeProfile(ctx, options = {}) {
|
|
|
8237
8237
|
observationTrends
|
|
8238
8238
|
};
|
|
8239
8239
|
}
|
|
8240
|
-
const staleKeys = await computeStaleFacetKeys(
|
|
8240
|
+
const staleKeys = await computeStaleFacetKeys(
|
|
8241
|
+
ctx,
|
|
8242
|
+
memories,
|
|
8243
|
+
facets,
|
|
8244
|
+
previous,
|
|
8245
|
+
watermark,
|
|
8246
|
+
options.reviewedMemoryIds
|
|
8247
|
+
);
|
|
8241
8248
|
const settled = await Promise.allSettled(
|
|
8242
8249
|
facets.map(async (facet) => {
|
|
8243
8250
|
const prior = previous?.sections.find((s) => s.key === facet.key);
|
|
@@ -8298,7 +8305,7 @@ function computeVaultWatermark(memories) {
|
|
|
8298
8305
|
}
|
|
8299
8306
|
return max;
|
|
8300
8307
|
}
|
|
8301
|
-
async function computeStaleFacetKeys(ctx, memories, facets, previous, watermark) {
|
|
8308
|
+
async function computeStaleFacetKeys(ctx, memories, facets, previous, watermark, reviewedMemoryIds) {
|
|
8302
8309
|
const allKeys = new Set(facets.map((f) => f.key));
|
|
8303
8310
|
if (previous && watermark < previous.vaultWatermark) return allKeys;
|
|
8304
8311
|
if (!previous) return allKeys;
|
|
@@ -8321,9 +8328,13 @@ async function computeStaleFacetKeys(ctx, memories, facets, previous, watermark)
|
|
|
8321
8328
|
if (!previous.sections.some((s) => s.key === facet.key)) stale.add(facet.key);
|
|
8322
8329
|
}
|
|
8323
8330
|
const citedIds = new Set(previous.sections.flatMap((s) => s.sourceMemoryIds));
|
|
8324
|
-
|
|
8331
|
+
let toAttribute = changed.filter(
|
|
8325
8332
|
(m) => !m.isDeleted && !m.supersededBy && !citedIds.has(m.uniqueId)
|
|
8326
8333
|
);
|
|
8334
|
+
if (reviewedMemoryIds !== void 0) {
|
|
8335
|
+
const allowed = new Set(reviewedMemoryIds);
|
|
8336
|
+
toAttribute = toAttribute.filter((m) => allowed.has(m.uniqueId));
|
|
8337
|
+
}
|
|
8327
8338
|
if (toAttribute.length > 0) {
|
|
8328
8339
|
const attributed = await attributeFacts(ctx, toAttribute, facets);
|
|
8329
8340
|
if (attributed === null) return allKeys;
|
package/dist/react/index.cjs
CHANGED
|
@@ -18580,7 +18580,14 @@ async function synthesizeProfile(ctx, options = {}) {
|
|
|
18580
18580
|
observationTrends
|
|
18581
18581
|
};
|
|
18582
18582
|
}
|
|
18583
|
-
const staleKeys = await computeStaleFacetKeys(
|
|
18583
|
+
const staleKeys = await computeStaleFacetKeys(
|
|
18584
|
+
ctx,
|
|
18585
|
+
memories,
|
|
18586
|
+
facets,
|
|
18587
|
+
previous,
|
|
18588
|
+
watermark,
|
|
18589
|
+
options.reviewedMemoryIds
|
|
18590
|
+
);
|
|
18584
18591
|
const settled = await Promise.allSettled(
|
|
18585
18592
|
facets.map(async (facet) => {
|
|
18586
18593
|
const prior = previous?.sections.find((s) => s.key === facet.key);
|
|
@@ -18641,7 +18648,7 @@ function computeVaultWatermark(memories) {
|
|
|
18641
18648
|
}
|
|
18642
18649
|
return max;
|
|
18643
18650
|
}
|
|
18644
|
-
async function computeStaleFacetKeys(ctx, memories, facets, previous, watermark) {
|
|
18651
|
+
async function computeStaleFacetKeys(ctx, memories, facets, previous, watermark, reviewedMemoryIds) {
|
|
18645
18652
|
const allKeys = new Set(facets.map((f) => f.key));
|
|
18646
18653
|
if (previous && watermark < previous.vaultWatermark) return allKeys;
|
|
18647
18654
|
if (!previous) return allKeys;
|
|
@@ -18664,9 +18671,13 @@ async function computeStaleFacetKeys(ctx, memories, facets, previous, watermark)
|
|
|
18664
18671
|
if (!previous.sections.some((s) => s.key === facet.key)) stale.add(facet.key);
|
|
18665
18672
|
}
|
|
18666
18673
|
const citedIds = new Set(previous.sections.flatMap((s) => s.sourceMemoryIds));
|
|
18667
|
-
|
|
18674
|
+
let toAttribute = changed.filter(
|
|
18668
18675
|
(m) => !m.isDeleted && !m.supersededBy && !citedIds.has(m.uniqueId)
|
|
18669
18676
|
);
|
|
18677
|
+
if (reviewedMemoryIds !== void 0) {
|
|
18678
|
+
const allowed = new Set(reviewedMemoryIds);
|
|
18679
|
+
toAttribute = toAttribute.filter((m) => allowed.has(m.uniqueId));
|
|
18680
|
+
}
|
|
18670
18681
|
if (toAttribute.length > 0) {
|
|
18671
18682
|
const attributed = await attributeFacts(ctx, toAttribute, facets);
|
|
18672
18683
|
if (attributed === null) return allKeys;
|
package/dist/react/index.mjs
CHANGED
|
@@ -9054,7 +9054,14 @@ async function synthesizeProfile(ctx, options = {}) {
|
|
|
9054
9054
|
observationTrends
|
|
9055
9055
|
};
|
|
9056
9056
|
}
|
|
9057
|
-
const staleKeys = await computeStaleFacetKeys(
|
|
9057
|
+
const staleKeys = await computeStaleFacetKeys(
|
|
9058
|
+
ctx,
|
|
9059
|
+
memories,
|
|
9060
|
+
facets,
|
|
9061
|
+
previous,
|
|
9062
|
+
watermark,
|
|
9063
|
+
options.reviewedMemoryIds
|
|
9064
|
+
);
|
|
9058
9065
|
const settled = await Promise.allSettled(
|
|
9059
9066
|
facets.map(async (facet) => {
|
|
9060
9067
|
const prior = previous?.sections.find((s) => s.key === facet.key);
|
|
@@ -9115,7 +9122,7 @@ function computeVaultWatermark(memories) {
|
|
|
9115
9122
|
}
|
|
9116
9123
|
return max;
|
|
9117
9124
|
}
|
|
9118
|
-
async function computeStaleFacetKeys(ctx, memories, facets, previous, watermark) {
|
|
9125
|
+
async function computeStaleFacetKeys(ctx, memories, facets, previous, watermark, reviewedMemoryIds) {
|
|
9119
9126
|
const allKeys = new Set(facets.map((f) => f.key));
|
|
9120
9127
|
if (previous && watermark < previous.vaultWatermark) return allKeys;
|
|
9121
9128
|
if (!previous) return allKeys;
|
|
@@ -9138,9 +9145,13 @@ async function computeStaleFacetKeys(ctx, memories, facets, previous, watermark)
|
|
|
9138
9145
|
if (!previous.sections.some((s) => s.key === facet.key)) stale.add(facet.key);
|
|
9139
9146
|
}
|
|
9140
9147
|
const citedIds = new Set(previous.sections.flatMap((s) => s.sourceMemoryIds));
|
|
9141
|
-
|
|
9148
|
+
let toAttribute = changed.filter(
|
|
9142
9149
|
(m) => !m.isDeleted && !m.supersededBy && !citedIds.has(m.uniqueId)
|
|
9143
9150
|
);
|
|
9151
|
+
if (reviewedMemoryIds !== void 0) {
|
|
9152
|
+
const allowed = new Set(reviewedMemoryIds);
|
|
9153
|
+
toAttribute = toAttribute.filter((m) => allowed.has(m.uniqueId));
|
|
9154
|
+
}
|
|
9144
9155
|
if (toAttribute.length > 0) {
|
|
9145
9156
|
const attributed = await attributeFacts(ctx, toAttribute, facets);
|
|
9146
9157
|
if (attributed === null) return allKeys;
|
package/dist/server/index.cjs
CHANGED
|
@@ -30351,7 +30351,14 @@ async function synthesizeProfile(ctx, options = {}) {
|
|
|
30351
30351
|
observationTrends
|
|
30352
30352
|
};
|
|
30353
30353
|
}
|
|
30354
|
-
const staleKeys = await computeStaleFacetKeys(
|
|
30354
|
+
const staleKeys = await computeStaleFacetKeys(
|
|
30355
|
+
ctx,
|
|
30356
|
+
memories,
|
|
30357
|
+
facets,
|
|
30358
|
+
previous,
|
|
30359
|
+
watermark,
|
|
30360
|
+
options.reviewedMemoryIds
|
|
30361
|
+
);
|
|
30355
30362
|
const settled = await Promise.allSettled(
|
|
30356
30363
|
facets.map(async (facet) => {
|
|
30357
30364
|
const prior = previous?.sections.find((s) => s.key === facet.key);
|
|
@@ -30412,7 +30419,7 @@ function computeVaultWatermark(memories) {
|
|
|
30412
30419
|
}
|
|
30413
30420
|
return max;
|
|
30414
30421
|
}
|
|
30415
|
-
async function computeStaleFacetKeys(ctx, memories, facets, previous, watermark) {
|
|
30422
|
+
async function computeStaleFacetKeys(ctx, memories, facets, previous, watermark, reviewedMemoryIds) {
|
|
30416
30423
|
const allKeys = new Set(facets.map((f) => f.key));
|
|
30417
30424
|
if (previous && watermark < previous.vaultWatermark) return allKeys;
|
|
30418
30425
|
if (!previous) return allKeys;
|
|
@@ -30435,9 +30442,13 @@ async function computeStaleFacetKeys(ctx, memories, facets, previous, watermark)
|
|
|
30435
30442
|
if (!previous.sections.some((s) => s.key === facet.key)) stale.add(facet.key);
|
|
30436
30443
|
}
|
|
30437
30444
|
const citedIds = new Set(previous.sections.flatMap((s) => s.sourceMemoryIds));
|
|
30438
|
-
|
|
30445
|
+
let toAttribute = changed.filter(
|
|
30439
30446
|
(m) => !m.isDeleted && !m.supersededBy && !citedIds.has(m.uniqueId)
|
|
30440
30447
|
);
|
|
30448
|
+
if (reviewedMemoryIds !== void 0) {
|
|
30449
|
+
const allowed = new Set(reviewedMemoryIds);
|
|
30450
|
+
toAttribute = toAttribute.filter((m) => allowed.has(m.uniqueId));
|
|
30451
|
+
}
|
|
30441
30452
|
if (toAttribute.length > 0) {
|
|
30442
30453
|
const attributed = await attributeFacts(ctx, toAttribute, facets);
|
|
30443
30454
|
if (attributed === null) return allKeys;
|
package/dist/server/index.mjs
CHANGED
|
@@ -7061,7 +7061,14 @@ async function synthesizeProfile(ctx, options = {}) {
|
|
|
7061
7061
|
observationTrends
|
|
7062
7062
|
};
|
|
7063
7063
|
}
|
|
7064
|
-
const staleKeys = await computeStaleFacetKeys(
|
|
7064
|
+
const staleKeys = await computeStaleFacetKeys(
|
|
7065
|
+
ctx,
|
|
7066
|
+
memories,
|
|
7067
|
+
facets,
|
|
7068
|
+
previous,
|
|
7069
|
+
watermark,
|
|
7070
|
+
options.reviewedMemoryIds
|
|
7071
|
+
);
|
|
7065
7072
|
const settled = await Promise.allSettled(
|
|
7066
7073
|
facets.map(async (facet) => {
|
|
7067
7074
|
const prior = previous?.sections.find((s) => s.key === facet.key);
|
|
@@ -7122,7 +7129,7 @@ function computeVaultWatermark(memories) {
|
|
|
7122
7129
|
}
|
|
7123
7130
|
return max;
|
|
7124
7131
|
}
|
|
7125
|
-
async function computeStaleFacetKeys(ctx, memories, facets, previous, watermark) {
|
|
7132
|
+
async function computeStaleFacetKeys(ctx, memories, facets, previous, watermark, reviewedMemoryIds) {
|
|
7126
7133
|
const allKeys = new Set(facets.map((f) => f.key));
|
|
7127
7134
|
if (previous && watermark < previous.vaultWatermark) return allKeys;
|
|
7128
7135
|
if (!previous) return allKeys;
|
|
@@ -7145,9 +7152,13 @@ async function computeStaleFacetKeys(ctx, memories, facets, previous, watermark)
|
|
|
7145
7152
|
if (!previous.sections.some((s) => s.key === facet.key)) stale.add(facet.key);
|
|
7146
7153
|
}
|
|
7147
7154
|
const citedIds = new Set(previous.sections.flatMap((s) => s.sourceMemoryIds));
|
|
7148
|
-
|
|
7155
|
+
let toAttribute = changed.filter(
|
|
7149
7156
|
(m) => !m.isDeleted && !m.supersededBy && !citedIds.has(m.uniqueId)
|
|
7150
7157
|
);
|
|
7158
|
+
if (reviewedMemoryIds !== void 0) {
|
|
7159
|
+
const allowed = new Set(reviewedMemoryIds);
|
|
7160
|
+
toAttribute = toAttribute.filter((m) => allowed.has(m.uniqueId));
|
|
7161
|
+
}
|
|
7151
7162
|
if (toAttribute.length > 0) {
|
|
7152
7163
|
const attributed = await attributeFacts(ctx, toAttribute, facets);
|
|
7153
7164
|
if (attributed === null) return allKeys;
|