openclaw-cortex-memory 0.1.0-Alpha.30 → 0.1.0-Alpha.32
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/LICENSE +21 -0
- package/README.md +46 -12
- package/SIGNATURE.md +7 -0
- package/SKILL.md +18 -3
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +148 -6
- package/dist/index.js.map +1 -1
- package/dist/openclaw.plugin.json +120 -4
- package/dist/src/engine/memory_engine.d.ts +5 -1
- package/dist/src/engine/memory_engine.d.ts.map +1 -1
- package/dist/src/engine/ts_engine.d.ts +116 -0
- package/dist/src/engine/ts_engine.d.ts.map +1 -1
- package/dist/src/engine/ts_engine.js +417 -102
- package/dist/src/engine/ts_engine.js.map +1 -1
- package/dist/src/engine/types.d.ts +17 -0
- package/dist/src/engine/types.d.ts.map +1 -1
- package/dist/src/graph/ontology.d.ts +23 -1
- package/dist/src/graph/ontology.d.ts.map +1 -1
- package/dist/src/graph/ontology.js +743 -70
- package/dist/src/graph/ontology.js.map +1 -1
- package/dist/src/quality/llm_output_validator.d.ts +20 -2
- package/dist/src/quality/llm_output_validator.d.ts.map +1 -1
- package/dist/src/quality/llm_output_validator.js +296 -41
- package/dist/src/quality/llm_output_validator.js.map +1 -1
- package/dist/src/store/archive_store.d.ts +8 -0
- package/dist/src/store/archive_store.d.ts.map +1 -1
- package/dist/src/store/archive_store.js +244 -84
- package/dist/src/store/archive_store.js.map +1 -1
- package/dist/src/store/graph_memory_store.d.ts +72 -2
- package/dist/src/store/graph_memory_store.d.ts.map +1 -1
- package/dist/src/store/graph_memory_store.js +723 -50
- package/dist/src/store/graph_memory_store.js.map +1 -1
- package/dist/src/store/read_store.d.ts +3 -0
- package/dist/src/store/read_store.d.ts.map +1 -1
- package/dist/src/store/read_store.js +1004 -209
- package/dist/src/store/read_store.js.map +1 -1
- package/dist/src/store/vector_store.d.ts +1 -0
- package/dist/src/store/vector_store.d.ts.map +1 -1
- package/dist/src/store/vector_store.js +1 -0
- package/dist/src/store/vector_store.js.map +1 -1
- package/dist/src/store/write_store.d.ts +2 -0
- package/dist/src/store/write_store.d.ts.map +1 -1
- package/dist/src/store/write_store.js +45 -3
- package/dist/src/store/write_store.js.map +1 -1
- package/dist/src/sync/session_sync.d.ts +20 -1
- package/dist/src/sync/session_sync.d.ts.map +1 -1
- package/dist/src/sync/session_sync.js +1810 -161
- package/dist/src/sync/session_sync.js.map +1 -1
- package/dist/src/wiki/wiki_linter.d.ts +25 -0
- package/dist/src/wiki/wiki_linter.d.ts.map +1 -0
- package/dist/src/wiki/wiki_linter.js +268 -0
- package/dist/src/wiki/wiki_linter.js.map +1 -0
- package/dist/src/wiki/wiki_logger.d.ts +10 -0
- package/dist/src/wiki/wiki_logger.d.ts.map +1 -0
- package/dist/src/wiki/wiki_logger.js +78 -0
- package/dist/src/wiki/wiki_logger.js.map +1 -0
- package/dist/src/wiki/wiki_maintainer.d.ts +36 -0
- package/dist/src/wiki/wiki_maintainer.d.ts.map +1 -0
- package/dist/src/wiki/wiki_maintainer.js +38 -0
- package/dist/src/wiki/wiki_maintainer.js.map +1 -0
- package/dist/src/wiki/wiki_projector.d.ts +33 -0
- package/dist/src/wiki/wiki_projector.d.ts.map +1 -0
- package/dist/src/wiki/wiki_projector.js +633 -0
- package/dist/src/wiki/wiki_projector.js.map +1 -0
- package/dist/src/wiki/wiki_queue.d.ts +29 -0
- package/dist/src/wiki/wiki_queue.d.ts.map +1 -0
- package/dist/src/wiki/wiki_queue.js +137 -0
- package/dist/src/wiki/wiki_queue.js.map +1 -0
- package/openclaw.plugin.json +120 -4
- package/package.json +8 -4
- package/schema/graph.schema.yaml +188 -33
- package/skills/cortex-memory/SKILL.md +49 -0
- package/skills/cortex-memory/references/agent-manual.md +115 -0
- package/skills/cortex-memory/references/configuration.md +92 -0
- package/skills/cortex-memory/references/publish-checklist.md +46 -0
- package/skills/cortex-memory/references/system-prompt-template.md +27 -0
- package/skills/cortex-memory/references/tools.md +181 -0
- package/skills/cortex-memory/scripts/smoke-check.ps1 +56 -0
package/schema/graph.schema.yaml
CHANGED
|
@@ -66,21 +66,41 @@
|
|
|
66
66
|
"Assumption",
|
|
67
67
|
"Concept",
|
|
68
68
|
"Resource",
|
|
69
|
-
"Document"
|
|
69
|
+
"Document",
|
|
70
|
+
"ConfigFile",
|
|
71
|
+
"Preference",
|
|
72
|
+
"Case",
|
|
73
|
+
"Pattern",
|
|
74
|
+
"Date"
|
|
70
75
|
],
|
|
71
76
|
"entityAliases": {
|
|
72
77
|
"OpenClaw": ["openclaw", "插件", "该项目", "本项目"],
|
|
73
78
|
"FamilyMember": ["家人", "家庭成员", "亲人"],
|
|
74
79
|
"Friend": ["朋友", "好友"],
|
|
80
|
+
"Team": ["团队", "小组", "组", "班组"],
|
|
75
81
|
"Location": ["地点", "位置", "住址", "地址"],
|
|
76
82
|
"Event": ["活动", "事情", "事项"],
|
|
77
83
|
"Schedule": ["日程", "安排", "计划表"],
|
|
78
84
|
"Habit": ["习惯", "作息"],
|
|
79
85
|
"HealthItem": ["健康", "体检", "药物", "锻炼"],
|
|
80
86
|
"FinanceItem": ["账单", "支出", "收入", "预算"],
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
87
|
+
"Plan": ["计划", "方案", "路线图"],
|
|
88
|
+
"Preference": ["偏好", "习惯选择"],
|
|
89
|
+
"Document": ["文档", "说明文档", "手册", "wiki", "README", "PRD", "方案文档"],
|
|
90
|
+
"Resource": ["资源", "物品", "物件", "设备", "工具", "素材", "资产"],
|
|
91
|
+
"ConfigFile": ["配置文件", "config", "配置"],
|
|
92
|
+
"Decision": ["决策", "决定", "拍板"],
|
|
93
|
+
"Action": ["动作", "操作", "执行"],
|
|
94
|
+
"Risk": ["风险", "隐患"],
|
|
95
|
+
"Blocker": ["阻塞", "卡点", "障碍"],
|
|
96
|
+
"Assumption": ["假设", "前提"],
|
|
97
|
+
"Concept": ["概念", "术语"],
|
|
98
|
+
"Case": ["案例", "case"],
|
|
99
|
+
"Pattern": ["模式", "pattern"],
|
|
100
|
+
"Date": ["日期", "时间", "时间点"],
|
|
101
|
+
"Person": ["我", "自己", "本人", "同事", "客户", "用户", "姓名", "名字", "人名", "成员", "联系人"],
|
|
102
|
+
"Project": ["项目", "工程", "项目线"],
|
|
103
|
+
"Task": ["任务", "待办", "todo", "工单", "事项"],
|
|
84
104
|
"Milestone": ["里程碑", "节点"],
|
|
85
105
|
"Issue": ["问题", "故障", "报错"],
|
|
86
106
|
"Fix": ["修复", "解决方案"]
|
|
@@ -88,88 +108,223 @@
|
|
|
88
108
|
"relationTypes": [
|
|
89
109
|
"depends_on",
|
|
90
110
|
"blocks",
|
|
91
|
-
"
|
|
111
|
+
"unblocks",
|
|
92
112
|
"causes",
|
|
113
|
+
"impacts",
|
|
93
114
|
"resolves",
|
|
115
|
+
"encountered_bug",
|
|
116
|
+
"solved_with",
|
|
117
|
+
"uses_tech",
|
|
118
|
+
"integrates_with",
|
|
119
|
+
"migrates_to",
|
|
120
|
+
"replaced_by",
|
|
121
|
+
"has_subtask",
|
|
122
|
+
"belongs_to",
|
|
123
|
+
"owned_by",
|
|
124
|
+
"implements",
|
|
125
|
+
"requires",
|
|
94
126
|
"plans_to",
|
|
127
|
+
"planned_for",
|
|
95
128
|
"scheduled_for",
|
|
129
|
+
"references",
|
|
130
|
+
"documents",
|
|
131
|
+
"defined_in",
|
|
132
|
+
"configured_in",
|
|
133
|
+
"supports",
|
|
134
|
+
"conflicts_with",
|
|
135
|
+
"duplicates",
|
|
136
|
+
"supersedes",
|
|
137
|
+
"assigned_to",
|
|
138
|
+
"reviewed_by",
|
|
139
|
+
"approved_by",
|
|
140
|
+
"rejected_by",
|
|
141
|
+
"reported_by",
|
|
96
142
|
"lives_in",
|
|
97
143
|
"cares_for",
|
|
98
144
|
"pays_for",
|
|
99
|
-
"supports",
|
|
100
|
-
"conflicts_with",
|
|
101
|
-
"belongs_to",
|
|
102
|
-
"owned_by",
|
|
103
|
-
"references",
|
|
104
145
|
"prefers",
|
|
105
|
-
"
|
|
106
|
-
"
|
|
146
|
+
"has_spouse",
|
|
147
|
+
"has_child",
|
|
148
|
+
"birthday_on",
|
|
149
|
+
"anniversary_on"
|
|
107
150
|
],
|
|
108
151
|
"relationTypeAliases": {
|
|
109
152
|
"dependency": "depends_on",
|
|
110
153
|
"blocked_by": "blocks",
|
|
111
|
-
"
|
|
154
|
+
"unblock": "unblocks",
|
|
155
|
+
"impact": "impacts",
|
|
112
156
|
"plan_to": "plans_to",
|
|
157
|
+
"plan_for": "planned_for",
|
|
113
158
|
"schedule_for": "scheduled_for",
|
|
114
159
|
"located_in": "lives_in",
|
|
115
160
|
"care_for": "cares_for",
|
|
116
161
|
"pay_for": "pays_for",
|
|
117
162
|
"support": "supports",
|
|
118
163
|
"conflict_with": "conflicts_with",
|
|
164
|
+
"use_tech": "uses_tech",
|
|
165
|
+
"tech_stack": "uses_tech",
|
|
166
|
+
"integrate_with": "integrates_with",
|
|
167
|
+
"migrate_to": "migrates_to",
|
|
168
|
+
"replace_by": "replaced_by",
|
|
169
|
+
"replace_with": "replaced_by",
|
|
170
|
+
"bug": "encountered_bug",
|
|
171
|
+
"bug_on": "encountered_bug",
|
|
172
|
+
"fix_with": "solved_with",
|
|
173
|
+
"solve_with": "solved_with",
|
|
174
|
+
"solved_by": "solved_with",
|
|
175
|
+
"subtask_of": "has_subtask",
|
|
176
|
+
"child_task": "has_subtask",
|
|
177
|
+
"documented_by": "documents",
|
|
178
|
+
"defined_by": "defined_in",
|
|
179
|
+
"config_in": "configured_in",
|
|
180
|
+
"duplicate_of": "duplicates",
|
|
181
|
+
"superseded_by": "supersedes",
|
|
182
|
+
"assign_to": "assigned_to",
|
|
183
|
+
"review_by": "reviewed_by",
|
|
184
|
+
"approve_by": "approved_by",
|
|
185
|
+
"reject_by": "rejected_by",
|
|
186
|
+
"report_by": "reported_by",
|
|
119
187
|
"依赖于": "depends_on",
|
|
120
188
|
"依赖": "depends_on",
|
|
121
189
|
"取决于": "depends_on",
|
|
122
190
|
"阻塞": "blocks",
|
|
123
191
|
"卡住": "blocks",
|
|
192
|
+
"解除阻塞": "unblocks",
|
|
124
193
|
"导致": "causes",
|
|
125
194
|
"引起": "causes",
|
|
195
|
+
"影响": "impacts",
|
|
126
196
|
"解决": "resolves",
|
|
127
197
|
"修复": "resolves",
|
|
198
|
+
"遇到报错": "encountered_bug",
|
|
199
|
+
"通过": "solved_with",
|
|
200
|
+
"使用技术": "uses_tech",
|
|
201
|
+
"集成": "integrates_with",
|
|
202
|
+
"迁移到": "migrates_to",
|
|
203
|
+
"被替代": "replaced_by",
|
|
204
|
+
"子任务": "has_subtask",
|
|
128
205
|
"属于": "belongs_to",
|
|
129
206
|
"归属": "belongs_to",
|
|
130
207
|
"负责": "owned_by",
|
|
131
208
|
"由": "owned_by",
|
|
132
|
-
"参考": "references",
|
|
133
|
-
"引用": "references",
|
|
134
|
-
"偏好": "prefers",
|
|
135
|
-
"更喜欢": "prefers",
|
|
136
209
|
"实现": "implements",
|
|
137
210
|
"需要": "requires",
|
|
138
211
|
"计划做": "plans_to",
|
|
139
212
|
"打算": "plans_to",
|
|
213
|
+
"计划于": "planned_for",
|
|
140
214
|
"安排在": "scheduled_for",
|
|
141
215
|
"约在": "scheduled_for",
|
|
216
|
+
"参考": "references",
|
|
217
|
+
"引用": "references",
|
|
218
|
+
"记录": "documents",
|
|
219
|
+
"定义于": "defined_in",
|
|
220
|
+
"配置于": "configured_in",
|
|
221
|
+
"支持": "supports",
|
|
222
|
+
"冲突": "conflicts_with",
|
|
223
|
+
"矛盾": "conflicts_with",
|
|
224
|
+
"重复": "duplicates",
|
|
225
|
+
"取代": "supersedes",
|
|
226
|
+
"分配给": "assigned_to",
|
|
227
|
+
"评审": "reviewed_by",
|
|
228
|
+
"批准": "approved_by",
|
|
229
|
+
"拒绝": "rejected_by",
|
|
230
|
+
"报告": "reported_by",
|
|
142
231
|
"住在": "lives_in",
|
|
143
232
|
"居住在": "lives_in",
|
|
144
233
|
"照顾": "cares_for",
|
|
145
234
|
"看护": "cares_for",
|
|
146
235
|
"支付": "pays_for",
|
|
147
236
|
"付款": "pays_for",
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"
|
|
151
|
-
"
|
|
152
|
-
"
|
|
237
|
+
"偏好": "prefers",
|
|
238
|
+
"更喜欢": "prefers",
|
|
239
|
+
"配偶": "has_spouse",
|
|
240
|
+
"孩子": "has_child",
|
|
241
|
+
"生日": "birthday_on",
|
|
242
|
+
"纪念日": "anniversary_on",
|
|
153
243
|
"belongs": "belongs_to",
|
|
154
244
|
"owner_of": "owned_by",
|
|
155
245
|
"refer_to": "references",
|
|
156
246
|
"preference_for": "prefers",
|
|
157
247
|
"implement": "implements",
|
|
158
|
-
"need": "requires"
|
|
248
|
+
"need": "requires",
|
|
249
|
+
"technology": "uses_tech",
|
|
250
|
+
"encountered_issue": "encountered_bug",
|
|
251
|
+
"spouse": "has_spouse",
|
|
252
|
+
"wife_of": "has_spouse",
|
|
253
|
+
"husband_of": "has_spouse",
|
|
254
|
+
"child_of": "has_child",
|
|
255
|
+
"parent_of": "has_child",
|
|
256
|
+
"birthday": "birthday_on",
|
|
257
|
+
"born_on": "birthday_on",
|
|
258
|
+
"anniversary": "anniversary_on",
|
|
259
|
+
"married_on": "anniversary_on"
|
|
159
260
|
},
|
|
160
261
|
"relationRules": [
|
|
161
|
-
{ "type": "depends_on", "fromTypes": ["Task", "Plan", "Milestone"], "toTypes": ["Task", "Plan", "Milestone"], "allowSelfLoop": false },
|
|
162
|
-
{ "type": "blocks", "fromTypes": ["Issue", "Task", "Risk"], "toTypes": ["Task", "Plan"], "allowSelfLoop": false },
|
|
163
|
-
{ "type": "
|
|
164
|
-
{ "type": "
|
|
165
|
-
{ "type": "
|
|
166
|
-
{ "type": "
|
|
262
|
+
{ "type": "depends_on", "fromTypes": ["Task", "Plan", "Milestone", "Issue"], "toTypes": ["Task", "Plan", "Milestone", "Issue", "Resource"], "allowSelfLoop": false },
|
|
263
|
+
{ "type": "blocks", "fromTypes": ["Issue", "Task", "Risk", "Blocker"], "toTypes": ["Task", "Plan", "Milestone"], "allowSelfLoop": false },
|
|
264
|
+
{ "type": "unblocks", "fromTypes": ["Fix", "Action", "Decision"], "toTypes": ["Task", "Issue", "Blocker"], "allowSelfLoop": false },
|
|
265
|
+
{ "type": "causes", "fromTypes": ["Issue", "Risk", "Assumption"], "toTypes": ["Issue", "Risk", "Blocker"], "allowSelfLoop": false },
|
|
266
|
+
{ "type": "impacts", "fromTypes": ["Issue", "Risk", "Task", "Project", "Event"], "toTypes": ["Task", "Project", "Issue", "Milestone", "Event"], "allowSelfLoop": false },
|
|
267
|
+
{ "type": "resolves", "fromTypes": ["Fix", "Decision", "Action"], "toTypes": ["Issue", "Blocker", "Risk"], "allowSelfLoop": false },
|
|
268
|
+
{ "type": "encountered_bug", "fromTypes": ["Project", "Task", "Action"], "toTypes": ["Issue", "Blocker"], "allowSelfLoop": false },
|
|
269
|
+
{ "type": "solved_with", "fromTypes": ["Issue", "Blocker", "Task"], "toTypes": ["Fix", "Action", "Decision", "Resource", "Document"], "allowSelfLoop": false },
|
|
270
|
+
{ "type": "uses_tech", "fromTypes": ["Project", "Task", "Fix", "Action"], "toTypes": ["Resource", "Document", "ConfigFile", "Project"], "allowSelfLoop": false },
|
|
271
|
+
{ "type": "integrates_with", "fromTypes": ["Project", "Task", "Resource"], "toTypes": ["Project", "Resource"], "allowSelfLoop": false },
|
|
272
|
+
{ "type": "migrates_to", "fromTypes": ["Project", "Task", "Resource", "ConfigFile"], "toTypes": ["Project", "Resource", "ConfigFile"], "allowSelfLoop": false },
|
|
273
|
+
{ "type": "replaced_by", "fromTypes": ["Project", "Task", "Resource", "Fix"], "toTypes": ["Project", "Task", "Resource", "Fix"], "allowSelfLoop": false },
|
|
274
|
+
{ "type": "has_subtask", "fromTypes": ["Project", "Plan", "Milestone", "Task"], "toTypes": ["Task"], "allowSelfLoop": false },
|
|
275
|
+
{ "type": "belongs_to", "fromTypes": ["Task", "Issue", "Fix", "Decision", "Document"], "toTypes": ["Project", "Plan", "Milestone", "Event"], "allowSelfLoop": false },
|
|
276
|
+
{ "type": "owned_by", "fromTypes": ["Task", "Plan", "Project", "Issue", "Resource"], "toTypes": ["Person", "Team"], "allowSelfLoop": false },
|
|
277
|
+
{ "type": "implements", "fromTypes": ["Task", "Fix", "Project", "Document"], "toTypes": ["Plan", "Milestone", "Concept"], "allowSelfLoop": false },
|
|
278
|
+
{ "type": "requires", "fromTypes": ["Task", "Fix", "Project", "Issue", "Plan"], "toTypes": ["Task", "Resource", "Document", "ConfigFile", "Date"], "allowSelfLoop": false },
|
|
279
|
+
{ "type": "planned_for", "fromTypes": ["Task", "Plan", "Milestone"], "toTypes": ["Date", "Schedule", "Milestone"], "allowSelfLoop": false },
|
|
280
|
+
{ "type": "scheduled_for", "fromTypes": ["Task", "Event", "Plan"], "toTypes": ["Date", "Schedule"], "allowSelfLoop": false },
|
|
281
|
+
{ "type": "references", "fromTypes": ["Task", "Issue", "Fix", "Document", "Project"], "toTypes": ["Document", "Resource", "ConfigFile"], "allowSelfLoop": false },
|
|
282
|
+
{ "type": "documents", "fromTypes": ["Document", "Project", "Task"], "toTypes": ["Issue", "Fix", "Decision", "Event", "Case", "Pattern"], "allowSelfLoop": false },
|
|
283
|
+
{ "type": "defined_in", "fromTypes": ["Task", "Issue", "Fix", "Pattern", "Case"], "toTypes": ["Document", "ConfigFile"], "allowSelfLoop": false },
|
|
284
|
+
{ "type": "configured_in", "fromTypes": ["Task", "Fix", "Resource", "Project"], "toTypes": ["ConfigFile", "Document"], "allowSelfLoop": false },
|
|
285
|
+
{ "type": "supports", "fromTypes": ["Resource", "Project", "Task", "Fix"], "toTypes": ["Task", "Project", "Issue", "Fix"], "allowSelfLoop": false },
|
|
286
|
+
{ "type": "conflicts_with", "fromTypes": ["Task", "Plan", "Resource", "ConfigFile", "Issue"], "toTypes": ["Task", "Plan", "Resource", "ConfigFile", "Issue"], "allowSelfLoop": false },
|
|
287
|
+
{ "type": "duplicates", "fromTypes": ["Issue", "Task", "Fix", "Document"], "toTypes": ["Issue", "Task", "Fix", "Document"], "allowSelfLoop": false },
|
|
288
|
+
{ "type": "supersedes", "fromTypes": ["Fix", "Decision", "Document", "Plan", "Task"], "toTypes": ["Fix", "Decision", "Document", "Plan", "Task"], "allowSelfLoop": false },
|
|
289
|
+
{ "type": "assigned_to", "fromTypes": ["Task", "Issue", "Fix", "Action"], "toTypes": ["Person", "Team"], "allowSelfLoop": false },
|
|
290
|
+
{ "type": "reviewed_by", "fromTypes": ["Fix", "Task", "Document", "Decision"], "toTypes": ["Person", "Team"], "allowSelfLoop": false },
|
|
291
|
+
{ "type": "approved_by", "fromTypes": ["Fix", "Task", "Document", "Decision"], "toTypes": ["Person", "Team"], "allowSelfLoop": false },
|
|
292
|
+
{ "type": "rejected_by", "fromTypes": ["Fix", "Task", "Document", "Decision"], "toTypes": ["Person", "Team"], "allowSelfLoop": false },
|
|
293
|
+
{ "type": "reported_by", "fromTypes": ["Issue", "Risk", "Blocker"], "toTypes": ["Person", "Team"], "allowSelfLoop": false },
|
|
294
|
+
{ "type": "lives_in", "fromTypes": ["Person", "FamilyMember"], "toTypes": ["Location"], "allowSelfLoop": false },
|
|
295
|
+
{ "type": "cares_for", "fromTypes": ["Person", "FamilyMember"], "toTypes": ["Person", "FamilyMember"], "allowSelfLoop": false },
|
|
296
|
+
{ "type": "pays_for", "fromTypes": ["Person", "FamilyMember"], "toTypes": ["Person", "FamilyMember", "FinanceItem"], "allowSelfLoop": false },
|
|
297
|
+
{ "type": "prefers", "fromTypes": ["Person", "Team"], "toTypes": ["Preference", "Resource", "Project", "Location", "Pattern"], "allowSelfLoop": false },
|
|
298
|
+
{ "type": "has_spouse", "fromTypes": ["Person"], "toTypes": ["Person", "FamilyMember"], "allowSelfLoop": false },
|
|
299
|
+
{ "type": "has_child", "fromTypes": ["Person", "FamilyMember"], "toTypes": ["Person", "FamilyMember"], "allowSelfLoop": false },
|
|
300
|
+
{ "type": "birthday_on", "fromTypes": ["Person", "FamilyMember"], "toTypes": ["Date"], "allowSelfLoop": false },
|
|
301
|
+
{ "type": "anniversary_on", "fromTypes": ["Person", "FamilyMember"], "toTypes": ["Date"], "allowSelfLoop": false }
|
|
302
|
+
],
|
|
303
|
+
"highValueRelationTypes": [
|
|
304
|
+
"depends_on",
|
|
305
|
+
"blocks",
|
|
306
|
+
"unblocks",
|
|
307
|
+
"causes",
|
|
308
|
+
"impacts",
|
|
309
|
+
"resolves",
|
|
310
|
+
"encountered_bug",
|
|
311
|
+
"solved_with",
|
|
312
|
+
"uses_tech",
|
|
313
|
+
"integrates_with",
|
|
314
|
+
"migrates_to",
|
|
315
|
+
"replaced_by",
|
|
316
|
+
"has_subtask",
|
|
317
|
+
"belongs_to",
|
|
318
|
+
"owned_by",
|
|
319
|
+
"implements",
|
|
320
|
+
"requires",
|
|
321
|
+
"planned_for",
|
|
322
|
+
"scheduled_for"
|
|
167
323
|
],
|
|
168
|
-
"
|
|
169
|
-
"
|
|
170
|
-
"relatedToMaxAbsolute": 2,
|
|
324
|
+
"relatedToMaxRatio": 0,
|
|
325
|
+
"relatedToMaxAbsolute": 0,
|
|
171
326
|
"minRelationConfidence": 0.35,
|
|
172
327
|
"evidenceSpanRequired": true,
|
|
173
328
|
"endpointMentionRequired": true,
|
|
174
329
|
"defaultEntityType": "Concept"
|
|
175
|
-
}
|
|
330
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cortex-memory
|
|
3
|
+
description: Independent skill for Cortex Memory operations in OpenClaw. Use when users ask for cross-session memory continuity, prior decisions, preferences, relationship tracing, or memory maintenance. If the memory plugin is not installed, guide users to install and enable openclaw-cortex-memory first, then continue with normal memory workflows.
|
|
4
|
+
homepage: https://github.com/deki18/openclaw-cortex-memory
|
|
5
|
+
metadata: { "openclaw": { "os": ["darwin", "linux", "win32"], "primaryEnv": "EMBEDDING_API_KEY" } }
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Cortex Memory
|
|
9
|
+
|
|
10
|
+
This is an independent skill, not a plugin-embedded skill.
|
|
11
|
+
|
|
12
|
+
Use this runtime flow:
|
|
13
|
+
|
|
14
|
+
1. Check whether plugin `openclaw-cortex-memory` is available.
|
|
15
|
+
2. If missing or disabled, run the install bootstrap guide in `{baseDir}/references/agent-manual.md` with README-consistent install order.
|
|
16
|
+
3. After plugin is enabled, run memory retrieval or write operations.
|
|
17
|
+
|
|
18
|
+
After plugin is ready, use this default workflow:
|
|
19
|
+
|
|
20
|
+
1. Retrieve candidate memory with `search_memory`.
|
|
21
|
+
2. If the user asks about entity links or dependency paths, use `query_graph`.
|
|
22
|
+
3. If `query_graph` returns `conflict_hint`, use `list_graph_conflicts` and ask user confirmation before `resolve_graph_conflict`.
|
|
23
|
+
4. For graph status snapshots or projection consistency checks, use `export_graph_view` and `lint_memory_wiki`.
|
|
24
|
+
5. Answer with retrieved evidence first, then add reasoning.
|
|
25
|
+
6. If the turn introduces durable new information, persist it with `store_event`.
|
|
26
|
+
7. For maintenance windows or session wrap-up, run `sync_memory` and optionally `reflect_memory`.
|
|
27
|
+
|
|
28
|
+
If tool calls fail:
|
|
29
|
+
|
|
30
|
+
1. Run `diagnostics`.
|
|
31
|
+
2. Tell the user the plugin is unavailable or misconfigured.
|
|
32
|
+
3. Continue with a normal answer without fabricating memory hits.
|
|
33
|
+
|
|
34
|
+
Do not use this skill for:
|
|
35
|
+
|
|
36
|
+
- Real-time web facts (weather, stock, breaking news).
|
|
37
|
+
- One-off temporary context that should not be persisted.
|
|
38
|
+
|
|
39
|
+
Use these local references when needed:
|
|
40
|
+
|
|
41
|
+
- Install and bootstrap playbook: `{baseDir}/references/agent-manual.md`
|
|
42
|
+
- System prompt template: `{baseDir}/references/system-prompt-template.md`
|
|
43
|
+
- Tool details: `{baseDir}/references/tools.md`
|
|
44
|
+
- Config and dependency setup: `{baseDir}/references/configuration.md`
|
|
45
|
+
- Publish and validation checklist: `{baseDir}/references/publish-checklist.md`
|
|
46
|
+
|
|
47
|
+
Use this script for a quick environment preflight:
|
|
48
|
+
|
|
49
|
+
- `{baseDir}/scripts/smoke-check.ps1 -Json`
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Cortex Memory Agent Manual
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
|
|
5
|
+
Use Cortex Memory as a long-term memory layer in OpenClaw. This manual is for agents operating from the independent `cortex-memory` skill folder.
|
|
6
|
+
|
|
7
|
+
## Phase 1: Plugin Availability Check
|
|
8
|
+
|
|
9
|
+
Run:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
openclaw plugins list
|
|
13
|
+
openclaw plugins inspect openclaw-cortex-memory
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
If plugin exists and is enabled, continue to Phase 3.
|
|
17
|
+
|
|
18
|
+
If plugin is missing or disabled, go to Phase 2.
|
|
19
|
+
|
|
20
|
+
## Phase 2: Install and Enable Plugin
|
|
21
|
+
|
|
22
|
+
Preferred install path (README default):
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
openclaw plugins install clawhub:openclaw-cortex-memory
|
|
26
|
+
openclaw plugins enable openclaw-cortex-memory
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Fallback install path:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm pack openclaw-cortex-memory@0.1.0-Alpha.30
|
|
33
|
+
openclaw plugins install ./openclaw-cortex-memory-0.1.0-Alpha.30.tgz
|
|
34
|
+
openclaw plugins enable openclaw-cortex-memory
|
|
35
|
+
rm ./openclaw-cortex-memory-0.1.0-Alpha.30.tgz
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Then verify:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
openclaw plugins list
|
|
42
|
+
openclaw plugins inspect openclaw-cortex-memory
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
If config is not ready, apply the baseline from `configuration.md`.
|
|
46
|
+
|
|
47
|
+
If the user asks for "system prompt rules", use `{baseDir}/references/system-prompt-template.md`.
|
|
48
|
+
|
|
49
|
+
## Phase 3: Runtime Workflow
|
|
50
|
+
|
|
51
|
+
### Retrieval-first answers
|
|
52
|
+
|
|
53
|
+
1. `search_memory` with the user query.
|
|
54
|
+
2. `query_graph` when relationship/path reasoning is needed.
|
|
55
|
+
3. If `query_graph` returns `conflict_hint`, run `list_graph_conflicts` and confirm with user before `resolve_graph_conflict`.
|
|
56
|
+
4. Respond with evidence first, reasoning second.
|
|
57
|
+
|
|
58
|
+
### Persistence
|
|
59
|
+
|
|
60
|
+
Use `store_event` only for durable information:
|
|
61
|
+
|
|
62
|
+
- stable preferences
|
|
63
|
+
- project decisions
|
|
64
|
+
- long-lived constraints
|
|
65
|
+
|
|
66
|
+
Avoid persisting ephemeral chatter.
|
|
67
|
+
|
|
68
|
+
### Maintenance
|
|
69
|
+
|
|
70
|
+
- `sync_memory` for historical import
|
|
71
|
+
- `reflect_memory` for rule extraction
|
|
72
|
+
- `backfill_embeddings` for vector repair
|
|
73
|
+
- `export_graph_view` for status-aware graph snapshots
|
|
74
|
+
- `lint_memory_wiki` for projection consistency checks
|
|
75
|
+
- `diagnostics` when anything looks inconsistent
|
|
76
|
+
|
|
77
|
+
## Failure Handling
|
|
78
|
+
|
|
79
|
+
If plugin tools are unavailable:
|
|
80
|
+
|
|
81
|
+
1. Run `diagnostics`.
|
|
82
|
+
2. Explain the issue clearly (plugin disabled, config incomplete, endpoint unavailable, or API key missing).
|
|
83
|
+
3. Provide immediate next action with exact command.
|
|
84
|
+
|
|
85
|
+
If install or enable flow reports a `memory-lancedb` config requirement, add this block under `plugins.entries` in `openclaw.json`:
|
|
86
|
+
|
|
87
|
+
```json
|
|
88
|
+
"memory-lancedb": {
|
|
89
|
+
"enabled": false,
|
|
90
|
+
"config": {
|
|
91
|
+
"embedding": {
|
|
92
|
+
"apiKey": "${MEMORY_LANCEDB_API_KEY}",
|
|
93
|
+
"model": "text-embedding-3-small"
|
|
94
|
+
},
|
|
95
|
+
"dbPath": "~/.openclaw/memory/lancedb",
|
|
96
|
+
"autoRecall": true,
|
|
97
|
+
"autoCapture": false,
|
|
98
|
+
"captureMaxChars": 500
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Operator Commands Cheat Sheet
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
openclaw plugins install clawhub:openclaw-cortex-memory
|
|
107
|
+
openclaw plugins enable openclaw-cortex-memory
|
|
108
|
+
openclaw plugins inspect openclaw-cortex-memory
|
|
109
|
+
npm pack openclaw-cortex-memory@0.1.0-Alpha.30
|
|
110
|
+
openclaw plugins install ./openclaw-cortex-memory-0.1.0-Alpha.30.tgz
|
|
111
|
+
openclaw plugins enable openclaw-cortex-memory
|
|
112
|
+
rm ./openclaw-cortex-memory-0.1.0-Alpha.30.tgz
|
|
113
|
+
openclaw skills info cortex-memory
|
|
114
|
+
openclaw skills check
|
|
115
|
+
```
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Configuration Reference
|
|
2
|
+
|
|
3
|
+
## Minimum OpenClaw Config
|
|
4
|
+
|
|
5
|
+
Use this as the baseline in `openclaw.json`.
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{
|
|
9
|
+
"plugins": {
|
|
10
|
+
"allow": ["openclaw-cortex-memory"],
|
|
11
|
+
"slots": {
|
|
12
|
+
"memory": "none"
|
|
13
|
+
},
|
|
14
|
+
"entries": {
|
|
15
|
+
"openclaw-cortex-memory": {
|
|
16
|
+
"enabled": true,
|
|
17
|
+
"config": {
|
|
18
|
+
"autoSync": true,
|
|
19
|
+
"autoReflect": false,
|
|
20
|
+
"graphQualityMode": "warn",
|
|
21
|
+
"wikiProjection": {
|
|
22
|
+
"enabled": true,
|
|
23
|
+
"mode": "incremental",
|
|
24
|
+
"maxBatch": 100
|
|
25
|
+
},
|
|
26
|
+
"embedding": {
|
|
27
|
+
"provider": "api",
|
|
28
|
+
"model": "text-embedding-3-large",
|
|
29
|
+
"apiKey": "${EMBEDDING_API_KEY}",
|
|
30
|
+
"baseURL": "https://your-embedding-endpoint/v1",
|
|
31
|
+
"dimensions": 3072
|
|
32
|
+
},
|
|
33
|
+
"llm": {
|
|
34
|
+
"provider": "api",
|
|
35
|
+
"model": "gpt-4",
|
|
36
|
+
"apiKey": "${LLM_API_KEY}",
|
|
37
|
+
"baseURL": "https://your-llm-endpoint/v1"
|
|
38
|
+
},
|
|
39
|
+
"reranker": {
|
|
40
|
+
"provider": "api",
|
|
41
|
+
"model": "BAAI/bge-reranker-v2-m3",
|
|
42
|
+
"apiKey": "${RERANKER_API_KEY}",
|
|
43
|
+
"baseURL": "https://your-reranker-endpoint/v1/rerank"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Required Environment Variables
|
|
53
|
+
|
|
54
|
+
- `EMBEDDING_API_KEY`
|
|
55
|
+
- `LLM_API_KEY`
|
|
56
|
+
- `RERANKER_API_KEY`
|
|
57
|
+
|
|
58
|
+
## Required Endpoints
|
|
59
|
+
|
|
60
|
+
- Embedding: OpenAI-compatible `/embeddings`
|
|
61
|
+
- LLM: OpenAI-compatible `/chat/completions`
|
|
62
|
+
- Reranker: `/rerank`
|
|
63
|
+
|
|
64
|
+
## Troubleshooting: memory-lancedb Requirement
|
|
65
|
+
|
|
66
|
+
If `openclaw plugins install/enable` reports a `memory-lancedb` config requirement, add this entry under `plugins.entries`:
|
|
67
|
+
|
|
68
|
+
```json
|
|
69
|
+
"memory-lancedb": {
|
|
70
|
+
"enabled": false,
|
|
71
|
+
"config": {
|
|
72
|
+
"embedding": {
|
|
73
|
+
"apiKey": "${MEMORY_LANCEDB_API_KEY}",
|
|
74
|
+
"model": "text-embedding-3-small"
|
|
75
|
+
},
|
|
76
|
+
"dbPath": "~/.openclaw/memory/lancedb",
|
|
77
|
+
"autoRecall": true,
|
|
78
|
+
"autoCapture": false,
|
|
79
|
+
"captureMaxChars": 500
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Recommended Validation Commands
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
openclaw plugins list
|
|
88
|
+
openclaw plugins inspect openclaw-cortex-memory
|
|
89
|
+
openclaw skills list
|
|
90
|
+
openclaw skills info cortex-memory
|
|
91
|
+
openclaw skills check
|
|
92
|
+
```
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# ClawHub Publish Checklist
|
|
2
|
+
|
|
3
|
+
## Preflight
|
|
4
|
+
|
|
5
|
+
1. Confirm skill root contains `SKILL.md`.
|
|
6
|
+
2. Confirm frontmatter includes:
|
|
7
|
+
- `name`
|
|
8
|
+
- `description`
|
|
9
|
+
3. Confirm no secret values are hardcoded in skill files.
|
|
10
|
+
|
|
11
|
+
## Local Validation
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
openclaw skills list
|
|
15
|
+
openclaw skills info cortex-memory
|
|
16
|
+
openclaw skills check
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Optional plugin validation:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
openclaw plugins list
|
|
23
|
+
openclaw plugins inspect openclaw-cortex-memory
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Publish
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
clawhub login
|
|
30
|
+
clawhub whoami
|
|
31
|
+
clawhub skill publish ./skills/cortex-memory --slug cortex-memory --name "Cortex Memory" --version 0.1.0 --changelog "Initial ClawHub release" --tags latest
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Install Test (Clean Workspace)
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
openclaw skills install cortex-memory
|
|
38
|
+
openclaw skills info cortex-memory
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Post Publish
|
|
42
|
+
|
|
43
|
+
1. Start a new session.
|
|
44
|
+
2. Trigger retrieval workflow with a memory-related prompt.
|
|
45
|
+
3. Verify skill appears and is eligible in `openclaw skills list --eligible`.
|
|
46
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Cortex Memory 系统提示词模板
|
|
2
|
+
|
|
3
|
+
可直接粘贴到 Agent 系统提示词中:
|
|
4
|
+
|
|
5
|
+
## Cortex Memory 记忆插件使用规则(核心规则,不允许删除)
|
|
6
|
+
|
|
7
|
+
你已接入 Cortex Memory。必须遵循以下规则:
|
|
8
|
+
|
|
9
|
+
1. 禁止臆造历史事实;凡涉及历史对话、用户偏好、项目既有决策,先检索再回答。
|
|
10
|
+
2. 单个任务内避免重复写入:`store_event` / `reflect_memory` 仅在关键节点或收尾触发一次。
|
|
11
|
+
3. 用户询问历史信息、偏好、项目上下文时:先调用 `search_memory`,再回答。
|
|
12
|
+
4. 需要当前会话热上下文时:调用 `get_hot_context`。
|
|
13
|
+
5. 需要自动召回相关记忆时:调用 `get_auto_context`。
|
|
14
|
+
6. 需要实体关系、依赖链路或路径关系时:调用 `query_graph`。
|
|
15
|
+
7. 仅在“重要事项已结束且结论明确”后调用 `store_event` 记录结果(过程进行中不频繁记录)。
|
|
16
|
+
8. 当任务经历“失败 -> 调整 -> 成功”时:先用 `store_event` 记录失败原因与成功方案,再调用 `reflect_memory` 沉淀可复用规则。
|
|
17
|
+
9. 需要导入历史会话时:调用 `sync_memory`。
|
|
18
|
+
10. 当 `diagnostics` 显示 active/archive 有未向量化记录,或迁移后需重建向量层时:调用 `backfill_embeddings`(按需选择 `incremental` / `vector_only` / `full`)。
|
|
19
|
+
11. 出现配置校验失败、记忆读写异常、检索结果异常或数据目录问题时:优先调用 `diagnostics`。
|
|
20
|
+
12. 仅在用户明确要求删除记忆,且已确认 `memory_id` 时,才调用 `delete_memory`;禁止在未确认情况下自动删除。
|
|
21
|
+
13. 任一工具调用失败时,先重试一次;仍失败则明确告知用户,并基于当前可得上下文继续完成任务。
|
|
22
|
+
14. 调用任意 Cortex Memory 工具前,先确认当前运行环境可见该工具;若工具不可见,必须立即报告“当前 lane 不可用”,不得虚构执行结果。
|
|
23
|
+
15. `sync_memory` 属于关键路径任务:执行前后应避免并发重复触发;若已有同任务进行中,复用当前结果或等待完成。
|
|
24
|
+
16. 当用户明确请求 Cortex Memory 任务(如 `sync_memory` / `search_memory` / `store_event`)时,禁止切换到无关流程(如心跳巡检、日报、闲聊任务);若被系统任务打断,先完成用户请求再处理后台任务。
|
|
25
|
+
17. 当 `query_graph` 返回 `conflict_hint` 时,不得静默覆盖冲突事实;先调用 `list_graph_conflicts` 并与用户确认,再调用 `resolve_graph_conflict`。
|
|
26
|
+
18. 需要说明图谱状态分布、冲突生命周期或可视化快照时,调用 `export_graph_view`。
|
|
27
|
+
19. 需要排查图谱与 Wiki 投影一致性时,调用 `lint_memory_wiki` 并按 `next_action` 执行修复。
|