@mingxy/cerebro 1.8.2 → 1.8.3

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.8.2",
3
+ "version": "1.8.3",
4
4
  "description": "Cerebro persistent memory plugin for OpenCode — auto-recall, auto-capture, 9 memory tools with clustering",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
package/src/hooks.ts CHANGED
@@ -357,6 +357,7 @@ export function sessionIdleHook(
357
357
  threshold: number = 0,
358
358
  getMainSessionId?: () => string | undefined,
359
359
  isAutoStoreEnabled?: (sessionId: string | undefined) => boolean,
360
+ agentId?: string,
360
361
  ) {
361
362
  let idleTimeout: ReturnType<typeof setTimeout> | null = null;
362
363
  let isCapturing = false;
@@ -432,7 +433,7 @@ export function sessionIdleHook(
432
433
  }
433
434
 
434
435
  try {
435
- await omemClient.sessionIngest(conversationMessages, sessionID, undefined, sessionTitle, projectName);
436
+ await omemClient.sessionIngest(conversationMessages, sessionID, agentId, sessionTitle, projectName);
436
437
  for (const id of newMessageIds) {
437
438
  processedMessageIds.add(id);
438
439
  }
package/src/index.ts CHANGED
@@ -134,7 +134,7 @@ const OmemPlugin: Plugin = async (input) => {
134
134
  "chat.message": keywordDetectionHook(omemClient, containerTags, config.autoCaptureThreshold, tui, config.ingestMode),
135
135
  "experimental.session.compacting": compactingHook(omemClient, containerTags, tui, config.ingestMode, isAutoStoreEnabled),
136
136
  tool: buildTools(omemClient, containerTags, { agentId, getSessionId: () => currentSessionId }),
137
- event: sessionIdleHook(omemClient, containerTags, tui, client, config.ingestMode, config.autoCaptureThreshold, () => currentSessionId, isAutoStoreEnabled),
137
+ event: sessionIdleHook(omemClient, containerTags, tui, client, config.ingestMode, config.autoCaptureThreshold, () => currentSessionId, isAutoStoreEnabled, agentId),
138
138
  "shell.env": async (_input: any, output: any) => {
139
139
  if (directory) {
140
140
  output.env.OMEM_PROJECT_DIR = directory;