@lanonasis/recall-forge 1.1.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/.claw/skills/SKILL.md +347 -0
- package/CHANGELOG.md +162 -0
- package/LICENSE +21 -0
- package/README.md +302 -0
- package/SETUP.md +190 -0
- package/dist/cli-common.d.ts +25 -0
- package/dist/cli-common.js +338 -0
- package/dist/cli-memory.d.ts +6 -0
- package/dist/cli-memory.js +146 -0
- package/dist/cli.d.ts +7 -0
- package/dist/cli.js +135 -0
- package/dist/client.d.ts +116 -0
- package/dist/client.js +643 -0
- package/dist/config.d.ts +41 -0
- package/dist/config.js +125 -0
- package/dist/enrichment/capture-filter.d.ts +4 -0
- package/dist/enrichment/capture-filter.js +44 -0
- package/dist/enrichment/prompt-safety.d.ts +13 -0
- package/dist/enrichment/prompt-safety.js +83 -0
- package/dist/enrichment/tag-extractor.d.ts +1 -0
- package/dist/enrichment/tag-extractor.js +47 -0
- package/dist/enrichment/type-detector.d.ts +2 -0
- package/dist/enrichment/type-detector.js +95 -0
- package/dist/extraction/cli-extract.d.ts +8 -0
- package/dist/extraction/cli-extract.js +66 -0
- package/dist/extraction/format-adapters.d.ts +8 -0
- package/dist/extraction/format-adapters.js +268 -0
- package/dist/extraction/index.d.ts +7 -0
- package/dist/extraction/index.js +7 -0
- package/dist/extraction/jsonl-extractor.d.ts +32 -0
- package/dist/extraction/jsonl-extractor.js +207 -0
- package/dist/extraction/markdown-extractor.d.ts +23 -0
- package/dist/extraction/markdown-extractor.js +228 -0
- package/dist/extraction/secret-redactor.d.ts +7 -0
- package/dist/extraction/secret-redactor.js +112 -0
- package/dist/extraction/sqlite-extractor.d.ts +15 -0
- package/dist/extraction/sqlite-extractor.js +245 -0
- package/dist/extraction/types.d.ts +50 -0
- package/dist/extraction/types.js +1 -0
- package/dist/hooks/capture.d.ts +23 -0
- package/dist/hooks/capture.js +162 -0
- package/dist/hooks/context-engine.d.ts +4 -0
- package/dist/hooks/context-engine.js +54 -0
- package/dist/hooks/local-fallback.d.ts +5 -0
- package/dist/hooks/local-fallback.js +31 -0
- package/dist/hooks/recall.d.ts +21 -0
- package/dist/hooks/recall.js +123 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +103 -0
- package/dist/plugin-sdk-stub.d.ts +53 -0
- package/dist/plugin-sdk-stub.js +3 -0
- package/dist/privacy/privacy-guard.d.ts +33 -0
- package/dist/privacy/privacy-guard.js +130 -0
- package/dist/privacy/privacy-log.d.ts +6 -0
- package/dist/privacy/privacy-log.js +44 -0
- package/dist/tools/memory-forget.d.ts +3 -0
- package/dist/tools/memory-forget.js +109 -0
- package/dist/tools/memory-get.d.ts +3 -0
- package/dist/tools/memory-get.js +46 -0
- package/dist/tools/memory-search.d.ts +4 -0
- package/dist/tools/memory-search.js +95 -0
- package/dist/tools/memory-store.d.ts +5 -0
- package/dist/tools/memory-store.js +199 -0
- package/openclaw.plugin.json +315 -0
- package/package.json +90 -0
- package/setup/agents-memory.md +63 -0
- package/setup/heartbeat-memory.md +53 -0
- package/setup/install.sh +179 -0
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "recall-forge",
|
|
3
|
+
"kind": "memory",
|
|
4
|
+
"name": "RecallForge",
|
|
5
|
+
"version": "1.1.0",
|
|
6
|
+
"description": "Secret-safe memory and context engine for OpenClaw. Fills both memory and contextEngine slots with tiered semantic recall, credential redaction (30+ patterns), PII masking, and prompt injection protection.",
|
|
7
|
+
"uiHints": {
|
|
8
|
+
"apiKey": {
|
|
9
|
+
"label": "LanOnasis API Key",
|
|
10
|
+
"sensitive": true,
|
|
11
|
+
"placeholder": "lan_...",
|
|
12
|
+
"help": "API key from LanOnasis dashboard (or use ${LANONASIS_API_KEY})"
|
|
13
|
+
},
|
|
14
|
+
"baseUrl": {
|
|
15
|
+
"label": "API Base URL",
|
|
16
|
+
"advanced": true,
|
|
17
|
+
"placeholder": "https://api.lanonasis.com"
|
|
18
|
+
},
|
|
19
|
+
"projectId": {
|
|
20
|
+
"label": "Project ID",
|
|
21
|
+
"help": "Dedicated project per OpenClaw install (or use ${LANONASIS_PROJECT_ID})"
|
|
22
|
+
},
|
|
23
|
+
"agentId": {
|
|
24
|
+
"label": "Agent ID",
|
|
25
|
+
"help": "Tags memories with this agent_id (default: main)"
|
|
26
|
+
},
|
|
27
|
+
"autoRecall": {
|
|
28
|
+
"label": "Auto-Recall",
|
|
29
|
+
"help": "Inject relevant memories before each session"
|
|
30
|
+
},
|
|
31
|
+
"recallMode": {
|
|
32
|
+
"label": "Recall Mode",
|
|
33
|
+
"help": "auto: inject memories automatically on each session start. ondemand: disable auto-injection \u2014 use memory_search manually instead. Recommended for Ollama and small-context models."
|
|
34
|
+
},
|
|
35
|
+
"maxRecallChars": {
|
|
36
|
+
"label": "Max Recall Chars",
|
|
37
|
+
"advanced": true,
|
|
38
|
+
"placeholder": "1500",
|
|
39
|
+
"help": "Hard cap on total injected recall characters. Default: 1500. Ollama / small-context users should set 400\u2013600."
|
|
40
|
+
},
|
|
41
|
+
"captureMode": {
|
|
42
|
+
"label": "Capture Mode",
|
|
43
|
+
"help": "auto: capture all, hybrid: stricter, explicit: manual only"
|
|
44
|
+
},
|
|
45
|
+
"localFallback": {
|
|
46
|
+
"label": "Local Fallback",
|
|
47
|
+
"help": "Write Markdown copies to workspace/memory/"
|
|
48
|
+
},
|
|
49
|
+
"searchThreshold": {
|
|
50
|
+
"label": "Search Threshold",
|
|
51
|
+
"advanced": true,
|
|
52
|
+
"placeholder": "0.75"
|
|
53
|
+
},
|
|
54
|
+
"dedupeThreshold": {
|
|
55
|
+
"label": "Dedup Threshold",
|
|
56
|
+
"advanced": true,
|
|
57
|
+
"placeholder": "0.985",
|
|
58
|
+
"help": "Similarity threshold used by memory_store duplicate detection"
|
|
59
|
+
},
|
|
60
|
+
"maxRecallResults": {
|
|
61
|
+
"label": "Max Recall Results",
|
|
62
|
+
"advanced": true,
|
|
63
|
+
"placeholder": "5"
|
|
64
|
+
},
|
|
65
|
+
"memoryMode": {
|
|
66
|
+
"label": "Memory Mode",
|
|
67
|
+
"help": "remote: cloud only, local: filesystem only, hybrid: both with cloud primary"
|
|
68
|
+
},
|
|
69
|
+
"sharedNamespace": {
|
|
70
|
+
"label": "Shared Namespace",
|
|
71
|
+
"help": "Namespace for cross-agent shared memory (leave empty to disable shared recall)"
|
|
72
|
+
},
|
|
73
|
+
"syncMode": {
|
|
74
|
+
"label": "Sync Mode",
|
|
75
|
+
"advanced": true,
|
|
76
|
+
"help": "realtime: immediate writes, batch: deferred, manual: explicit only"
|
|
77
|
+
},
|
|
78
|
+
"queueOnFailure": {
|
|
79
|
+
"label": "Queue On Failure",
|
|
80
|
+
"advanced": true,
|
|
81
|
+
"help": "Queue writes locally when cloud API is unavailable"
|
|
82
|
+
},
|
|
83
|
+
"autoIndexOnFirstUse": {
|
|
84
|
+
"label": "Auto-Index On First Use",
|
|
85
|
+
"advanced": true,
|
|
86
|
+
"help": "Bootstrap agent memory index on first session"
|
|
87
|
+
},
|
|
88
|
+
"extractSourceFormats": {
|
|
89
|
+
"label": "Extract Source Formats",
|
|
90
|
+
"advanced": true,
|
|
91
|
+
"help": "Formats accepted by the extract CLI (openclaw-session, markdown, sqlite, etc.)"
|
|
92
|
+
},
|
|
93
|
+
"embeddingProvider": {
|
|
94
|
+
"label": "Embedding Provider",
|
|
95
|
+
"advanced": true,
|
|
96
|
+
"help": "Provider for vector embeddings (e.g. openai, ollama, lanonasis)"
|
|
97
|
+
},
|
|
98
|
+
"embeddingModel": {
|
|
99
|
+
"label": "Embedding Model",
|
|
100
|
+
"advanced": true,
|
|
101
|
+
"help": "Model name for store-time embeddings (e.g. text-embedding-3-small, nomic-embed-text)"
|
|
102
|
+
},
|
|
103
|
+
"queryEmbeddingModel": {
|
|
104
|
+
"label": "Query Embedding Model",
|
|
105
|
+
"advanced": true,
|
|
106
|
+
"help": "Model for query-time embeddings (defaults to embeddingModel if unset)"
|
|
107
|
+
},
|
|
108
|
+
"embeddingDimensions": {
|
|
109
|
+
"label": "Embedding Dimensions",
|
|
110
|
+
"advanced": true,
|
|
111
|
+
"help": "Vector dimension count (0 = provider default)"
|
|
112
|
+
},
|
|
113
|
+
"embeddingProfileId": {
|
|
114
|
+
"label": "Embedding Profile ID",
|
|
115
|
+
"advanced": true,
|
|
116
|
+
"help": "Stamped into stored metadata for mismatch detection"
|
|
117
|
+
},
|
|
118
|
+
"privacyMode": {
|
|
119
|
+
"label": "Privacy Mode",
|
|
120
|
+
"help": "off: credentials only, detect: scan PII and tag (no masking), mask: redact credentials + mask PII (default)"
|
|
121
|
+
},
|
|
122
|
+
"privacyLocale": {
|
|
123
|
+
"label": "Privacy Locale",
|
|
124
|
+
"advanced": true,
|
|
125
|
+
"placeholder": "US",
|
|
126
|
+
"help": "Locale used for PII detection rules (US, GB, EU, etc.)"
|
|
127
|
+
},
|
|
128
|
+
"privacyNotifyUrl": {
|
|
129
|
+
"label": "Privacy Notify URL",
|
|
130
|
+
"advanced": true,
|
|
131
|
+
"sensitive": true,
|
|
132
|
+
"placeholder": "https://...",
|
|
133
|
+
"help": "Webhook endpoint for privacy intervention events (fire-and-forget). Leave empty to disable."
|
|
134
|
+
},
|
|
135
|
+
"defaultChannel": {
|
|
136
|
+
"label": "Default Channel",
|
|
137
|
+
"advanced": true,
|
|
138
|
+
"placeholder": "openclaw",
|
|
139
|
+
"help": "Channel identifier stored in captured memory metadata (or use ${LANONASIS_DEFAULT_CHANNEL})"
|
|
140
|
+
},
|
|
141
|
+
"cacheTtlMs": {
|
|
142
|
+
"label": "Cache TTL (ms)",
|
|
143
|
+
"advanced": true,
|
|
144
|
+
"placeholder": "60000",
|
|
145
|
+
"help": "Client-side search/list cache TTL in milliseconds (default: 60000)"
|
|
146
|
+
},
|
|
147
|
+
"cacheMaxSize": {
|
|
148
|
+
"label": "Cache Max Size",
|
|
149
|
+
"advanced": true,
|
|
150
|
+
"placeholder": "50",
|
|
151
|
+
"help": "Maximum number of cached responses (default: 50)"
|
|
152
|
+
},
|
|
153
|
+
"rateLimitMaxReq": {
|
|
154
|
+
"label": "Rate Limit Max Requests",
|
|
155
|
+
"advanced": true,
|
|
156
|
+
"placeholder": "60",
|
|
157
|
+
"help": "Maximum API requests per rate limit window (default: 60)"
|
|
158
|
+
},
|
|
159
|
+
"rateLimitWindowMs": {
|
|
160
|
+
"label": "Rate Limit Window (ms)",
|
|
161
|
+
"advanced": true,
|
|
162
|
+
"placeholder": "60000",
|
|
163
|
+
"help": "Rate limit rolling window in milliseconds (default: 60000)"
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"configSchema": {
|
|
167
|
+
"type": "object",
|
|
168
|
+
"additionalProperties": false,
|
|
169
|
+
"properties": {
|
|
170
|
+
"apiKey": {
|
|
171
|
+
"type": "string"
|
|
172
|
+
},
|
|
173
|
+
"baseUrl": {
|
|
174
|
+
"type": "string"
|
|
175
|
+
},
|
|
176
|
+
"projectId": {
|
|
177
|
+
"type": "string"
|
|
178
|
+
},
|
|
179
|
+
"agentId": {
|
|
180
|
+
"type": "string"
|
|
181
|
+
},
|
|
182
|
+
"autoRecall": {
|
|
183
|
+
"type": "boolean"
|
|
184
|
+
},
|
|
185
|
+
"recallMode": {
|
|
186
|
+
"type": "string",
|
|
187
|
+
"enum": [
|
|
188
|
+
"auto",
|
|
189
|
+
"ondemand"
|
|
190
|
+
]
|
|
191
|
+
},
|
|
192
|
+
"maxRecallChars": {
|
|
193
|
+
"type": "number",
|
|
194
|
+
"minimum": 100
|
|
195
|
+
},
|
|
196
|
+
"captureMode": {
|
|
197
|
+
"type": "string",
|
|
198
|
+
"enum": [
|
|
199
|
+
"auto",
|
|
200
|
+
"explicit",
|
|
201
|
+
"hybrid"
|
|
202
|
+
]
|
|
203
|
+
},
|
|
204
|
+
"localFallback": {
|
|
205
|
+
"type": "boolean"
|
|
206
|
+
},
|
|
207
|
+
"searchThreshold": {
|
|
208
|
+
"type": "number",
|
|
209
|
+
"minimum": 0,
|
|
210
|
+
"maximum": 1
|
|
211
|
+
},
|
|
212
|
+
"dedupeThreshold": {
|
|
213
|
+
"type": "number",
|
|
214
|
+
"minimum": 0,
|
|
215
|
+
"maximum": 1
|
|
216
|
+
},
|
|
217
|
+
"maxRecallResults": {
|
|
218
|
+
"type": "number",
|
|
219
|
+
"minimum": 1,
|
|
220
|
+
"maximum": 20
|
|
221
|
+
},
|
|
222
|
+
"memoryMode": {
|
|
223
|
+
"type": "string",
|
|
224
|
+
"enum": [
|
|
225
|
+
"remote",
|
|
226
|
+
"local",
|
|
227
|
+
"hybrid"
|
|
228
|
+
]
|
|
229
|
+
},
|
|
230
|
+
"sharedNamespace": {
|
|
231
|
+
"type": "string"
|
|
232
|
+
},
|
|
233
|
+
"syncMode": {
|
|
234
|
+
"type": "string",
|
|
235
|
+
"enum": [
|
|
236
|
+
"realtime",
|
|
237
|
+
"batch",
|
|
238
|
+
"manual"
|
|
239
|
+
]
|
|
240
|
+
},
|
|
241
|
+
"queueOnFailure": {
|
|
242
|
+
"type": "boolean"
|
|
243
|
+
},
|
|
244
|
+
"autoIndexOnFirstUse": {
|
|
245
|
+
"type": "boolean"
|
|
246
|
+
},
|
|
247
|
+
"extractSourceFormats": {
|
|
248
|
+
"type": "array",
|
|
249
|
+
"items": {
|
|
250
|
+
"type": "string"
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
"embeddingProvider": {
|
|
254
|
+
"type": "string"
|
|
255
|
+
},
|
|
256
|
+
"embeddingModel": {
|
|
257
|
+
"type": "string"
|
|
258
|
+
},
|
|
259
|
+
"queryEmbeddingModel": {
|
|
260
|
+
"type": "string"
|
|
261
|
+
},
|
|
262
|
+
"embeddingDimensions": {
|
|
263
|
+
"type": "number",
|
|
264
|
+
"minimum": 0
|
|
265
|
+
},
|
|
266
|
+
"embeddingProfileId": {
|
|
267
|
+
"type": "string"
|
|
268
|
+
},
|
|
269
|
+
"privacyMode": {
|
|
270
|
+
"type": "string",
|
|
271
|
+
"enum": ["off", "detect", "mask"]
|
|
272
|
+
},
|
|
273
|
+
"privacyLocale": {
|
|
274
|
+
"type": "string"
|
|
275
|
+
},
|
|
276
|
+
"privacyNotifyUrl": {
|
|
277
|
+
"type": "string"
|
|
278
|
+
},
|
|
279
|
+
"defaultChannel": {
|
|
280
|
+
"type": "string"
|
|
281
|
+
},
|
|
282
|
+
"cacheTtlMs": {
|
|
283
|
+
"type": "number",
|
|
284
|
+
"minimum": 1000
|
|
285
|
+
},
|
|
286
|
+
"cacheMaxSize": {
|
|
287
|
+
"type": "number",
|
|
288
|
+
"minimum": 1
|
|
289
|
+
},
|
|
290
|
+
"rateLimitMaxReq": {
|
|
291
|
+
"type": "number",
|
|
292
|
+
"minimum": 1
|
|
293
|
+
},
|
|
294
|
+
"rateLimitWindowMs": {
|
|
295
|
+
"type": "number",
|
|
296
|
+
"minimum": 1000
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
"required": []
|
|
300
|
+
},
|
|
301
|
+
"slots": [
|
|
302
|
+
"memory",
|
|
303
|
+
"contextEngine"
|
|
304
|
+
],
|
|
305
|
+
"skills": [
|
|
306
|
+
".claw/skills"
|
|
307
|
+
],
|
|
308
|
+
"metadata": {
|
|
309
|
+
"openclaw": {
|
|
310
|
+
"requires": {
|
|
311
|
+
"config": ["apiKey", "projectId"]
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@lanonasis/recall-forge",
|
|
3
|
+
"version": "1.1.1",
|
|
4
|
+
"description": "RecallForge — secret-safe memory and context engine plugin for OpenClaw. Fills both memory and contextEngine slots with tiered semantic recall, 30+ pattern credential redaction, and prompt injection protection.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=20"
|
|
9
|
+
},
|
|
10
|
+
"main": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": "./dist/index.js",
|
|
14
|
+
"./extraction": "./dist/extraction/index.js"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"README.md",
|
|
18
|
+
"CHANGELOG.md",
|
|
19
|
+
"LICENSE",
|
|
20
|
+
"dist/",
|
|
21
|
+
"openclaw.plugin.json",
|
|
22
|
+
"SETUP.md",
|
|
23
|
+
"setup/",
|
|
24
|
+
".claw/"
|
|
25
|
+
],
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@lanonasis/privacy-sdk": "^1.0.0",
|
|
28
|
+
"undici": "^7.24.6"
|
|
29
|
+
},
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"openclaw": "latest"
|
|
32
|
+
},
|
|
33
|
+
"peerDependenciesMeta": {
|
|
34
|
+
"openclaw": {
|
|
35
|
+
"optional": true
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"typescript": "^5.9.3",
|
|
40
|
+
"vitest": "^4.1.0"
|
|
41
|
+
},
|
|
42
|
+
"scripts": {
|
|
43
|
+
"clean": "rm -rf dist",
|
|
44
|
+
"build": "npm run clean && tsc -p tsconfig.build.json",
|
|
45
|
+
"prepack": "npm run build",
|
|
46
|
+
"prepublishOnly": "npm run typecheck && npm run test",
|
|
47
|
+
"typecheck": "tsc --noEmit --skipLibCheck",
|
|
48
|
+
"test": "vitest run",
|
|
49
|
+
"pack:dry-run": "npm pack --dry-run",
|
|
50
|
+
"verify:release": "npm run typecheck && npm run test && npm run build && npm run pack:dry-run",
|
|
51
|
+
"migrate": "node --import tsx migrate.ts"
|
|
52
|
+
},
|
|
53
|
+
"repository": {
|
|
54
|
+
"type": "git",
|
|
55
|
+
"url": "https://github.com/thefixer3x/lan-onasis-monorepo.git",
|
|
56
|
+
"directory": "packages/recall-forge"
|
|
57
|
+
},
|
|
58
|
+
"homepage": "https://github.com/lanonasis/lanonasis-maas/tree/main/packages/recall-forge#readme",
|
|
59
|
+
"bugs": {
|
|
60
|
+
"url": "https://github.com/lanonasis/lanonasis-maas/issues"
|
|
61
|
+
},
|
|
62
|
+
"publishConfig": {
|
|
63
|
+
"access": "public"
|
|
64
|
+
},
|
|
65
|
+
"keywords": [
|
|
66
|
+
"openclaw",
|
|
67
|
+
"openclaw-plugin",
|
|
68
|
+
"memory",
|
|
69
|
+
"context-engine",
|
|
70
|
+
"plugin",
|
|
71
|
+
"lanonasis",
|
|
72
|
+
"recall-forge",
|
|
73
|
+
"neuro-forge",
|
|
74
|
+
"semantic-search",
|
|
75
|
+
"secret-protection",
|
|
76
|
+
"credential-redaction",
|
|
77
|
+
"privacy-first",
|
|
78
|
+
"memory-safety",
|
|
79
|
+
"context-protection"
|
|
80
|
+
],
|
|
81
|
+
"openclaw": {
|
|
82
|
+
"extensions": [
|
|
83
|
+
"./dist/index.js"
|
|
84
|
+
],
|
|
85
|
+
"slots": [
|
|
86
|
+
"memory",
|
|
87
|
+
"contextEngine"
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# RecallForge — AGENTS.md Snippet
|
|
2
|
+
|
|
3
|
+
Paste this section into your workspace AGENTS.md to declare RecallForge memory tools as always-available capabilities. These tools are registered by the `recall-forge` plugin and do NOT require the `optional` flag — they are persistent by default.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Memory Tools (RecallForge / LanOnasis MaaS)
|
|
8
|
+
|
|
9
|
+
You have access to cloud-backed semantic memory via RecallForge. All content stored or retrieved passes through secret redaction — credentials, tokens, and connection strings are never written to memory storage.
|
|
10
|
+
|
|
11
|
+
### Available Tools
|
|
12
|
+
|
|
13
|
+
| Tool | Purpose | When to Use |
|
|
14
|
+
|------|---------|-------------|
|
|
15
|
+
| `memory_search` | Semantic search through stored memories | Before starting work — check what you already know about this topic |
|
|
16
|
+
| `memory_store` | Store a new memory or update an existing one | After discovering insights, decisions, or patterns worth preserving |
|
|
17
|
+
| `memory_get` | Fetch full memory content by ID | When search results show a relevant memory you need in full |
|
|
18
|
+
| `memory_forget` | Delete a memory by ID or semantic query | When a memory is outdated, wrong, or superseded |
|
|
19
|
+
|
|
20
|
+
### Memory Workflow
|
|
21
|
+
|
|
22
|
+
1. **Recall before acting** — At session start, `memory_search` for context related to the current workspace and task. This prevents re-learning what was already established.
|
|
23
|
+
2. **Capture during work** — When you make architectural decisions, solve non-obvious bugs, or discover project conventions, use `memory_store` to persist them.
|
|
24
|
+
3. **Deduplicate automatically** — `memory_store` checks for 0.985+ similarity duplicates before creating a new memory. When called with an `id`, it updates that memory directly.
|
|
25
|
+
4. **Forget stale knowledge** — If you discover a stored memory is wrong or outdated, use `memory_forget` to clean it up.
|
|
26
|
+
|
|
27
|
+
### Memory Types
|
|
28
|
+
|
|
29
|
+
When storing, the type is auto-detected but you can override:
|
|
30
|
+
- `context` — Session context, current task state
|
|
31
|
+
- `project` — Project-specific conventions, architecture decisions
|
|
32
|
+
- `knowledge` — Reusable technical knowledge
|
|
33
|
+
- `reference` — External references, documentation links
|
|
34
|
+
- `personal` — User preferences, workflow habits
|
|
35
|
+
- `workflow` — Process patterns, command sequences
|
|
36
|
+
|
|
37
|
+
### Secret Protection
|
|
38
|
+
|
|
39
|
+
RecallForge redacts 30+ credential patterns before any content is stored or injected into context. You do not need to manually sanitize content before calling `memory_store`. If a stored memory shows `[REDACTED_<TYPE>]`, that value was a detected secret and was intentionally removed.
|
|
40
|
+
|
|
41
|
+
### Constraints
|
|
42
|
+
|
|
43
|
+
- Memories are scoped to the configured project ID and agent ID
|
|
44
|
+
- Context engine injects relevant memories into the prompt window on demand
|
|
45
|
+
- Auto-recall also injects memories before each session (configurable via `recallMode`)
|
|
46
|
+
- `maxRecallChars` caps the total injected block size
|
|
47
|
+
|
|
48
|
+
### Small-Context / Ollama Users — On-Demand Mode
|
|
49
|
+
|
|
50
|
+
For models with < 8K context, disable automatic recall injection:
|
|
51
|
+
|
|
52
|
+
**Plugin config:**
|
|
53
|
+
```json
|
|
54
|
+
"recallMode": "ondemand",
|
|
55
|
+
"maxRecallChars": 500,
|
|
56
|
+
"searchThreshold": 0.80,
|
|
57
|
+
"maxRecallResults": 3
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**Add to your AGENTS.md session start instruction:**
|
|
61
|
+
> At the start of every session, call `memory_search` with a short query describing the current task before doing anything else. Example: `memory_search("current project conventions and recent decisions")`.
|
|
62
|
+
|
|
63
|
+
On-demand mode keeps all four tools available — only the automatic pre-session injection is disabled.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# RecallForge — HEARTBEAT.md Snippet
|
|
2
|
+
|
|
3
|
+
Paste this section into your workspace HEARTBEAT.md to add periodic MaaS health monitoring.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## RecallForge Health
|
|
8
|
+
|
|
9
|
+
Check LanOnasis MaaS connectivity and memory stats:
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
openclaw recall status
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Expected: `Status: ok | v1.0.0 | project: <project-id>`
|
|
16
|
+
|
|
17
|
+
If status returns an error:
|
|
18
|
+
|
|
19
|
+
| Error | Cause | Action |
|
|
20
|
+
|-------|-------|--------|
|
|
21
|
+
| `ETIMEDOUT` | Network issue or DNS resolution failure | Plugin forces IPv4 via undici — restart the agent if it persists |
|
|
22
|
+
| `401 Unauthorized` | API key expired or revoked | Regenerate at the LanOnasis dashboard, update `openclaw.json` |
|
|
23
|
+
| `503 Service Unavailable` | MaaS backend down | Local fallback active — memories written to `workspace/memory/YYYY-MM-DD.md` |
|
|
24
|
+
|
|
25
|
+
### Memory Stats Check
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
openclaw recall stats
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Monitor for:
|
|
32
|
+
- Memory count trending upward (healthy capture)
|
|
33
|
+
- No memories added in 7+ days (capture may be broken or `captureMode` is `explicit`)
|
|
34
|
+
- Type distribution — mostly `context` suggests capture filter is too loose
|
|
35
|
+
|
|
36
|
+
### Context Engine Check
|
|
37
|
+
|
|
38
|
+
When the agent loads, confirm both slots appear in the startup log:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
[recall-forge] Ready — slots: memory+contextEngine | ...
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
If `contextEngine` is missing from the log, check that `"contextEngine": "recall-forge"` is declared in your `plugins.slots` config.
|
|
45
|
+
|
|
46
|
+
### Alert Conditions
|
|
47
|
+
|
|
48
|
+
| Condition | Severity | Action |
|
|
49
|
+
|-----------|----------|--------|
|
|
50
|
+
| MaaS unreachable for 3+ heartbeats | WARN | Check network, verify API key |
|
|
51
|
+
| Zero memories stored in 7+ days | INFO | Review `captureMode`, check hooks |
|
|
52
|
+
| Memory count > 1000 with no cleanup | INFO | Consider archival or type-based pruning |
|
|
53
|
+
| `[recall-forge]` not in plugin startup log | ERROR | Plugin may not have loaded — check `openclaw.json` and `allow` list |
|