@humanlikememory/human-like-mem 0.3.14 → 0.3.15

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/README.md CHANGED
@@ -4,13 +4,50 @@
4
4
 
5
5
  Long-term memory plugin for OpenClaw with automatic memory recall and memory storage.
6
6
 
7
- ## Install
8
-
9
- ```bash
10
- npm install @humanlikememory/human-like-mem
11
- ```
12
-
13
- ## Enable In OpenClaw
7
+ ## Install
8
+
9
+ Recommended: Method 1.
10
+
11
+ ### Method 1: Install With OpenClaw CLI
12
+
13
+ ```bash
14
+ openclaw plugins install @humanlikememory/human-like-mem
15
+ ```
16
+
17
+ Then edit `~/.openclaw/openclaw.json`:
18
+
19
+ ```bash
20
+ vim ~/.openclaw/openclaw.json
21
+ ```
22
+
23
+ ```json
24
+ {
25
+ "plugins": {
26
+ "entries": {
27
+ "human-like-mem": {
28
+ "enabled": true,
29
+ "config": {
30
+ "minTurnsToStore": 5,
31
+ "apiKey": "mp_......",
32
+ "baseUrl": "https://plugin.human-like.me"
33
+ }
34
+ }
35
+ }
36
+ }
37
+ }
38
+ ```
39
+
40
+ ### Method 2: Install With npm
41
+
42
+ You can also install with npm first, then enable it in OpenClaw.
43
+
44
+ ```bash
45
+ npm install @humanlikememory/human-like-mem
46
+ ```
47
+
48
+ OpenClaw can also help install the package directly, so Method 1 is recommended.
49
+
50
+ ## Enable In OpenClaw
14
51
 
15
52
  Edit `~/.openclaw/openclaw.json`:
16
53
 
