@mingxy/cerebro 1.18.18 → 1.18.19
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/package.json +1 -1
- package/src/index.ts +5 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mingxy/cerebro",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.19",
|
|
4
4
|
"description": "Cerebro persistent memory plugin for OpenCode — auto-recall, auto-capture, 9 memory tools with clustering, project-scoped memory isolation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.ts",
|
package/src/index.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { fileURLToPath } from "node:url";
|
|
|
6
6
|
import type { Server } from "node:http";
|
|
7
7
|
import { CerebroClient } from "./client.js";
|
|
8
8
|
import { chatMessageRecallHook, autocontinueHook, compactingHook, sessionIdleHook, showToast as hooksShowToast, sessionMessages, firstMessages } from "./hooks.js";
|
|
9
|
-
import { detectSaveKeyword, detectRecallKeyword
|
|
9
|
+
import { detectSaveKeyword, detectRecallKeyword } from "./keywords.js";
|
|
10
10
|
import { getUserTag, getProjectTag } from "./tags.js";
|
|
11
11
|
import { buildTools } from "./tools.js";
|
|
12
12
|
import { logInfo, logDebug, logError } from "./logger.js";
|
|
@@ -163,20 +163,12 @@ const OmemPlugin: Plugin = async (input) => {
|
|
|
163
163
|
firstMessages.set(input.sessionID, textContent);
|
|
164
164
|
}
|
|
165
165
|
if (detectSaveKeyword(textContent)) {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
text: KEYWORD_NUDGE,
|
|
169
|
-
synthetic: true,
|
|
170
|
-
} as any);
|
|
171
|
-
logDebug("keyword nudge pushed via parts.push", { sessionId: input.sessionID });
|
|
166
|
+
hooksShowToast(tui, "💡 Memory Save Detected", "Auto-capture will save this on session idle", "info");
|
|
167
|
+
logDebug("save keyword detected", { sessionId: input.sessionID });
|
|
172
168
|
}
|
|
173
169
|
if (detectRecallKeyword(textContent)) {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
text: RECALL_NUDGE,
|
|
177
|
-
synthetic: true,
|
|
178
|
-
} as any);
|
|
179
|
-
logDebug("recall nudge pushed via parts.push", { sessionId: input.sessionID });
|
|
170
|
+
hooksShowToast(tui, "🔍 Recall Detected", "Consider using memory_search for context", "info");
|
|
171
|
+
logDebug("recall keyword detected", { sessionId: input.sessionID });
|
|
180
172
|
}
|
|
181
173
|
const policy = resolveAgentPolicy(agentId, config);
|
|
182
174
|
if (policy !== "none") {
|