@mingxy/cerebro 1.18.18 → 1.18.20

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mingxy/cerebro",
3
- "version": "1.18.18",
3
+ "version": "1.18.20",
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/hooks.ts CHANGED
@@ -342,6 +342,9 @@ export function chatMessageRecallHook(
342
342
  injectedSessions.add(input.sessionID);
343
343
 
344
344
  output.parts.unshift({
345
+ id: `prt_cerebro-inject-${Date.now()}`,
346
+ sessionID: input.sessionID,
347
+ messageID: output.message?.id,
345
348
  type: "text",
346
349
  text: injection.text,
347
350
  synthetic: true,
package/src/index.ts CHANGED
@@ -164,19 +164,25 @@ const OmemPlugin: Plugin = async (input) => {
164
164
  }
165
165
  if (detectSaveKeyword(textContent)) {
166
166
  output.parts.push({
167
+ id: `prt_cerebro-save-${Date.now()}`,
168
+ sessionID: input.sessionID,
169
+ messageID: output.message?.id,
167
170
  type: "text",
168
171
  text: KEYWORD_NUDGE,
169
172
  synthetic: true,
170
173
  } as any);
171
- logDebug("keyword nudge pushed via parts.push", { sessionId: input.sessionID });
174
+ logDebug("save keyword detected, nudge pushed", { sessionId: input.sessionID });
172
175
  }
173
176
  if (detectRecallKeyword(textContent)) {
174
177
  output.parts.push({
178
+ id: `prt_cerebro-recall-${Date.now()}`,
179
+ sessionID: input.sessionID,
180
+ messageID: output.message?.id,
175
181
  type: "text",
176
182
  text: RECALL_NUDGE,
177
183
  synthetic: true,
178
184
  } as any);
179
- logDebug("recall nudge pushed via parts.push", { sessionId: input.sessionID });
185
+ logDebug("recall keyword detected, nudge pushed", { sessionId: input.sessionID });
180
186
  }
181
187
  const policy = resolveAgentPolicy(agentId, config);
182
188
  if (policy !== "none") {