@edihasaj/recall 1.0.1 → 1.0.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/dist/{chunk-VHW3L7OR.js → chunk-BC2W2GIP.js} +20 -3
- package/dist/{chunk-VHW3L7OR.js.map → chunk-BC2W2GIP.js.map} +1 -1
- package/dist/{chunk-U7KQCPL5.js → chunk-SW6G733A.js} +2 -2
- package/dist/{chunk-QQ65JR35.js → chunk-WKMU44R4.js} +2 -2
- package/dist/cli.js +2 -2
- package/dist/daemon.js +3 -3
- package/dist/mcp.js +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-U7KQCPL5.js.map → chunk-SW6G733A.js.map} +0 -0
- /package/dist/{chunk-QQ65JR35.js.map → chunk-WKMU44R4.js.map} +0 -0
|
@@ -71,6 +71,7 @@ import {
|
|
|
71
71
|
approvalRequests,
|
|
72
72
|
auditTrail,
|
|
73
73
|
between,
|
|
74
|
+
contradictions,
|
|
74
75
|
entityKind,
|
|
75
76
|
eq,
|
|
76
77
|
evalSessions,
|
|
@@ -100,6 +101,7 @@ import {
|
|
|
100
101
|
mapResultRow,
|
|
101
102
|
mapUpdateSet,
|
|
102
103
|
memories,
|
|
104
|
+
memoryEntities,
|
|
103
105
|
memoryMaintenanceTasks,
|
|
104
106
|
memoryValueEvents,
|
|
105
107
|
ne,
|
|
@@ -6373,7 +6375,8 @@ function pruneMemories(db, config = {}) {
|
|
|
6373
6375
|
for (const mem of rejectedMemories) {
|
|
6374
6376
|
if (mem.updated_at < rejectedCutoff) {
|
|
6375
6377
|
if (!cfg.dry_run) {
|
|
6376
|
-
db
|
|
6378
|
+
deleteMemoryAndDependents(db, mem.id);
|
|
6379
|
+
queueMemoryEmbeddingSync(db, mem.id);
|
|
6377
6380
|
recordAudit(db, mem.id, "pruned", "auto-pruner", `Rejected memory past ${cfg.rejected_retention_days}d retention`);
|
|
6378
6381
|
}
|
|
6379
6382
|
result.rejected_pruned.push(mem.id);
|
|
@@ -6389,7 +6392,8 @@ function pruneMemories(db, config = {}) {
|
|
|
6389
6392
|
for (const mem of transientMemories) {
|
|
6390
6393
|
if (mem.updated_at < transientCutoff) {
|
|
6391
6394
|
if (!cfg.dry_run) {
|
|
6392
|
-
db
|
|
6395
|
+
deleteMemoryAndDependents(db, mem.id);
|
|
6396
|
+
queueMemoryEmbeddingSync(db, mem.id);
|
|
6393
6397
|
recordAudit(db, mem.id, "pruned", "auto-pruner", `Transient memory past ${cfg.transient_retention_days}d retention`);
|
|
6394
6398
|
}
|
|
6395
6399
|
result.transient_pruned.push(mem.id);
|
|
@@ -6419,6 +6423,19 @@ function pruneMemories(db, config = {}) {
|
|
|
6419
6423
|
result.total = result.stale_rejected.length + result.rejected_pruned.length + result.transient_pruned.length + result.unhealthy_demoted.length;
|
|
6420
6424
|
return result;
|
|
6421
6425
|
}
|
|
6426
|
+
function deleteMemoryAndDependents(db, memoryId) {
|
|
6427
|
+
db.transaction((tx) => {
|
|
6428
|
+
tx.delete(feedbackEvents).where(eq(feedbackEvents.memory_id, memoryId)).run();
|
|
6429
|
+
tx.delete(approvalRequests).where(eq(approvalRequests.memory_id, memoryId)).run();
|
|
6430
|
+
tx.delete(contradictions).where(or(
|
|
6431
|
+
eq(contradictions.memory_a_id, memoryId),
|
|
6432
|
+
eq(contradictions.memory_b_id, memoryId)
|
|
6433
|
+
)).run();
|
|
6434
|
+
tx.delete(implicitSignals).where(eq(implicitSignals.memory_id, memoryId)).run();
|
|
6435
|
+
tx.delete(memoryEntities).where(eq(memoryEntities.memory_id, memoryId)).run();
|
|
6436
|
+
tx.delete(memories).where(eq(memories.id, memoryId)).run();
|
|
6437
|
+
});
|
|
6438
|
+
}
|
|
6422
6439
|
function formatPruneReport(result, dryRun) {
|
|
6423
6440
|
const prefix = dryRun ? "[DRY RUN] " : "";
|
|
6424
6441
|
const lines = [
|
|
@@ -6610,4 +6627,4 @@ export {
|
|
|
6610
6627
|
pruneMemories,
|
|
6611
6628
|
formatPruneReport
|
|
6612
6629
|
};
|
|
6613
|
-
//# sourceMappingURL=chunk-
|
|
6630
|
+
//# sourceMappingURL=chunk-BC2W2GIP.js.map
|