@mingxy/cerebro 1.15.2 → 1.15.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.
@@ -1 +1 @@
1
- {"version":3,"file":"keywords.d.ts","sourceRoot":"","sources":["../src/keywords.ts"],"names":[],"mappings":"AAeA,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAGnD;AAED,eAAO,MAAM,aAAa,QAE+D,CAAC"}
1
+ {"version":3,"file":"keywords.d.ts","sourceRoot":"","sources":["../src/keywords.ts"],"names":[],"mappings":"AA4CA,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAGnD;AAED,eAAO,MAAM,aAAa,QAGqC,CAAC"}
package/dist/keywords.js CHANGED
@@ -1,4 +1,4 @@
1
- const KEYWORDS = [
1
+ const SAVE_KEYWORDS = [
2
2
  "remember",
3
3
  "save this",
4
4
  "don't forget",
@@ -12,10 +12,38 @@ const KEYWORDS = [
12
12
  "记下来",
13
13
  "别忘了",
14
14
  ];
15
+ const RECALL_KEYWORDS = [
16
+ "do you remember",
17
+ "remember when",
18
+ "recall",
19
+ "last time",
20
+ "previously",
21
+ "earlier",
22
+ "before we",
23
+ "we discussed",
24
+ "we talked about",
25
+ "you mentioned",
26
+ "you said before",
27
+ "from memory",
28
+ "还记得",
29
+ "记不记得",
30
+ "你记得",
31
+ "上次",
32
+ "之前",
33
+ "以前",
34
+ "之前说的",
35
+ "以前聊过",
36
+ "回忆",
37
+ "想起来",
38
+ "提过",
39
+ "说过",
40
+ ];
41
+ const KEYWORDS = [...SAVE_KEYWORDS, ...RECALL_KEYWORDS];
15
42
  export function detectKeyword(text) {
16
43
  const lower = text.toLowerCase();
17
44
  return KEYWORDS.some((kw) => lower.includes(kw));
18
45
  }
19
- export const KEYWORD_NUDGE = "The user appears to want you to remember something. " +
20
- "Consider using the `memory_store` tool to save this information for future reference.";
46
+ export const KEYWORD_NUDGE = "The user appears to want you to remember or recall something. " +
47
+ "Consider using `memory_search` to find relevant past context, " +
48
+ "or `memory_store` to save information for future reference.";
21
49
  //# sourceMappingURL=keywords.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"keywords.js","sourceRoot":"","sources":["../src/keywords.ts"],"names":[],"mappings":"AAAA,MAAM,QAAQ,GAAsB;IAClC,UAAU;IACV,WAAW;IACX,cAAc;IACd,cAAc;IACd,WAAW;IACX,YAAY;IACZ,UAAU;IACV,IAAI;IACJ,KAAK;IACL,IAAI;IACJ,KAAK;IACL,KAAK;CACG,CAAC;AAEX,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IACjC,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;AACnD,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GACxB,sDAAsD;IACtD,uFAAuF,CAAC"}
1
+ {"version":3,"file":"keywords.js","sourceRoot":"","sources":["../src/keywords.ts"],"names":[],"mappings":"AAAA,MAAM,aAAa,GAAsB;IACvC,UAAU;IACV,WAAW;IACX,cAAc;IACd,cAAc;IACd,WAAW;IACX,YAAY;IACZ,UAAU;IACV,IAAI;IACJ,KAAK;IACL,IAAI;IACJ,KAAK;IACL,KAAK;CACG,CAAC;AAEX,MAAM,eAAe,GAAsB;IACzC,iBAAiB;IACjB,eAAe;IACf,QAAQ;IACR,WAAW;IACX,YAAY;IACZ,SAAS;IACT,WAAW;IACX,cAAc;IACd,iBAAiB;IACjB,eAAe;IACf,iBAAiB;IACjB,aAAa;IACb,KAAK;IACL,MAAM;IACN,KAAK;IACL,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,MAAM;IACN,MAAM;IACN,IAAI;IACJ,KAAK;IACL,IAAI;IACJ,IAAI;CACI,CAAC;AAEX,MAAM,QAAQ,GAAsB,CAAC,GAAG,aAAa,EAAE,GAAG,eAAe,CAAU,CAAC;AAEpF,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IACjC,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;AACnD,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GACxB,gEAAgE;IAChE,gEAAgE;IAChE,6DAA6D,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mingxy/cerebro",
3
- "version": "1.15.2",
3
+ "version": "1.15.3",
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/keywords.ts CHANGED
@@ -1,4 +1,4 @@
1
- const KEYWORDS: readonly string[] = [
1
+ const SAVE_KEYWORDS: readonly string[] = [
2
2
  "remember",
3
3
  "save this",
4
4
  "don't forget",
@@ -13,11 +13,41 @@ const KEYWORDS: readonly string[] = [
13
13
  "别忘了",
14
14
  ] as const;
15
15
 
16
+ const RECALL_KEYWORDS: readonly string[] = [
17
+ "do you remember",
18
+ "remember when",
19
+ "recall",
20
+ "last time",
21
+ "previously",
22
+ "earlier",
23
+ "before we",
24
+ "we discussed",
25
+ "we talked about",
26
+ "you mentioned",
27
+ "you said before",
28
+ "from memory",
29
+ "还记得",
30
+ "记不记得",
31
+ "你记得",
32
+ "上次",
33
+ "之前",
34
+ "以前",
35
+ "之前说的",
36
+ "以前聊过",
37
+ "回忆",
38
+ "想起来",
39
+ "提过",
40
+ "说过",
41
+ ] as const;
42
+
43
+ const KEYWORDS: readonly string[] = [...SAVE_KEYWORDS, ...RECALL_KEYWORDS] as const;
44
+
16
45
  export function detectKeyword(text: string): boolean {
17
46
  const lower = text.toLowerCase();
18
47
  return KEYWORDS.some((kw) => lower.includes(kw));
19
48
  }
20
49
 
21
50
  export const KEYWORD_NUDGE =
22
- "The user appears to want you to remember something. " +
23
- "Consider using the `memory_store` tool to save this information for future reference.";
51
+ "The user appears to want you to remember or recall something. " +
52
+ "Consider using `memory_search` to find relevant past context, " +
53
+ "or `memory_store` to save information for future reference.";