@cognee/cognee-openclaw 2026.2.4 → 2026.3.1
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 +208 -33
- package/dist/index.d.ts +8 -9
- package/dist/index.js +17 -611
- package/dist/index.js.map +1 -1
- package/dist/src/client.d.ts +74 -0
- package/dist/src/client.js +302 -0
- package/dist/src/client.js.map +1 -0
- package/dist/src/config.d.ts +21 -0
- package/dist/src/config.js +89 -0
- package/dist/src/config.js.map +1 -0
- package/dist/src/files.d.ts +6 -0
- package/dist/src/files.js +60 -0
- package/dist/src/files.js.map +1 -0
- package/dist/src/persistence.d.ts +17 -0
- package/dist/src/persistence.js +107 -0
- package/dist/src/persistence.js.map +1 -0
- package/dist/src/plugin.d.ts +9 -0
- package/dist/src/plugin.js +510 -0
- package/dist/src/plugin.js.map +1 -0
- package/dist/src/scope.d.ts +20 -0
- package/dist/src/scope.js +122 -0
- package/dist/src/scope.js.map +1 -0
- package/dist/src/sync.d.ts +18 -0
- package/dist/src/sync.js +219 -0
- package/dist/src/sync.js.map +1 -0
- package/dist/src/types.d.ts +80 -0
- package/dist/src/types.js +5 -0
- package/dist/src/types.js.map +1 -0
- package/openclaw.plugin.json +151 -9
- package/package.json +22 -3
package/openclaw.plugin.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"id": "
|
|
2
|
+
"id": "cognee-openclaw",
|
|
3
3
|
"name": "Memory (Cognee)",
|
|
4
4
|
"kind": "memory",
|
|
5
5
|
"configSchema": {
|
|
@@ -14,22 +14,99 @@
|
|
|
14
14
|
"type": "string",
|
|
15
15
|
"description": "Cognee API key (or use ${COGNEE_API_KEY})"
|
|
16
16
|
},
|
|
17
|
+
"username": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "Cognee login username (default: default_user@example.com)"
|
|
20
|
+
},
|
|
21
|
+
"password": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "Cognee login password (default: default_password)"
|
|
24
|
+
},
|
|
17
25
|
"datasetName": {
|
|
18
26
|
"type": "string",
|
|
19
|
-
"description": "Cognee dataset name
|
|
27
|
+
"description": "Cognee dataset name for single-scope mode (default: openclaw). Ignored when multi-scope is enabled."
|
|
28
|
+
},
|
|
29
|
+
"companyDataset": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"description": "Dataset name for company-wide shared memory. Setting this enables multi-scope mode."
|
|
32
|
+
},
|
|
33
|
+
"userDatasetPrefix": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"description": "Prefix for user-scoped datasets (becomes '{prefix}-{userId}'). Setting this enables multi-scope mode."
|
|
36
|
+
},
|
|
37
|
+
"agentDatasetPrefix": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"description": "Prefix for agent-scoped datasets (becomes '{prefix}-{agentId}'). Setting this enables multi-scope mode."
|
|
40
|
+
},
|
|
41
|
+
"userId": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"description": "User identifier for user-scoped memory (or set OPENCLAW_USER_ID env var)"
|
|
44
|
+
},
|
|
45
|
+
"agentId": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"description": "Agent identifier for agent-scoped memory (or set OPENCLAW_AGENT_ID env var, default: 'default')"
|
|
48
|
+
},
|
|
49
|
+
"recallScopes": {
|
|
50
|
+
"type": "array",
|
|
51
|
+
"items": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"enum": ["company", "user", "agent"]
|
|
54
|
+
},
|
|
55
|
+
"description": "Memory scopes to search during recall, in priority order (default: ['agent', 'user', 'company'])"
|
|
56
|
+
},
|
|
57
|
+
"defaultWriteScope": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"enum": ["company", "user", "agent"],
|
|
60
|
+
"description": "Default scope for files that don't match any scopeRouting pattern (default: 'agent')"
|
|
61
|
+
},
|
|
62
|
+
"scopeRouting": {
|
|
63
|
+
"type": "array",
|
|
64
|
+
"items": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"properties": {
|
|
67
|
+
"pattern": { "type": "string", "description": "Glob pattern to match file paths (e.g. 'memory/company/**')" },
|
|
68
|
+
"scope": { "type": "string", "enum": ["company", "user", "agent"] }
|
|
69
|
+
},
|
|
70
|
+
"required": ["pattern", "scope"]
|
|
71
|
+
},
|
|
72
|
+
"description": "Rules to route memory files to scopes based on path patterns. First match wins."
|
|
73
|
+
},
|
|
74
|
+
"enableSessions": {
|
|
75
|
+
"type": "boolean",
|
|
76
|
+
"description": "Enable session-based conversation tracking for multi-turn recall (default: true)"
|
|
77
|
+
},
|
|
78
|
+
"persistSessionsAfterEnd": {
|
|
79
|
+
"type": "boolean",
|
|
80
|
+
"description": "Persist session Q&A pairs into the knowledge graph after agent ends (default: true)"
|
|
20
81
|
},
|
|
21
82
|
"searchType": {
|
|
22
83
|
"type": "string",
|
|
23
84
|
"enum": [
|
|
24
85
|
"GRAPH_COMPLETION",
|
|
86
|
+
"GRAPH_COMPLETION_COT",
|
|
87
|
+
"GRAPH_COMPLETION_CONTEXT_EXTENSION",
|
|
88
|
+
"GRAPH_SUMMARY_COMPLETION",
|
|
89
|
+
"RAG_COMPLETION",
|
|
90
|
+
"TRIPLET_COMPLETION",
|
|
25
91
|
"CHUNKS",
|
|
26
|
-
"
|
|
92
|
+
"CHUNKS_LEXICAL",
|
|
93
|
+
"SUMMARIES",
|
|
94
|
+
"CYPHER",
|
|
95
|
+
"NATURAL_LANGUAGE",
|
|
96
|
+
"TEMPORAL",
|
|
97
|
+
"CODING_RULES",
|
|
98
|
+
"FEELING_LUCKY"
|
|
27
99
|
],
|
|
28
|
-
"description": "Cognee search mode"
|
|
100
|
+
"description": "Cognee search mode (default: FEELING_LUCKY — auto-selects best strategy per query)"
|
|
101
|
+
},
|
|
102
|
+
"deleteMode": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"enum": ["soft", "hard"],
|
|
105
|
+
"description": "Cognee delete mode: 'soft' removes raw data only, 'hard' also removes degree-one graph nodes (default: soft)"
|
|
29
106
|
},
|
|
30
107
|
"maxResults": {
|
|
31
108
|
"type": "number",
|
|
32
|
-
"description": "Max recall results to inject (default: 6)"
|
|
109
|
+
"description": "Max recall results to inject per scope (default: 6)"
|
|
33
110
|
},
|
|
34
111
|
"minScore": {
|
|
35
112
|
"type": "number",
|
|
@@ -37,7 +114,7 @@
|
|
|
37
114
|
},
|
|
38
115
|
"maxTokens": {
|
|
39
116
|
"type": "number",
|
|
40
|
-
"description": "Token cap for recall (default: 512)"
|
|
117
|
+
"description": "Token cap for recall per scope (default: 512)"
|
|
41
118
|
},
|
|
42
119
|
"autoRecall": {
|
|
43
120
|
"type": "boolean",
|
|
@@ -51,9 +128,21 @@
|
|
|
51
128
|
"type": "boolean",
|
|
52
129
|
"description": "Run cognify after new memories are added (default: true)"
|
|
53
130
|
},
|
|
131
|
+
"autoMemify": {
|
|
132
|
+
"type": "boolean",
|
|
133
|
+
"description": "Run memify (graph enrichment) after cognify completes (default: false)"
|
|
134
|
+
},
|
|
54
135
|
"requestTimeoutMs": {
|
|
55
136
|
"type": "number",
|
|
56
137
|
"description": "HTTP timeout in milliseconds for Cognee requests (default: 60000)"
|
|
138
|
+
},
|
|
139
|
+
"ingestionTimeoutMs": {
|
|
140
|
+
"type": "number",
|
|
141
|
+
"description": "HTTP timeout in milliseconds for add/update (ingestion) requests (default: 300000 = 5 min)"
|
|
142
|
+
},
|
|
143
|
+
"searchPrompt": {
|
|
144
|
+
"type": "string",
|
|
145
|
+
"description": "System prompt sent to Cognee to guide search query processing (default: '')"
|
|
57
146
|
}
|
|
58
147
|
}
|
|
59
148
|
},
|
|
@@ -67,13 +156,59 @@
|
|
|
67
156
|
"sensitive": true,
|
|
68
157
|
"placeholder": "${COGNEE_API_KEY}"
|
|
69
158
|
},
|
|
159
|
+
"username": {
|
|
160
|
+
"label": "Username",
|
|
161
|
+
"placeholder": "default_user@example.com"
|
|
162
|
+
},
|
|
163
|
+
"password": {
|
|
164
|
+
"label": "Password",
|
|
165
|
+
"sensitive": true,
|
|
166
|
+
"placeholder": "default_password"
|
|
167
|
+
},
|
|
70
168
|
"datasetName": {
|
|
71
|
-
"label": "Dataset Name",
|
|
169
|
+
"label": "Dataset Name (single-scope)",
|
|
72
170
|
"placeholder": "openclaw"
|
|
73
171
|
},
|
|
172
|
+
"companyDataset": {
|
|
173
|
+
"label": "Company Dataset",
|
|
174
|
+
"placeholder": "my-company"
|
|
175
|
+
},
|
|
176
|
+
"userDatasetPrefix": {
|
|
177
|
+
"label": "User Dataset Prefix",
|
|
178
|
+
"placeholder": "my-project-user"
|
|
179
|
+
},
|
|
180
|
+
"agentDatasetPrefix": {
|
|
181
|
+
"label": "Agent Dataset Prefix",
|
|
182
|
+
"placeholder": "my-project-agent"
|
|
183
|
+
},
|
|
184
|
+
"userId": {
|
|
185
|
+
"label": "User ID",
|
|
186
|
+
"placeholder": "${OPENCLAW_USER_ID}"
|
|
187
|
+
},
|
|
188
|
+
"agentId": {
|
|
189
|
+
"label": "Agent ID",
|
|
190
|
+
"placeholder": "default"
|
|
191
|
+
},
|
|
192
|
+
"recallScopes": {
|
|
193
|
+
"label": "Recall Scopes"
|
|
194
|
+
},
|
|
195
|
+
"defaultWriteScope": {
|
|
196
|
+
"label": "Default Write Scope",
|
|
197
|
+
"placeholder": "agent"
|
|
198
|
+
},
|
|
199
|
+
"enableSessions": {
|
|
200
|
+
"label": "Enable Sessions"
|
|
201
|
+
},
|
|
202
|
+
"persistSessionsAfterEnd": {
|
|
203
|
+
"label": "Persist Sessions"
|
|
204
|
+
},
|
|
74
205
|
"searchType": {
|
|
75
206
|
"label": "Search Type",
|
|
76
|
-
"placeholder": "
|
|
207
|
+
"placeholder": "FEELING_LUCKY"
|
|
208
|
+
},
|
|
209
|
+
"deleteMode": {
|
|
210
|
+
"label": "Delete Mode",
|
|
211
|
+
"placeholder": "soft"
|
|
77
212
|
},
|
|
78
213
|
"maxResults": {
|
|
79
214
|
"label": "Max Results",
|
|
@@ -96,9 +231,16 @@
|
|
|
96
231
|
"autoCognify": {
|
|
97
232
|
"label": "Auto-Cognify"
|
|
98
233
|
},
|
|
234
|
+
"autoMemify": {
|
|
235
|
+
"label": "Auto-Memify"
|
|
236
|
+
},
|
|
99
237
|
"requestTimeoutMs": {
|
|
100
238
|
"label": "Request Timeout (ms)",
|
|
101
239
|
"placeholder": "60000"
|
|
240
|
+
},
|
|
241
|
+
"ingestionTimeoutMs": {
|
|
242
|
+
"label": "Ingestion Timeout (ms)",
|
|
243
|
+
"placeholder": "300000"
|
|
102
244
|
}
|
|
103
245
|
}
|
|
104
|
-
}
|
|
246
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cognee/cognee-openclaw",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.3.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "OpenClaw Cognee-backed memory plugin with auto-recall/capture",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -19,17 +19,36 @@
|
|
|
19
19
|
"build": "tsc",
|
|
20
20
|
"dev": "tsc --watch",
|
|
21
21
|
"clean": "rm -rf dist",
|
|
22
|
-
"typecheck": "tsc --noEmit"
|
|
22
|
+
"typecheck": "tsc --noEmit",
|
|
23
|
+
"test": "jest"
|
|
24
|
+
},
|
|
25
|
+
"jest": {
|
|
26
|
+
"preset": "ts-jest",
|
|
27
|
+
"testEnvironment": "node",
|
|
28
|
+
"transform": {
|
|
29
|
+
"^.+\\.ts$": [
|
|
30
|
+
"ts-jest",
|
|
31
|
+
{
|
|
32
|
+
"useESM": true
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"moduleNameMapper": {
|
|
37
|
+
"^(\\.\\.?/.*)\\.js$": "$1"
|
|
38
|
+
}
|
|
23
39
|
},
|
|
24
40
|
"peerDependencies": {
|
|
25
41
|
"openclaw": ">=2026.2.3-1"
|
|
26
42
|
},
|
|
27
43
|
"devDependencies": {
|
|
44
|
+
"@types/jest": "^30.0.0",
|
|
28
45
|
"@types/node": "^20.0.0",
|
|
46
|
+
"jest": "^30.2.0",
|
|
29
47
|
"openclaw": "2026.2.3-1",
|
|
48
|
+
"ts-jest": "^29.4.6",
|
|
30
49
|
"typescript": "^5.3.0"
|
|
31
50
|
},
|
|
32
51
|
"overrides": {
|
|
33
52
|
"tar": "7.5.7"
|
|
34
53
|
}
|
|
35
|
-
}
|
|
54
|
+
}
|