@edihasaj/recall 0.8.20 → 0.9.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.
- package/README.md +13 -0
- package/dist/{chunk-S7FJMV5O.js → chunk-3PPYB7BX.js} +8 -8
- package/dist/{chunk-ZBIJDXA7.js → chunk-4W4J7Z24.js} +17 -111
- package/dist/chunk-4W4J7Z24.js.map +1 -0
- package/dist/{chunk-O4KCMCJG.js → chunk-A27AP4NR.js} +21 -6
- package/dist/chunk-A27AP4NR.js.map +1 -0
- package/dist/{chunk-VT5VAEHY.js → chunk-CW3XJDH7.js} +2 -2
- package/dist/chunk-DWA2IO5N.js +105 -0
- package/dist/chunk-DWA2IO5N.js.map +1 -0
- package/dist/{chunk-M7OKBKKU.js → chunk-EAFRT7RX.js} +2 -2
- package/dist/{chunk-QKN6IWJ3.js → chunk-EZUMD27V.js} +68 -72
- package/dist/{chunk-QKN6IWJ3.js.map → chunk-EZUMD27V.js.map} +1 -1
- package/dist/{chunk-K6AFGQWR.js → chunk-FNQABJTM.js} +4 -4
- package/dist/{chunk-6I5U6KS3.js → chunk-G6YAXFT4.js} +70 -41
- package/dist/chunk-G6YAXFT4.js.map +1 -0
- package/dist/{chunk-LGTD5A4A.js → chunk-GE5BPNHC.js} +78 -16
- package/dist/chunk-GE5BPNHC.js.map +1 -0
- package/dist/{chunk-4CV4JOE5.js → chunk-JYWURG5T.js} +8 -3
- package/dist/{chunk-55KCGAOX.js → chunk-LUIYWYOT.js} +2 -2
- package/dist/{chunk-KG7YFARS.js → chunk-PQJRYAVG.js} +92 -14
- package/dist/chunk-PQJRYAVG.js.map +1 -0
- package/dist/{chunk-DNFKAHS6.js → chunk-VYZSP23L.js} +95 -12
- package/dist/chunk-VYZSP23L.js.map +1 -0
- package/dist/{chunk-NAYZL5XI.js → chunk-YDSCPOIJ.js} +4 -4
- package/dist/{cleanup-HWQCVPY4.js → cleanup-MBXKIGT6.js} +10 -9
- package/dist/cli.js +951 -161
- package/dist/cli.js.map +1 -1
- package/dist/daemon.js +113 -56
- package/dist/daemon.js.map +1 -1
- package/dist/dispatcher-YN6545TF.js +21 -0
- package/dist/{embeddings-LNMNKWB7.js → embeddings-E362AC3R.js} +5 -5
- package/dist/ingest-7FAOX7YV.js +18 -0
- package/dist/{keychain-5QG52ANO.js → keychain-PWFWKTZW.js} +3 -3
- package/dist/mcp.js +13 -12
- package/dist/mcp.js.map +1 -1
- package/dist/{memory-value-GH67CBQP.js → memory-value-ZLVZTE5M.js} +10 -9
- package/dist/quality-UUEBGSAQ.js +24 -0
- package/dist/retrieval-YU2PLBUS.js +13 -0
- package/dist/{store-OPRTGS73.js → store-5C7ZKKZF.js} +4 -4
- package/dist/sync-server.js +1 -1
- package/dist/{tasks-LOZ7XWON.js → tasks-AEKGKZZF.js} +10 -9
- package/dist/{usage-CAAACLUR.js → usage-VQ5LJCNH.js} +4 -4
- package/dist/webui/assets/{index-BODg2A9d.js → index-DAoAhOb4.js} +244 -244
- package/dist/webui/assets/{index-BODg2A9d.js.map → index-DAoAhOb4.js.map} +1 -1
- package/dist/webui/index.html +1 -1
- package/package.json +34 -2
- package/dist/chunk-6I5U6KS3.js.map +0 -1
- package/dist/chunk-DNFKAHS6.js.map +0 -1
- package/dist/chunk-KG7YFARS.js.map +0 -1
- package/dist/chunk-LGTD5A4A.js.map +0 -1
- package/dist/chunk-O4KCMCJG.js.map +0 -1
- package/dist/chunk-ZBIJDXA7.js.map +0 -1
- package/dist/dispatcher-RU25CZK3.js +0 -20
- package/dist/ingest-QSOE5XJZ.js +0 -18
- package/dist/quality-PZ36JND4.js +0 -23
- package/dist/retrieval-HIE5MASN.js +0 -13
- /package/dist/{chunk-S7FJMV5O.js.map → chunk-3PPYB7BX.js.map} +0 -0
- /package/dist/{chunk-VT5VAEHY.js.map → chunk-CW3XJDH7.js.map} +0 -0
- /package/dist/{chunk-M7OKBKKU.js.map → chunk-EAFRT7RX.js.map} +0 -0
- /package/dist/{chunk-K6AFGQWR.js.map → chunk-FNQABJTM.js.map} +0 -0
- /package/dist/{chunk-4CV4JOE5.js.map → chunk-JYWURG5T.js.map} +0 -0
- /package/dist/{chunk-55KCGAOX.js.map → chunk-LUIYWYOT.js.map} +0 -0
- /package/dist/{chunk-NAYZL5XI.js.map → chunk-YDSCPOIJ.js.map} +0 -0
- /package/dist/{cleanup-HWQCVPY4.js.map → cleanup-MBXKIGT6.js.map} +0 -0
- /package/dist/{dispatcher-RU25CZK3.js.map → dispatcher-YN6545TF.js.map} +0 -0
- /package/dist/{embeddings-LNMNKWB7.js.map → embeddings-E362AC3R.js.map} +0 -0
- /package/dist/{ingest-QSOE5XJZ.js.map → ingest-7FAOX7YV.js.map} +0 -0
- /package/dist/{keychain-5QG52ANO.js.map → keychain-PWFWKTZW.js.map} +0 -0
- /package/dist/{memory-value-GH67CBQP.js.map → memory-value-ZLVZTE5M.js.map} +0 -0
- /package/dist/{quality-PZ36JND4.js.map → quality-UUEBGSAQ.js.map} +0 -0
- /package/dist/{retrieval-HIE5MASN.js.map → retrieval-YU2PLBUS.js.map} +0 -0
- /package/dist/{store-OPRTGS73.js.map → store-5C7ZKKZF.js.map} +0 -0
- /package/dist/{tasks-LOZ7XWON.js.map → tasks-AEKGKZZF.js.map} +0 -0
- /package/dist/{usage-CAAACLUR.js.map → usage-VQ5LJCNH.js.map} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
computeMemoryValueReport
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4W4J7Z24.js";
|
|
4
4
|
import {
|
|
5
5
|
desc
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CW3XJDH7.js";
|
|
7
7
|
import {
|
|
8
8
|
and,
|
|
9
9
|
eq,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
memoryInjections,
|
|
15
15
|
qualitySnapshots,
|
|
16
16
|
sql
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-LUIYWYOT.js";
|
|
18
18
|
|
|
19
19
|
// src/maintenance/quality.ts
|
|
20
20
|
import { randomUUID } from "crypto";
|
|
@@ -180,4 +180,4 @@ export {
|
|
|
180
180
|
diffQualitySnapshots,
|
|
181
181
|
formatQualityReport
|
|
182
182
|
};
|
|
183
|
-
//# sourceMappingURL=chunk-
|
|
183
|
+
//# sourceMappingURL=chunk-FNQABJTM.js.map
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
matchTokens,
|
|
3
|
+
textMatchScore
|
|
4
|
+
} from "./chunk-DWA2IO5N.js";
|
|
1
5
|
import {
|
|
2
6
|
desc
|
|
3
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CW3XJDH7.js";
|
|
4
8
|
import {
|
|
5
9
|
appendEvidence,
|
|
6
10
|
countDistinctCorrectionSessions,
|
|
7
11
|
createMemory,
|
|
12
|
+
defineOwn,
|
|
8
13
|
demoteMemory,
|
|
9
14
|
getMemory,
|
|
10
15
|
getMemoryFeedback,
|
|
@@ -15,7 +20,7 @@ import {
|
|
|
15
20
|
promoteMemory,
|
|
16
21
|
queryMemories,
|
|
17
22
|
updateMemoryCaptureContext
|
|
18
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-A27AP4NR.js";
|
|
19
24
|
import {
|
|
20
25
|
CONFIDENCE,
|
|
21
26
|
LlmCredentialError,
|
|
@@ -24,11 +29,11 @@ import {
|
|
|
24
29
|
findSimilarRejectedExemplar,
|
|
25
30
|
loadEmbeddingConfigFromEnv,
|
|
26
31
|
queueMemoryEmbeddingSync
|
|
27
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-PQJRYAVG.js";
|
|
28
33
|
import {
|
|
29
34
|
hasProviderConfigured,
|
|
30
35
|
init_keychain
|
|
31
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-VYZSP23L.js";
|
|
32
37
|
import {
|
|
33
38
|
activityEvents,
|
|
34
39
|
and,
|
|
@@ -49,7 +54,7 @@ import {
|
|
|
49
54
|
memoryMaintenanceTasks,
|
|
50
55
|
or,
|
|
51
56
|
sql
|
|
52
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-LUIYWYOT.js";
|
|
53
58
|
|
|
54
59
|
// src/maintenance/tasks.ts
|
|
55
60
|
import { randomUUID as randomUUID5 } from "crypto";
|
|
@@ -720,8 +725,8 @@ function formatDispatchReport(report) {
|
|
|
720
725
|
import { createHash } from "crypto";
|
|
721
726
|
|
|
722
727
|
// src/capture/scope.ts
|
|
723
|
-
import {
|
|
724
|
-
import { dirname, extname, basename } from "path";
|
|
728
|
+
import { existsSync, readFileSync } from "fs";
|
|
729
|
+
import { dirname, extname, basename, join } from "path";
|
|
725
730
|
var SCOPE_MARKERS = [
|
|
726
731
|
{
|
|
727
732
|
pattern: /\b(in this file|this file only|just this file)\b/i,
|
|
@@ -868,17 +873,18 @@ function inferPathScope(filePath) {
|
|
|
868
873
|
return `${dir}/**`;
|
|
869
874
|
}
|
|
870
875
|
function hasSpecificFileReference(text) {
|
|
871
|
-
return /\b[\w-]+\.(ts|js|py|rs|go|swift|java|rb|tsx|jsx|vue|svelte)\b/.test(text) || /\b(src|lib|
|
|
876
|
+
return /\b[\w-]+\.(ts|js|py|rs|go|swift|java|rb|tsx|jsx|vue|svelte)\b/.test(text) || /\b(src|lib|components|utils|test|spec)\/[\w/.-]+/.test(text) || /\b(?:in|under|inside|path|file|directory|folder)\s+(?:the\s+)?app\/[\w/.-]+/i.test(text) || /`app\/[\w/.-]+`/.test(text);
|
|
872
877
|
}
|
|
873
878
|
function extractPathFromText(text) {
|
|
874
879
|
const pathMatch = text.match(
|
|
875
|
-
/\b((?:src|lib|
|
|
880
|
+
/\b((?:src|lib|components|utils|test|spec)\/[\w/.-]+)/
|
|
876
881
|
);
|
|
877
882
|
if (pathMatch) return `${pathMatch[1]}**`;
|
|
878
|
-
const
|
|
879
|
-
|
|
883
|
+
const explicitAppPath = text.match(
|
|
884
|
+
/(?:`(app\/[\w/.-]+)`|\b(?:in|under|inside|path|file|directory|folder)\s+(?:the\s+)?(app\/[\w/.-]+))/i
|
|
880
885
|
);
|
|
881
|
-
|
|
886
|
+
const appPath = explicitAppPath?.[1] ?? explicitAppPath?.[2];
|
|
887
|
+
if (appPath) return `${appPath}**`;
|
|
882
888
|
return null;
|
|
883
889
|
}
|
|
884
890
|
var SOURCE_AWARE_TOOLS = /* @__PURE__ */ new Set([
|
|
@@ -953,16 +959,17 @@ function inferFromAssistantTurn(assistantTurn) {
|
|
|
953
959
|
}
|
|
954
960
|
function inferFromGitOwnership(filePath, repoPath) {
|
|
955
961
|
try {
|
|
956
|
-
const
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
962
|
+
const candidates = [
|
|
963
|
+
join(repoPath, ".github", "CODEOWNERS"),
|
|
964
|
+
join(repoPath, "CODEOWNERS")
|
|
965
|
+
];
|
|
966
|
+
const codeownersPath = candidates.find((candidate) => existsSync(candidate));
|
|
967
|
+
const codeowners = codeownersPath ? readFileSync(codeownersPath, "utf-8").trim() : "";
|
|
960
968
|
if (codeowners) {
|
|
961
|
-
const dir = dirname(filePath);
|
|
962
969
|
for (const line of codeowners.split("\n")) {
|
|
963
970
|
if (line.startsWith("#") || !line.trim()) continue;
|
|
964
971
|
const parts = line.trim().split(/\s+/);
|
|
965
|
-
if (parts.length >= 2 && filePath.includes(parts[0].
|
|
972
|
+
if (parts.length >= 2 && filePath.includes(parts[0].replaceAll("*", ""))) {
|
|
966
973
|
return {
|
|
967
974
|
scope: "path",
|
|
968
975
|
path_scope: `${parts[0]}`,
|
|
@@ -1005,7 +1012,7 @@ function detectContradictions(db, repo) {
|
|
|
1005
1012
|
).get();
|
|
1006
1013
|
if (!existing) {
|
|
1007
1014
|
const id = randomUUID2();
|
|
1008
|
-
const
|
|
1015
|
+
const now2 = (/* @__PURE__ */ new Date()).toISOString();
|
|
1009
1016
|
db.insert(contradictions).values({
|
|
1010
1017
|
id,
|
|
1011
1018
|
memory_a_id: a.id,
|
|
@@ -1014,7 +1021,7 @@ function detectContradictions(db, repo) {
|
|
|
1014
1021
|
severity: contradiction.severity,
|
|
1015
1022
|
description: contradiction.description,
|
|
1016
1023
|
resolved: false,
|
|
1017
|
-
detected_at:
|
|
1024
|
+
detected_at: now2
|
|
1018
1025
|
}).run();
|
|
1019
1026
|
recordAudit(db, a.id, "contradiction_detected", "system", contradiction.description);
|
|
1020
1027
|
recordAudit(db, b.id, "contradiction_detected", "system", contradiction.description);
|
|
@@ -1027,13 +1034,27 @@ function detectContradictions(db, repo) {
|
|
|
1027
1034
|
description: contradiction.description,
|
|
1028
1035
|
resolved: false,
|
|
1029
1036
|
resolution: null,
|
|
1030
|
-
detected_at:
|
|
1037
|
+
detected_at: now2,
|
|
1031
1038
|
resolved_at: null
|
|
1032
1039
|
});
|
|
1033
1040
|
}
|
|
1034
1041
|
}
|
|
1035
1042
|
}
|
|
1036
1043
|
}
|
|
1044
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
1045
|
+
const unresolved = db.select().from(contradictions).where(eq(contradictions.resolved, false)).all();
|
|
1046
|
+
for (const row of unresolved) {
|
|
1047
|
+
const a = getMemory(db, row.memory_a_id);
|
|
1048
|
+
const b = getMemory(db, row.memory_b_id);
|
|
1049
|
+
if (repo && a?.repo !== repo && b?.repo !== repo) continue;
|
|
1050
|
+
const eligible = a && b && (a.status === "active" || a.status === "candidate") && (b.status === "active" || b.status === "candidate");
|
|
1051
|
+
if (eligible && checkContradiction(a, b)) continue;
|
|
1052
|
+
db.update(contradictions).set({
|
|
1053
|
+
resolved: true,
|
|
1054
|
+
resolution: "Auto-resolved: pair no longer satisfies contradiction rules",
|
|
1055
|
+
resolved_at: now
|
|
1056
|
+
}).where(eq(contradictions.id, row.id)).run();
|
|
1057
|
+
}
|
|
1037
1058
|
return found;
|
|
1038
1059
|
}
|
|
1039
1060
|
function checkContradiction(a, b) {
|
|
@@ -1081,15 +1102,15 @@ function checkDirectNegation(a, b) {
|
|
|
1081
1102
|
function checkConflictingRules(a, b) {
|
|
1082
1103
|
if (a.type !== b.type) return null;
|
|
1083
1104
|
if (a.type !== "rule" && a.type !== "command") return null;
|
|
1084
|
-
const useA = a.text
|
|
1085
|
-
const useB = b.text
|
|
1105
|
+
const useA = extractAffirmativeUseDirective(a.text);
|
|
1106
|
+
const useB = extractAffirmativeUseDirective(b.text);
|
|
1086
1107
|
if (useA && useB) {
|
|
1087
|
-
const toolA = useA
|
|
1088
|
-
const toolB = useB
|
|
1108
|
+
const toolA = useA.choice;
|
|
1109
|
+
const toolB = useB.choice;
|
|
1089
1110
|
if (toolA !== toolB) {
|
|
1090
|
-
const contextA =
|
|
1091
|
-
const contextB =
|
|
1092
|
-
if (contextA && contextB &&
|
|
1111
|
+
const contextA = useA.context;
|
|
1112
|
+
const contextB = useB.context;
|
|
1113
|
+
if (matchTokens(contextA).length >= 2 && matchTokens(contextB).length >= 2 && textMatchScore(contextA, contextB).score >= 0.72) {
|
|
1093
1114
|
return {
|
|
1094
1115
|
type: "conflicting_rules",
|
|
1095
1116
|
severity: "medium",
|
|
@@ -1098,14 +1119,6 @@ function checkConflictingRules(a, b) {
|
|
|
1098
1119
|
}
|
|
1099
1120
|
}
|
|
1100
1121
|
}
|
|
1101
|
-
const sim = wordOverlap(a.text, b.text);
|
|
1102
|
-
if (sim > 0.6 && sim < 0.95 && a.text !== b.text) {
|
|
1103
|
-
return {
|
|
1104
|
-
type: "scope_overlap",
|
|
1105
|
-
severity: "low",
|
|
1106
|
-
description: `Very similar memories (${(sim * 100).toFixed(0)}% overlap): "${a.text.slice(0, 50)}" vs "${b.text.slice(0, 50)}"`
|
|
1107
|
-
};
|
|
1108
|
-
}
|
|
1109
1122
|
return null;
|
|
1110
1123
|
}
|
|
1111
1124
|
function resolveContradiction(db, contradictionId, keepMemoryId, actor, resolution) {
|
|
@@ -1163,8 +1176,14 @@ function scopesOverlap(a, b) {
|
|
|
1163
1176
|
function extractSubject(text) {
|
|
1164
1177
|
return text.replace(/\b(always|never|must|do not|don't|use|do|run|call|import)\b/gi, "").trim().toLowerCase();
|
|
1165
1178
|
}
|
|
1166
|
-
function
|
|
1167
|
-
|
|
1179
|
+
function extractAffirmativeUseDirective(text) {
|
|
1180
|
+
const match = text.trim().match(
|
|
1181
|
+
/^(?:always\s+|prefer\s+)?use\s+([a-z0-9][\w.+-]*)\s+(?:for|when|on|as)\s+(.+)$/i
|
|
1182
|
+
);
|
|
1183
|
+
if (!match) return null;
|
|
1184
|
+
const choice = match[1].toLowerCase();
|
|
1185
|
+
if (["a", "an", "the", "this", "that", "it"].includes(choice)) return null;
|
|
1186
|
+
return { choice, context: match[2].trim().toLowerCase() };
|
|
1168
1187
|
}
|
|
1169
1188
|
function wordOverlap(a, b) {
|
|
1170
1189
|
const wordsA = new Set(a.toLowerCase().split(/\s+/).filter((w) => w.length > 2));
|
|
@@ -1579,6 +1598,16 @@ var VERB_HINTS = [
|
|
|
1579
1598
|
"receive",
|
|
1580
1599
|
"treat",
|
|
1581
1600
|
"propose",
|
|
1601
|
+
"capture",
|
|
1602
|
+
"record",
|
|
1603
|
+
"report",
|
|
1604
|
+
"preserve",
|
|
1605
|
+
"inspect",
|
|
1606
|
+
"challenge",
|
|
1607
|
+
"invoke",
|
|
1608
|
+
"dispatch",
|
|
1609
|
+
"rerun",
|
|
1610
|
+
"cancel",
|
|
1582
1611
|
"configure",
|
|
1583
1612
|
"enable",
|
|
1584
1613
|
"disable"
|
|
@@ -1609,7 +1638,7 @@ var ACTIVE_FRAGMENT_REASONS = /* @__PURE__ */ new Set([
|
|
|
1609
1638
|
"e2e_verification_artifact",
|
|
1610
1639
|
"embedded_question"
|
|
1611
1640
|
]);
|
|
1612
|
-
var MAX_RULE_LENGTH =
|
|
1641
|
+
var MAX_RULE_LENGTH = 500;
|
|
1613
1642
|
var MIN_RULE_LENGTH = 20;
|
|
1614
1643
|
function planRejectFragments(db) {
|
|
1615
1644
|
const rows = db.select({
|
|
@@ -2241,7 +2270,7 @@ function redactSensitiveValue(value) {
|
|
|
2241
2270
|
if (!value || typeof value !== "object") return value;
|
|
2242
2271
|
const out = {};
|
|
2243
2272
|
for (const [key, entry] of Object.entries(value)) {
|
|
2244
|
-
out
|
|
2273
|
+
defineOwn(out, key, redactSensitiveValue(entry));
|
|
2245
2274
|
}
|
|
2246
2275
|
return out;
|
|
2247
2276
|
}
|
|
@@ -3856,4 +3885,4 @@ export {
|
|
|
3856
3885
|
processCorrection,
|
|
3857
3886
|
processReviewFeedback
|
|
3858
3887
|
};
|
|
3859
|
-
//# sourceMappingURL=chunk-
|
|
3888
|
+
//# sourceMappingURL=chunk-G6YAXFT4.js.map
|