@edihasaj/recall 0.8.0 → 0.8.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/dist/{chunk-I5TTXHOM.js → chunk-G7YTYVRH.js} +2 -2
- package/dist/{chunk-2G5DMOVA.js → chunk-MCR3OGUV.js} +11 -6
- package/dist/chunk-MCR3OGUV.js.map +1 -0
- package/dist/{chunk-OLZS3M24.js → chunk-MT552653.js} +2 -2
- package/dist/cli.js +21 -8
- package/dist/cli.js.map +1 -1
- package/dist/daemon.js +3 -3
- package/dist/mcp.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-2G5DMOVA.js.map +0 -1
- /package/dist/{chunk-I5TTXHOM.js.map → chunk-G7YTYVRH.js.map} +0 -0
- /package/dist/{chunk-OLZS3M24.js.map → chunk-MT552653.js.map} +0 -0
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
signalOutcomeFallback,
|
|
16
16
|
startSessionLifecycle,
|
|
17
17
|
toolCallTouchesMemory
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-MCR3OGUV.js";
|
|
19
19
|
import {
|
|
20
20
|
detectCorrections,
|
|
21
21
|
isHighRiskRule,
|
|
@@ -987,4 +987,4 @@ export {
|
|
|
987
987
|
readCodexSessionEndInputFromStdin,
|
|
988
988
|
dispatchCodexNotify
|
|
989
989
|
};
|
|
990
|
-
//# sourceMappingURL=chunk-
|
|
990
|
+
//# sourceMappingURL=chunk-MT552653.js.map
|
package/dist/cli.js
CHANGED
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
readCodexSessionStartInputFromStdin,
|
|
23
23
|
readCodexToolInputFromStdin,
|
|
24
24
|
restoreBackup
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-MT552653.js";
|
|
26
26
|
import {
|
|
27
27
|
RECALL_DB_USER_VERSION,
|
|
28
28
|
compileContext,
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
startEvalSession,
|
|
62
62
|
togglePolicy,
|
|
63
63
|
writeRepoContextArtifact
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-MCR3OGUV.js";
|
|
65
65
|
import {
|
|
66
66
|
autoResolveContradictions,
|
|
67
67
|
computeAllHealthScores,
|
|
@@ -167,6 +167,7 @@ function tokenOverlap(query, text) {
|
|
|
167
167
|
return hits / q.size;
|
|
168
168
|
}
|
|
169
169
|
function makeRecallBackend(db) {
|
|
170
|
+
const umpSessionId = `ump:${process.pid}:${Date.now().toString(36)}`;
|
|
170
171
|
return {
|
|
171
172
|
queryMemories: (f) => queryMemories(db, { repo: f.repo }).map(toRecallMemory),
|
|
172
173
|
getMemory: (id) => {
|
|
@@ -224,9 +225,13 @@ function makeRecallBackend(db) {
|
|
|
224
225
|
tombstone: (id) => rejectMemory(db, id),
|
|
225
226
|
capture: async ({ text, repo, path }) => {
|
|
226
227
|
const res = await processCorrection(db, text, {
|
|
227
|
-
|
|
228
|
+
// Unique per server process: a constant "ump" session id made
|
|
229
|
+
// stablePromptId() dedupe identical rule text forever, so a rule
|
|
230
|
+
// re-sent in a later UMP session was silently never re-extracted.
|
|
231
|
+
sessionId: umpSessionId,
|
|
228
232
|
repo,
|
|
229
|
-
path
|
|
233
|
+
path,
|
|
234
|
+
agent: "ump"
|
|
230
235
|
});
|
|
231
236
|
return { ids: res.ids ?? [] };
|
|
232
237
|
}
|
|
@@ -1057,6 +1062,13 @@ function buildCodexManagedGroups(options) {
|
|
|
1057
1062
|
}
|
|
1058
1063
|
];
|
|
1059
1064
|
}
|
|
1065
|
+
if (installedEvents.size === 0 || installedEvents.has("session_ended")) {
|
|
1066
|
+
groups.Stop = [
|
|
1067
|
+
{
|
|
1068
|
+
hooks: [commandHook2(`${commandPrefix} hook session-end --agent codex --codex-stdin`, "session-end")]
|
|
1069
|
+
}
|
|
1070
|
+
];
|
|
1071
|
+
}
|
|
1060
1072
|
return groups;
|
|
1061
1073
|
}
|
|
1062
1074
|
function commandHook2(command, tag) {
|
|
@@ -1113,9 +1125,10 @@ function isCodexManagedGroup(group) {
|
|
|
1113
1125
|
function cloneCodexHooks(file) {
|
|
1114
1126
|
return JSON.parse(JSON.stringify(file));
|
|
1115
1127
|
}
|
|
1128
|
+
var CODEX_HOOKS_FLAG_PATTERN = /^\s*(?:codex_)?hooks\s*=\s*true\b/m;
|
|
1116
1129
|
function ensureCodexHooksFeatureFlag(targetConfigPath) {
|
|
1117
1130
|
const existing = existsSync2(targetConfigPath) ? readFileSync2(targetConfigPath, "utf-8") : "";
|
|
1118
|
-
if (
|
|
1131
|
+
if (CODEX_HOOKS_FLAG_PATTERN.test(existing)) {
|
|
1119
1132
|
return { ok: true, changed: false, config_path: targetConfigPath, message: "" };
|
|
1120
1133
|
}
|
|
1121
1134
|
const featureHeader = /^\[features\]\s*$/m;
|
|
@@ -1142,7 +1155,7 @@ function removeCodexHooksFeatureFlag(targetConfigPath) {
|
|
|
1142
1155
|
}
|
|
1143
1156
|
const existing = readFileSync2(targetConfigPath, "utf-8");
|
|
1144
1157
|
const managedLine = new RegExp(
|
|
1145
|
-
`^\\s*
|
|
1158
|
+
`^\\s*(?:codex_)?hooks\\s*=\\s*true\\s*${escapeRegExp(MANAGED_FEATURE_FLAG)}\\s*$\\n?`,
|
|
1146
1159
|
"m"
|
|
1147
1160
|
);
|
|
1148
1161
|
if (!managedLine.test(existing)) {
|
|
@@ -2140,7 +2153,7 @@ function inspectCodexInstall(home) {
|
|
|
2140
2153
|
if (existsSync6(configPath3)) {
|
|
2141
2154
|
const raw = readFileSync4(configPath3, "utf-8");
|
|
2142
2155
|
mcp = /\[mcp_servers\.recall\]/.test(raw);
|
|
2143
|
-
const featureFlagSet = /^\s*
|
|
2156
|
+
const featureFlagSet = /^\s*(?:codex_)?hooks\s*=\s*true\b/m.test(raw);
|
|
2144
2157
|
const managedHooksJson = existsSync6(hooksPath) && readFileSync4(hooksPath, "utf-8").includes("recall:managed:codex");
|
|
2145
2158
|
hooks = featureFlagSet && managedHooksJson;
|
|
2146
2159
|
legacy_notify_bridge = raw.includes("# recall:managed:codex:start") && raw.includes("codex-notify");
|
|
@@ -2150,7 +2163,7 @@ function inspectCodexInstall(home) {
|
|
|
2150
2163
|
"Legacy notify bridge present \u2014 install the new hooks.json path to enable per-turn memory injection"
|
|
2151
2164
|
);
|
|
2152
2165
|
}
|
|
2153
|
-
if (!featureFlagSet) notes.push("codex_hooks = true missing from [features]");
|
|
2166
|
+
if (!featureFlagSet) notes.push("hooks = true (or legacy codex_hooks = true) missing from [features]");
|
|
2154
2167
|
if (!managedHooksJson) notes.push("No Recall-managed entries in ~/.codex/hooks.json");
|
|
2155
2168
|
} else if (detected) {
|
|
2156
2169
|
notes.push("Codex CLI detected but config.toml missing");
|