@modelstudio/modelstudio-memory-for-openclaw 1.0.8 → 1.0.9
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/index.ts +3 -2
- package/openclaw.plugin.json +56 -1
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -369,6 +369,7 @@ const modelstudioMemoryPlugin = {
|
|
|
369
369
|
name: "Memory (Bailian)",
|
|
370
370
|
description: "Alibaba Cloud Bailian long-term memory service",
|
|
371
371
|
kind: "memory" as const,
|
|
372
|
+
configSchema: modelstudioMemoryConfigSchema,
|
|
372
373
|
|
|
373
374
|
register(api: OpenClawPluginApi) {
|
|
374
375
|
const cfg = modelstudioMemoryConfigSchema.parse(api.pluginConfig);
|
|
@@ -725,7 +726,7 @@ const modelstudioMemoryPlugin = {
|
|
|
725
726
|
if (!cfg.apiKey) {
|
|
726
727
|
api.logger.warn("modelstudio-memory: injecting config-required system prompt");
|
|
727
728
|
return {
|
|
728
|
-
|
|
729
|
+
systemContext: [
|
|
729
730
|
"<memory-plugin-config-required>",
|
|
730
731
|
"CRITICAL INSTRUCTION — YOU MUST FOLLOW THIS BEFORE ANYTHING ELSE:",
|
|
731
732
|
"",
|
|
@@ -778,7 +779,7 @@ const modelstudioMemoryPlugin = {
|
|
|
778
779
|
`modelstudio-memory: recalled ${memories.length} memories`
|
|
779
780
|
);
|
|
780
781
|
return {
|
|
781
|
-
|
|
782
|
+
systemContext: formatMemoriesContext(memories),
|
|
782
783
|
};
|
|
783
784
|
}
|
|
784
785
|
} catch (err) {
|
package/openclaw.plugin.json
CHANGED
|
@@ -3,7 +3,62 @@
|
|
|
3
3
|
"name": "modelstudio-memory-for-openclaw",
|
|
4
4
|
"description": "阿里云百炼长期记忆服务,提供自动记忆捕获和召回能力",
|
|
5
5
|
"kind": "memory",
|
|
6
|
-
"version": "1.0.
|
|
6
|
+
"version": "1.0.9",
|
|
7
|
+
"configSchema": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"additionalProperties": false,
|
|
10
|
+
"properties": {
|
|
11
|
+
"apiKey": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "DashScope API Key"
|
|
14
|
+
},
|
|
15
|
+
"userId": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "用户 ID,用于隔离不同用户的记忆(默认 'openclaw_memory')"
|
|
18
|
+
},
|
|
19
|
+
"baseUrl": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"default": "https://dashscope.aliyuncs.com/api/v2/apps/memory",
|
|
22
|
+
"description": "API endpoint(公有云或私有部署的完整 URL)"
|
|
23
|
+
},
|
|
24
|
+
"autoCapture": {
|
|
25
|
+
"type": "boolean",
|
|
26
|
+
"default": true,
|
|
27
|
+
"description": "是否自动捕获对话到记忆"
|
|
28
|
+
},
|
|
29
|
+
"autoRecall": {
|
|
30
|
+
"type": "boolean",
|
|
31
|
+
"default": true,
|
|
32
|
+
"description": "是否自动召回相关记忆"
|
|
33
|
+
},
|
|
34
|
+
"topK": {
|
|
35
|
+
"type": "number",
|
|
36
|
+
"default": 5,
|
|
37
|
+
"description": "搜索/召回的记忆数量"
|
|
38
|
+
},
|
|
39
|
+
"minScore": {
|
|
40
|
+
"type": "number",
|
|
41
|
+
"default": 0,
|
|
42
|
+
"description": "最小相似度阈值(0-100)"
|
|
43
|
+
},
|
|
44
|
+
"captureMaxMessages": {
|
|
45
|
+
"type": "number",
|
|
46
|
+
"default": 10,
|
|
47
|
+
"description": "自动捕获时的最大消息数量"
|
|
48
|
+
},
|
|
49
|
+
"recallMinPromptLength": {
|
|
50
|
+
"type": "number",
|
|
51
|
+
"default": 10,
|
|
52
|
+
"description": "触发自动召回的最小 prompt 长度"
|
|
53
|
+
},
|
|
54
|
+
"recallCacheTtlMs": {
|
|
55
|
+
"type": "number",
|
|
56
|
+
"default": 300000,
|
|
57
|
+
"description": "召回结果缓存时间(毫秒),0 表示禁用缓存"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"required": []
|
|
61
|
+
},
|
|
7
62
|
"uiHints": {
|
|
8
63
|
"apiKey": {
|
|
9
64
|
"label": "API Key",
|