@edihasaj/recall 1.0.11 → 1.2.0
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-3IF7HONQ.js → chunk-5FY3HYGU.js} +73 -18
- package/dist/chunk-5FY3HYGU.js.map +1 -0
- package/dist/{chunk-WD55NWCC.js → chunk-B6KSSZUW.js} +8 -1
- package/dist/chunk-B6KSSZUW.js.map +1 -0
- package/dist/{chunk-6B5OQLIE.js → chunk-G44JMYVI.js} +36 -9
- package/dist/chunk-G44JMYVI.js.map +1 -0
- package/dist/{chunk-TYXRTMDK.js → chunk-JP5YAQPQ.js} +2 -2
- package/dist/{chunk-WVVH7AVR.js → chunk-NFCBG4OH.js} +6 -6
- package/dist/{chunk-LYTIYKXH.js → chunk-T5FOKQH2.js} +2 -2
- package/dist/{chunk-PGTHECO2.js → chunk-TUC6GU35.js} +2 -2
- package/dist/{chunk-D57YOEJH.js → chunk-UUCSHXES.js} +26 -18
- package/dist/{chunk-D57YOEJH.js.map → chunk-UUCSHXES.js.map} +1 -1
- package/dist/{cleanup-MDEYU6TC.js → cleanup-PT3VB3CG.js} +3 -3
- package/dist/cli.js +125 -42
- package/dist/cli.js.map +1 -1
- package/dist/daemon.js +28 -13
- package/dist/daemon.js.map +1 -1
- package/dist/{dispatcher-PNYGUIKO.js → dispatcher-2Q6LY57F.js} +3 -3
- package/dist/{ingest-NX53XWCU.js → ingest-ERAUAPMC.js} +2 -2
- package/dist/mcp.js +6 -6
- package/dist/{memory-value-LISBUR2V.js → memory-value-2NDAQNMS.js} +3 -3
- package/dist/{quality-TM5E6JCK.js → quality-WFWVU4FQ.js} +4 -4
- package/dist/{retrieval-63A775WR.js → retrieval-JOC63UXZ.js} +3 -3
- package/dist/{tasks-RR4E4JAG.js → tasks-ANFQXOYX.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-3IF7HONQ.js.map +0 -1
- package/dist/chunk-6B5OQLIE.js.map +0 -1
- package/dist/chunk-WD55NWCC.js.map +0 -1
- /package/dist/{chunk-TYXRTMDK.js.map → chunk-JP5YAQPQ.js.map} +0 -0
- /package/dist/{chunk-WVVH7AVR.js.map → chunk-NFCBG4OH.js.map} +0 -0
- /package/dist/{chunk-LYTIYKXH.js.map → chunk-T5FOKQH2.js.map} +0 -0
- /package/dist/{chunk-PGTHECO2.js.map → chunk-TUC6GU35.js.map} +0 -0
- /package/dist/{cleanup-MDEYU6TC.js.map → cleanup-PT3VB3CG.js.map} +0 -0
- /package/dist/{dispatcher-PNYGUIKO.js.map → dispatcher-2Q6LY57F.js.map} +0 -0
- /package/dist/{ingest-NX53XWCU.js.map → ingest-ERAUAPMC.js.map} +0 -0
- /package/dist/{memory-value-LISBUR2V.js.map → memory-value-2NDAQNMS.js.map} +0 -0
- /package/dist/{quality-TM5E6JCK.js.map → quality-WFWVU4FQ.js.map} +0 -0
- /package/dist/{retrieval-63A775WR.js.map → retrieval-JOC63UXZ.js.map} +0 -0
- /package/dist/{tasks-RR4E4JAG.js.map → tasks-ANFQXOYX.js.map} +0 -0
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
recordAudit,
|
|
7
7
|
redactSensitiveValue,
|
|
8
8
|
seedScannedConfidence
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5FY3HYGU.js";
|
|
10
10
|
import {
|
|
11
11
|
recordInjectionValueEvents,
|
|
12
12
|
recordMemoryInjections,
|
|
13
13
|
recordOutcomeValueEvent,
|
|
14
14
|
resolveMemoryInjectionOutcome
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-JP5YAQPQ.js";
|
|
16
16
|
import {
|
|
17
17
|
textMatchScore
|
|
18
18
|
} from "./chunk-FHEH6QDU.js";
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
recordFeedback,
|
|
35
35
|
rejectMemory,
|
|
36
36
|
statusFromConfidence
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-B6KSSZUW.js";
|
|
38
38
|
import {
|
|
39
39
|
BACKGROUND_INDEX_BATCH_SIZE,
|
|
40
40
|
CONFIDENCE,
|
|
@@ -5085,9 +5085,12 @@ async function compileContextHybrid(db, req) {
|
|
|
5085
5085
|
const selectedHistory = effectiveQuery ? await selectRelevantHistory(db, req.repo, effectiveQuery, config.max_history_snippets) : selectRepoHistory(db, req.repo, config.max_history_snippets);
|
|
5086
5086
|
const repoMemories = queryMemories(db, { repo: req.repo });
|
|
5087
5087
|
const globalMemories = queryMemories(db, { scope: "global" });
|
|
5088
|
-
const allMemories = dedupeById([...repoMemories, ...globalMemories]).filter(
|
|
5089
|
-
|
|
5090
|
-
|
|
5088
|
+
const allMemories = dedupeById([...repoMemories, ...globalMemories]).filter((memory) => {
|
|
5089
|
+
const statusEligible = memory.status === "active" || config.include_candidates && memory.status === "candidate";
|
|
5090
|
+
if (!statusEligible) return false;
|
|
5091
|
+
if (memory.auto_inject) return true;
|
|
5092
|
+
return Boolean(effectiveQuery) && memory.status === "active";
|
|
5093
|
+
});
|
|
5091
5094
|
const scoped = req.path ? allMemories.filter((memory) => pathMatches(memory, req.path)) : allMemories;
|
|
5092
5095
|
const candidateConfidenceFloor = Math.min(config.confidence_threshold, 0.45);
|
|
5093
5096
|
const passing = scoped.filter((memory) => {
|
|
@@ -6364,7 +6367,7 @@ function pruneMemories(db, config = {}) {
|
|
|
6364
6367
|
const now2 = Date.now();
|
|
6365
6368
|
const dayMs = 864e5;
|
|
6366
6369
|
const result = {
|
|
6367
|
-
|
|
6370
|
+
stale_archived: [],
|
|
6368
6371
|
rejected_pruned: [],
|
|
6369
6372
|
transient_pruned: [],
|
|
6370
6373
|
unhealthy_demoted: [],
|
|
@@ -6377,13 +6380,18 @@ function pruneMemories(db, config = {}) {
|
|
|
6377
6380
|
}).filter((mem) => mem.status !== "rejected" && mem.status !== "transient");
|
|
6378
6381
|
for (const mem of staleCandidates) {
|
|
6379
6382
|
const lastActivity = mem.last_validated_at ?? mem.last_injected_at ?? mem.updated_at;
|
|
6380
|
-
if (lastActivity < staleCutoff) {
|
|
6383
|
+
if (lastActivity < staleCutoff && mem.auto_inject) {
|
|
6381
6384
|
if (!cfg.dry_run) {
|
|
6382
|
-
db.update(memories).set({
|
|
6383
|
-
|
|
6384
|
-
|
|
6385
|
+
db.update(memories).set({ auto_inject: false, updated_at: (/* @__PURE__ */ new Date()).toISOString() }).where(eq(memories.id, mem.id)).run();
|
|
6386
|
+
recordAudit(
|
|
6387
|
+
db,
|
|
6388
|
+
mem.id,
|
|
6389
|
+
"demoted",
|
|
6390
|
+
"auto-pruner",
|
|
6391
|
+
`Archived from auto-injection: no activity since ${lastActivity}`
|
|
6392
|
+
);
|
|
6385
6393
|
}
|
|
6386
|
-
result.
|
|
6394
|
+
result.stale_archived.push(mem.id);
|
|
6387
6395
|
}
|
|
6388
6396
|
}
|
|
6389
6397
|
const rejectedCutoff = new Date(
|
|
@@ -6441,7 +6449,7 @@ function pruneMemories(db, config = {}) {
|
|
|
6441
6449
|
result.unhealthy_demoted.push(mem.id);
|
|
6442
6450
|
}
|
|
6443
6451
|
}
|
|
6444
|
-
result.total = result.
|
|
6452
|
+
result.total = result.stale_archived.length + result.rejected_pruned.length + result.transient_pruned.length + result.unhealthy_demoted.length;
|
|
6445
6453
|
return result;
|
|
6446
6454
|
}
|
|
6447
6455
|
function deleteMemoryAndDependents(db, memoryId) {
|
|
@@ -6462,15 +6470,15 @@ function formatPruneReport(result, dryRun) {
|
|
|
6462
6470
|
const lines = [
|
|
6463
6471
|
`${prefix}Prune Report`,
|
|
6464
6472
|
``,
|
|
6465
|
-
`Stale
|
|
6473
|
+
`Stale archived: ${result.stale_archived.length}`,
|
|
6466
6474
|
`Rejected pruned: ${result.rejected_pruned.length}`,
|
|
6467
6475
|
`Transient pruned: ${result.transient_pruned.length}`,
|
|
6468
6476
|
`Unhealthy demoted: ${result.unhealthy_demoted.length}`,
|
|
6469
6477
|
`Total affected: ${result.total}`
|
|
6470
6478
|
];
|
|
6471
|
-
if (result.
|
|
6472
|
-
lines.push("", "Stale
|
|
6473
|
-
for (const id of result.
|
|
6479
|
+
if (result.stale_archived.length > 0) {
|
|
6480
|
+
lines.push("", "Stale Archived (no longer auto-injected):");
|
|
6481
|
+
for (const id of result.stale_archived.slice(0, 10)) {
|
|
6474
6482
|
lines.push(` ${id.slice(0, 8)}`);
|
|
6475
6483
|
}
|
|
6476
6484
|
}
|
|
@@ -6648,4 +6656,4 @@ export {
|
|
|
6648
6656
|
pruneMemories,
|
|
6649
6657
|
formatPruneReport
|
|
6650
6658
|
};
|
|
6651
|
-
//# sourceMappingURL=chunk-
|
|
6659
|
+
//# sourceMappingURL=chunk-UUCSHXES.js.map
|