memory-lancedb-pro 1.0.25 → 1.0.27
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/CHANGELOG.md +15 -0
- package/README.md +14 -1
- package/README_CN.md +14 -1
- package/index.ts +242 -85
- package/openclaw.plugin.json +15 -1
- package/package.json +1 -1
- package/src/access-tracker.ts +330 -0
- package/src/retriever.ts +183 -68
- package/src/store.ts +207 -67
- package/src/tools.ts +339 -87
- package/test/access-tracker.test.mjs +770 -0
- package/test/cli-smoke.mjs +22 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.26
|
|
4
|
+
|
|
5
|
+
**Access Reinforcement for Time Decay**
|
|
6
|
+
|
|
7
|
+
- **Feat**: Access reinforcement — frequently *manually recalled* memories decay more slowly (spaced-repetition style)
|
|
8
|
+
- **New**: `AccessTracker` with debounced metadata write-back (records accessCount / lastAccessedAt)
|
|
9
|
+
- **New**: Config options under `retrieval`: `reinforcementFactor` (default: 0.5) and `maxHalfLifeMultiplier` (default: 3)
|
|
10
|
+
- **New**: `MemoryStore.getById()` pure-read helper for efficient metadata lookup
|
|
11
|
+
|
|
12
|
+
PR: #37
|
|
13
|
+
|
|
14
|
+
Breaking changes: None. Backward compatible (set `reinforcementFactor: 0` to disable).
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
3
18
|
|
|
4
19
|
## 1.0.22
|
|
5
20
|
|
package/README.md
CHANGED
|
@@ -353,7 +353,9 @@ openclaw config get plugins.slots.memory
|
|
|
353
353
|
"filterNoise": true,
|
|
354
354
|
"lengthNormAnchor": 500,
|
|
355
355
|
"hardMinScore": 0.35,
|
|
356
|
-
"timeDecayHalfLifeDays": 60
|
|
356
|
+
"timeDecayHalfLifeDays": 60,
|
|
357
|
+
"reinforcementFactor": 0.5,
|
|
358
|
+
"maxHalfLifeMultiplier": 3
|
|
357
359
|
},
|
|
358
360
|
"enableManagementTools": false,
|
|
359
361
|
"scopes": {
|
|
@@ -375,6 +377,17 @@ openclaw config get plugins.slots.memory
|
|
|
375
377
|
|
|
376
378
|
</details>
|
|
377
379
|
|
|
380
|
+
### Access Reinforcement (1.0.26)
|
|
381
|
+
|
|
382
|
+
To make frequently used memories decay more slowly, the retriever can extend the effective time-decay half-life based on **manual recall frequency** (spaced-repetition style).
|
|
383
|
+
|
|
384
|
+
Config keys (under `retrieval`):
|
|
385
|
+
- `reinforcementFactor` (range: 0–2, default: `0.5`) — set `0` to disable
|
|
386
|
+
- `maxHalfLifeMultiplier` (range: 1–10, default: `3`) — hard cap: effective half-life ≤ base × multiplier
|
|
387
|
+
|
|
388
|
+
Notes:
|
|
389
|
+
- Reinforcement is **whitelisted to `source: "manual"`** (i.e. user/tool initiated recall), to avoid accidental strengthening from auto-recall.
|
|
390
|
+
|
|
378
391
|
### Embedding Providers
|
|
379
392
|
|
|
380
393
|
This plugin works with **any OpenAI-compatible embedding API**:
|
package/README_CN.md
CHANGED
|
@@ -352,7 +352,9 @@ openclaw config get plugins.slots.memory
|
|
|
352
352
|
"filterNoise": true,
|
|
353
353
|
"lengthNormAnchor": 500,
|
|
354
354
|
"hardMinScore": 0.35,
|
|
355
|
-
"timeDecayHalfLifeDays": 60
|
|
355
|
+
"timeDecayHalfLifeDays": 60,
|
|
356
|
+
"reinforcementFactor": 0.5,
|
|
357
|
+
"maxHalfLifeMultiplier": 3
|
|
356
358
|
},
|
|
357
359
|
"enableManagementTools": false,
|
|
358
360
|
"scopes": {
|
|
@@ -374,6 +376,17 @@ openclaw config get plugins.slots.memory
|
|
|
374
376
|
|
|
375
377
|
</details>
|
|
376
378
|
|
|
379
|
+
### 访问强化(1.0.26)
|
|
380
|
+
|
|
381
|
+
为了让“经常被用到的记忆”衰减得更慢,检索器可以根据 **手动 recall 的频率**(类似间隔重复/记忆强化)来延长有效的 time-decay half-life。
|
|
382
|
+
|
|
383
|
+
配置项(位于 `retrieval` 下):
|
|
384
|
+
- `reinforcementFactor`(范围 0–2,默认 `0.5`)— 设为 `0` 可关闭
|
|
385
|
+
- `maxHalfLifeMultiplier`(范围 1–10,默认 `3`)— 硬上限:有效 half-life ≤ 基础值 × multiplier
|
|
386
|
+
|
|
387
|
+
说明:
|
|
388
|
+
- 强化逻辑只对白名单 `source: "manual"` 生效(用户/工具主动 recall),避免 auto-recall 意外“强化”噪声。
|
|
389
|
+
|
|
377
390
|
### Embedding 提供商
|
|
378
391
|
|
|
379
392
|
本插件支持 **任意 OpenAI 兼容的 Embedding API**:
|