@mingxy/cerebro 1.10.1 → 1.10.2

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/hooks.ts +7 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mingxy/cerebro",
3
- "version": "1.10.1",
3
+ "version": "1.10.2",
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
@@ -432,9 +432,9 @@ export function compactingHook(client: OmemClient, containerTags: string[], tui:
432
432
  if (sdkClient && input.sessionID) {
433
433
  const sessionInfo = await sdkClient.session.get({ path: { id: input.sessionID } });
434
434
  logDebug("compactingHook sessionInfo", { sessionInfo: JSON.stringify(sessionInfo) });
435
- logDebug("compactingHook project.rootPath", { rootPath: sessionInfo?.project?.rootPath });
436
- projectName = sessionInfo?.project?.rootPath
437
- ? await detectProjectName(sessionInfo.project.rootPath)
435
+ logDebug("compactingHook project.rootPath", { rootPath: sessionInfo?.data?.directory });
436
+ projectName = sessionInfo?.data?.directory
437
+ ? await detectProjectName(sessionInfo.data.directory)
438
438
  : undefined;
439
439
  logDebug("compactingHook projectName", { projectName: String(projectName) });
440
440
  }
@@ -557,10 +557,10 @@ export function sessionIdleHook(
557
557
  try {
558
558
  const sessionInfo = await sdkClient.session.get({ path: { id: sessionID } });
559
559
  logDebug("sessionIdleHook sessionInfo", { sessionInfo: JSON.stringify(sessionInfo) });
560
- logDebug("sessionIdleHook project.rootPath", { rootPath: sessionInfo?.project?.rootPath });
561
- sessionTitle = sessionInfo?.title;
562
- projectName = sessionInfo?.project?.rootPath
563
- ? await detectProjectName(sessionInfo.project.rootPath)
560
+ logDebug("sessionIdleHook project.rootPath", { rootPath: sessionInfo?.data?.directory });
561
+ sessionTitle = sessionInfo?.data?.title;
562
+ projectName = sessionInfo?.data?.directory
563
+ ? await detectProjectName(sessionInfo.data.directory)
564
564
  : undefined;
565
565
  logDebug("sessionIdleHook projectName", { projectName: String(projectName) });
566
566
  } catch (e) {