package/README_ZH.md CHANGED
@@ -1,70 +1,107 @@
1
- # Human-Like Memory Plugin for OpenClaw
2
-
3
- [![npm version](https://img.shields.io/npm/v/@humanlikememory/human-like-mem.svg)](https://www.npmjs.com/package/@humanlikememory/human-like-mem)
4
-
5
- OpenClaw 长期记忆插件,支持自动召回和自动存储对话记忆。
6
-
7
- ## 安装
8
-
9
- ```bash
10
- npm install @humanlikememory/human-like-mem
11
- ```
12
-
13
- ## 在 OpenClaw 中启用
14
-
15
- 编辑 `~/.openclaw/openclaw.json`:
16
-
17
- ```json
18
- {
19
- "plugins": {
20
- "entries": {
21
- "human-like-mem": {
22
- "enabled": true
23
- }
24
- }
25
- }
26
- }
27
- ```
28
-
29
- ## 必填环境变量
30
-
31
- ```bash
32
- export HUMAN_LIKE_MEM_API_KEY="mp_xxxxxx"
33
- ```
34
-
35
- ## 可选环境变量
36
-
37
- ```bash
1
+ # Human-Like Memory Plugin for OpenClaw
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@humanlikememory/human-like-mem.svg)](https://www.npmjs.com/package/@humanlikememory/human-like-mem)
4
+
5
+ OpenClaw 长期记忆插件,支持自动召回和自动存储对话记忆。
6
+
7
+ ## 安装
8
+
9
+ 推荐:优先使用第一种方式。
10
+
11
+ ### 方法一:通过 OpenClaw CLI 安装
12
+
13
+ ```bash
14
+ openclaw plugins install @humanlikememory/human-like-mem
15
+ ```
16
+
17
+ 然后编辑 `~/.openclaw/openclaw.json`:
18
+
19
+ ```bash
20
+ vim ~/.openclaw/openclaw.json
21
+ ```
22
+
23
+ ```json
24
+ {
25
+ "plugins": {
26
+ "entries": {
27
+ "human-like-mem": {
28
+ "enabled": true,
29
+ "config": {
30
+ "minTurnsToStore": 5,
31
+ "apiKey": "mp_xxxxxx",
32
+ "baseUrl": "https://plugin.human-like.me"
33
+ }
34
+ }
35
+ }
36
+ }
37
+ }
38
+ ```
39
+
40
+ ### 方法二:通过 npm 安装
41
+
42
+ 也可以先用 npm 安装,再在 OpenClaw 中启用。
43
+
44
+ ```bash
45
+ npm install @humanlikememory/human-like-mem
46
+ ```
47
+
48
+ OpenClaw 也可以直接帮你安装,所以一般更推荐第一种方式。
49
+
50
+ ## 在 OpenClaw 中启用
51
+
52
+ 编辑 `~/.openclaw/openclaw.json`:
53
+
54
+ ```json
55
+ {
56
+ "plugins": {
57
+ "entries": {
58
+ "human-like-mem": {
59
+ "enabled": true
60
+ }
61
+ }
62
+ }
63
+ }
64
+ ```
65
+
66
+ ## 必填环境变量
67
+
68
+ ```bash
69
+ export HUMAN_LIKE_MEM_API_KEY="mp_xxxxxx"
70
+ ```
71
+
72
+ ## 可选环境变量
73
+
74
+ ```bash
38
75
  export HUMAN_LIKE_MEM_BASE_URL="https://plugin.human-like.me"
39
- export HUMAN_LIKE_MEM_USER_ID="your-user-id"
40
- export HUMAN_LIKE_MEM_AGENT_ID="main"
41
- export HUMAN_LIKE_MEM_LIMIT_NUMBER="6"
42
- export HUMAN_LIKE_MEM_MIN_SCORE="0.1"
43
- export HUMAN_LIKE_MEM_MIN_TURNS="5"
44
- export HUMAN_LIKE_MEM_SESSION_TIMEOUT="300000"
45
- ```
46
-
47
- ## 工作机制
48
-
49
- - 回答前:插件检索相关记忆并注入上下文。
50
- - 回答后:插件缓存会话,在满足轮次阈值或超时后写入记忆。
51
-
52
- 默认存储策略:
53
-
54
- - `minTurnsToStore = 5`
55
- - `maxTurnsToStore = minTurnsToStore * 2`
56
- - `sessionTimeoutMs = 300000`(5 分钟)
57
-
58
- ## 常见问题
59
-
60
- - 如果日志出现 `HUMAN_LIKE_MEM_API_KEY not configured`,请确认运行时环境变量已生效。
61
- - 如果日志出现请求超时,请把插件 `timeoutMs` 调大(例如 `30000`)。
62
- - 查看日志:
63
-
64
- ```bash
65
- openclaw logs --plain --limit 200
66
- ```
67
-
68
- ## 许可证
69
-
70
- Apache-2.0
76
+ export HUMAN_LIKE_MEM_USER_ID="your-user-id"
77
+ export HUMAN_LIKE_MEM_AGENT_ID="main"
78
+ export HUMAN_LIKE_MEM_LIMIT_NUMBER="6"
79
+ export HUMAN_LIKE_MEM_MIN_SCORE="0.1"
80
+ export HUMAN_LIKE_MEM_MIN_TURNS="5"
81
+ export HUMAN_LIKE_MEM_SESSION_TIMEOUT="300000"
82
+ ```
83
+
84
+ ## 工作机制
85
+
86
+ - 回复前:插件会检索相关记忆并注入上下文。
87
+ - 回复后:插件会缓存会话,并在达到轮次阈值或超时后写入记忆。
88
+
89
+ 默认存储策略:
90
+
91
+ - `minTurnsToStore = 5`
92
+ - `maxTurnsToStore = minTurnsToStore * 2`
93
+ - `sessionTimeoutMs = 300000`(5 分钟)
94
+
95
+ ## 常见问题
96
+
97
+ - 如果日志里出现 `HUMAN_LIKE_MEM_API_KEY not configured`,请确认运行环境变量已经生效。
98
+ - 如果日志里出现请求超时,可以把插件 `timeoutMs` 调大一些,比如 `30000`。
99
+ - 查看日志:
100
+
101
+ ```bash
102
+ openclaw logs --plain --limit 200
103
+ ```
104
+
105
+ ## 许可证
106
+
107
+ Apache-2.0
@@ -3,7 +3,7 @@
3
3
  "id": "human-like-mem",
4
4
  "name": "Human-Like Memory Plugin",
5
5
  "description": "Long-term memory plugin with automatic recall and storage.",
6
- "version": "0.3.14",
6
+ "version": "0.3.15",
7
7
  "kind": "lifecycle",
8
8
  "main": "./index.js",
9
9
  "author": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@humanlikememory/human-like-mem",
3
- "version": "0.3.14",
3
+ "version": "0.3.15",
4
4
  "description": "Long-term memory plugin for OpenClaw - AI Social Memory Integration",
5
5
  "main": "index.js",
6
6
  "type": "module",