memory-lancedb-pro 1.0.15 → 1.0.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 (3) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/index.ts +13 -12
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.16
4
+
5
+ - Feat: expand memory capture triggers to support Traditional Chinese (繁體中文) in addition to Simplified Chinese, and improve category detection keywords.
6
+
3
7
  ## 1.0.15
4
8
 
5
9
  - Docs: add troubleshooting note for LanceDB/Arrow returning `BigInt` numeric columns, and confirm the plugin coerces numeric fields via `Number(...)` for compatibility.
package/index.ts CHANGED
@@ -111,15 +111,16 @@ const MEMORY_TRIGGERS = [
111
111
  /[\w.-]+@[\w.-]+\.\w+/,
112
112
  /můj\s+\w+\s+je|je\s+můj/i,
113
113
  /my\s+\w+\s+is|is\s+my/i,
114
- /i (like|prefer|hate|love|want|need)/i,
114
+ /i (like|prefer|hate|love|want|need|care)/i,
115
115
  /always|never|important/i,
116
- // Chinese triggers
117
- /记住|记一下|别忘了|备注/,
118
- /偏好|喜欢|讨厌|不喜欢|爱用|习惯/,
119
- /决定|选择了|改用|换成|以后用/,
120
- /我的\S+是|叫我|称呼/,
121
- /总是|从不|一直|每次都/,
122
- /重要|关键|注意|千万别/,
116
+ // Chinese triggers (Traditional & Simplified)
117
+ /記住|记住|記一下|记一下|別忘了|别忘了|備註|备注/,
118
+ /偏好|喜好|喜歡|喜欢|討厭|讨厌|不喜歡|不喜欢|愛用|爱用|習慣|习惯/,
119
+ /決定|决定|選擇了|选择了|改用|換成|换成|以後用|以后用/,
120
+ /我的\S+是|叫我|稱呼|称呼/,
121
+ /老是|講不聽|總是|总是|從不|从不|一直|每次都/,
122
+ /重要|關鍵|关键|注意|千萬別|千万别/,
123
+ /幫我|筆記|存檔|存起來|存一下|重點|原則|底線/,
123
124
  ];
124
125
 
125
126
  export function shouldCapture(text: string): boolean {
@@ -151,16 +152,16 @@ export function shouldCapture(text: string): boolean {
151
152
 
152
153
  export function detectCategory(text: string): "preference" | "fact" | "decision" | "entity" | "other" {
153
154
  const lower = text.toLowerCase();
154
- if (/prefer|radši|like|love|hate|want|偏好|喜欢|讨厌|不喜欢|爱用|习惯/i.test(lower)) {
155
+ if (/prefer|radši|like|love|hate|want|偏好|喜歡|喜欢|討厭|讨厌|不喜歡|不喜欢|愛用|爱用|習慣|习惯/i.test(lower)) {
155
156
  return "preference";
156
157
  }
157
- if (/rozhodli|decided|will use|budeme|决定|选择了|改用|换成|以后用/i.test(lower)) {
158
+ if (/rozhodli|decided|will use|budeme|決定|决定|選擇了|选择了|改用|換成|换成|以後用|以后用|規則|流程|SOP/i.test(lower)) {
158
159
  return "decision";
159
160
  }
160
- if (/\+\d{10,}|@[\w.-]+\.\w+|is called|jmenuje se|我的\S+是|叫我|称呼/i.test(lower)) {
161
+ if (/\+\d{10,}|@[\w.-]+\.\w+|is called|jmenuje se|我的\S+是|叫我|稱呼|称呼/i.test(lower)) {
161
162
  return "entity";
162
163
  }
163
- if (/\b(is|are|has|have|je|má|jsou)\b|总是|从不|一直|每次都/i.test(lower)) {
164
+ if (/\b(is|are|has|have|je|má|jsou)\b|總是|总是|從不|从不|一直|每次都|老是/i.test(lower)) {
164
165
  return "fact";
165
166
  }
166
167
  return "other";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "memory-lancedb-pro",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "description": "OpenClaw enhanced LanceDB memory plugin with hybrid retrieval (Vector + BM25), cross-encoder rerank, multi-scope isolation, and management CLI",
5
5
  "type": "module",
6
6
  "main": "index.ts",