memory-braid 0.7.1 → 0.8.0
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 +15 -3
- package/package.json +1 -1
- package/src/index.ts +3 -3
package/README.md
CHANGED
|
@@ -2,9 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
Memory Braid is an OpenClaw `kind: "memory"` plugin that augments local memory search (core/QMD) with Mem0.
|
|
4
4
|
|
|
5
|
+
## Ownership model
|
|
6
|
+
|
|
7
|
+
Memory Braid is intentionally hybrid, but not with shared ownership.
|
|
8
|
+
|
|
9
|
+
- OpenClaw prompt context + compaction are the source of truth for the live session.
|
|
10
|
+
- Core/QMD is the source of truth for written documents, notes, and canonical project knowledge.
|
|
11
|
+
- Mem0 is the source of truth for learned cross-session memory such as preferences, recurring decisions, and procedural learnings.
|
|
12
|
+
|
|
13
|
+
The goal is hybrid retrieval with single ownership per memory class. Memory Braid should not re-own markdown knowledge, and Mem0 should not be treated as the canonical store for documents.
|
|
14
|
+
|
|
5
15
|
## Features
|
|
6
16
|
|
|
7
|
-
- Hybrid recall: local memory + Mem0, merged with weighted RRF.
|
|
17
|
+
- Hybrid recall with split ownership: local memory + Mem0, merged with weighted RRF.
|
|
8
18
|
- Layered Mem0 memory: episodic captures, semantic compendium memories, and procedural agent learnings.
|
|
9
19
|
- Capture-first Mem0 memory: plugin writes only captured memories to Mem0 (no markdown/session indexing).
|
|
10
20
|
- Capture pipeline modes: `local`, `hybrid`, `ml`.
|
|
@@ -99,7 +109,9 @@ Migration:
|
|
|
99
109
|
|
|
100
110
|
- If you relied on bootstrap/reconcile mirroring, pin to `<0.4.0`.
|
|
101
111
|
- For `0.4.0+`, remove `bootstrap` and `reconcile` from your plugin config.
|
|
102
|
-
- Keep
|
|
112
|
+
- Keep OpenClaw prompt context as the source of truth for the live session.
|
|
113
|
+
- Keep core/QMD as the source of truth for markdown and canonical written knowledge.
|
|
114
|
+
- Use Memory Braid + Mem0 for learned cross-session memory, consolidation, and lifecycle management.
|
|
103
115
|
|
|
104
116
|
## Install
|
|
105
117
|
|
|
@@ -110,7 +122,7 @@ On the target machine:
|
|
|
110
122
|
1. Install from npm:
|
|
111
123
|
|
|
112
124
|
```bash
|
|
113
|
-
openclaw plugins install memory-braid@0.
|
|
125
|
+
openclaw plugins install memory-braid@0.8.0
|
|
114
126
|
```
|
|
115
127
|
|
|
116
128
|
2. Rebuild native dependencies inside the installed extension:
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -2911,13 +2911,13 @@ const memoryBraidPlugin = {
|
|
|
2911
2911
|
}
|
|
2912
2912
|
});
|
|
2913
2913
|
|
|
2914
|
-
api.on("
|
|
2914
|
+
api.on("before_prompt_build", async (event, ctx) => {
|
|
2915
2915
|
const runId = log.newRunId();
|
|
2916
2916
|
const scope = resolveRuntimeScopeFromHookContext(ctx);
|
|
2917
2917
|
const persistentScope = resolvePersistentScopeFromHookContext(ctx);
|
|
2918
2918
|
const legacyScope = resolveLegacySessionScopeFromHookContext(ctx);
|
|
2919
2919
|
const baseResult = {
|
|
2920
|
-
|
|
2920
|
+
prependSystemContext: REMEMBER_LEARNING_SYSTEM_PROMPT,
|
|
2921
2921
|
};
|
|
2922
2922
|
if (isExcludedAutoMemorySession(ctx.sessionKey)) {
|
|
2923
2923
|
log.debug("memory_braid.search.skip", {
|
|
@@ -3048,7 +3048,7 @@ const memoryBraidPlugin = {
|
|
|
3048
3048
|
});
|
|
3049
3049
|
|
|
3050
3050
|
return {
|
|
3051
|
-
|
|
3051
|
+
prependSystemContext: REMEMBER_LEARNING_SYSTEM_PROMPT,
|
|
3052
3052
|
prependContext,
|
|
3053
3053
|
};
|
|
3054
3054
|
});
|