@mingxy/cerebro 1.18.15 → 1.18.16

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 +2 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mingxy/cerebro",
3
- "version": "1.18.15",
3
+ "version": "1.18.16",
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
@@ -478,8 +478,7 @@ export function autoRecallHook(client: CerebroClient, containerTags: string[], t
478
478
  };
479
479
 
480
480
  if (!shouldRecallRes.should_recall) {
481
- // 兜底:即使不召回记忆,只要有 profile 就注入(与 recall 路径对齐)
482
- if (profileBlock) {
481
+ if (profileTtlExpired && profileBlock) {
483
482
  appendToSystem(output.system, profileBlock);
484
483
  logDebug("autoRecallHook profile injected (no-recall path)", { sessionId: input.sessionID, outputSystemLength: output.system.length });
485
484
 
@@ -523,7 +522,7 @@ export function autoRecallHook(client: CerebroClient, containerTags: string[], t
523
522
  logDebug("autoRecallHook block was EMPTY — no injection", { sessionId: input.sessionID });
524
523
  }
525
524
 
526
- if (profileBlock) {
525
+ if (profileTtlExpired && profileBlock) {
527
526
  appendToSystem(output.system, profileBlock);
528
527
  logDebug("autoRecallHook profile injected after context", { sessionId: input.sessionID, outputSystemLength: output.system.length });
529
528
  }