openclaw-memory-decay 0.1.8 → 0.1.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/README.md +37 -6
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/scripts/detect-python-lib.mjs +5 -1
- package/src/python-env.ts +5 -1
package/README.md
CHANGED
|
@@ -86,17 +86,22 @@ openclaw gateway restart
|
|
|
86
86
|
If you previously installed this plugin from a local checkout via `openclaw plugins install -l .`, migrate to the npm package. Local/path-based installs are now deprecated in favor of the published npm package.
|
|
87
87
|
|
|
88
88
|
```bash
|
|
89
|
-
# 1.
|
|
89
|
+
# 1. Remove the old pre-0.1.8 plugin install if it exists
|
|
90
|
+
openclaw plugins uninstall memory-decay
|
|
91
|
+
|
|
92
|
+
# 2. Install from npm instead
|
|
90
93
|
openclaw plugins install openclaw-memory-decay
|
|
91
94
|
|
|
92
|
-
#
|
|
95
|
+
# 3. Restart gateway
|
|
93
96
|
openclaw gateway restart
|
|
94
97
|
|
|
95
|
-
#
|
|
98
|
+
# 4. Verify
|
|
96
99
|
openclaw plugins list | grep openclaw-memory-decay # should show: openclaw-memory-decay | loaded
|
|
97
100
|
curl -s http://127.0.0.1:8100/health # should show: {"status":"ok","current_tick":0}
|
|
98
101
|
```
|
|
99
102
|
|
|
103
|
+
If the old install is already gone, `openclaw plugins uninstall memory-decay` will simply report that nothing was removed.
|
|
104
|
+
|
|
100
105
|
If auto-detection does not recover your backend path after migration, set the interpreter explicitly:
|
|
101
106
|
|
|
102
107
|
```bash
|
|
@@ -104,6 +109,12 @@ openclaw config set plugins.entries.openclaw-memory-decay.config.pythonPath "~/.
|
|
|
104
109
|
openclaw gateway restart
|
|
105
110
|
```
|
|
106
111
|
|
|
112
|
+
If you are upgrading from an older release, note the plugin id changed from `memory-decay` to `openclaw-memory-decay` in `0.1.8`.
|
|
113
|
+
|
|
114
|
+
- New installs should use `plugins.entries.openclaw-memory-decay`.
|
|
115
|
+
- Older configs under `plugins.entries.memory-decay.config` are still read as a compatibility fallback.
|
|
116
|
+
- For a clean config, migrate to the new key when convenient.
|
|
117
|
+
|
|
107
118
|
**Your memories are safe.** The SQLite database (`memories.db`) is not affected by plugin reinstallation or migration to npm install.
|
|
108
119
|
|
|
109
120
|
To update in the future:
|
|
@@ -136,8 +147,8 @@ Add to `~/.openclaw/openclaw.json` under `plugins.entries.openclaw-memory-decay.
|
|
|
136
147
|
| Option | Default | Description |
|
|
137
148
|
|--------|---------|-------------|
|
|
138
149
|
| `serverPort` | `8100` | Port for the memory-decay HTTP server |
|
|
139
|
-
| `memoryDecayPath` | (auto) | Path to memory-decay-core. Auto-detected from the
|
|
140
|
-
| `pythonPath` | `python3` | Path to Python interpreter. Set this explicitly if you
|
|
150
|
+
| `memoryDecayPath` | (auto) | Path to memory-decay-core. Auto-detected at runtime from the documented default venv or from explicit config |
|
|
151
|
+
| `pythonPath` | `python3` | Path to Python interpreter. Set this explicitly if you do not use `~/.openclaw/venvs/memory-decay` |
|
|
141
152
|
| `dbPath` | `~/.openclaw/memory-decay-data/memories.db` | SQLite database location |
|
|
142
153
|
| `autoSave` | `true` | Auto-save every conversation turn at low importance. Set `false` to let the agent decide what to save |
|
|
143
154
|
| `embeddingProvider` | `local` | Embedding provider: `local`, `openai`, or `gemini` |
|
|
@@ -263,12 +274,32 @@ openclaw plugins install openclaw-memory-decay
|
|
|
263
274
|
curl http://127.0.0.1:8100/health
|
|
264
275
|
```
|
|
265
276
|
|
|
266
|
-
If the import check fails, install the backend into
|
|
277
|
+
If the import check fails, install the backend into the documented default venv path or set `pythonPath` explicitly:
|
|
267
278
|
```bash
|
|
268
279
|
python3 -m venv ~/.openclaw/venvs/memory-decay
|
|
269
280
|
~/.openclaw/venvs/memory-decay/bin/pip install memory-decay
|
|
270
281
|
```
|
|
271
282
|
|
|
283
|
+
If `memory-decay` is only installed in your system Python or in some other venv, the plugin may still fail to auto-detect it. In that case, point the plugin at the exact Python you want it to use:
|
|
284
|
+
|
|
285
|
+
```bash
|
|
286
|
+
openclaw config set plugins.entries.openclaw-memory-decay.config.pythonPath "/absolute/path/to/python"
|
|
287
|
+
openclaw gateway restart
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
Sanity check the exact interpreter before restarting:
|
|
291
|
+
|
|
292
|
+
```bash
|
|
293
|
+
/absolute/path/to/python -c "import memory_decay.server; print('ok')"
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
If you use a different venv path, configure it directly:
|
|
297
|
+
|
|
298
|
+
```bash
|
|
299
|
+
openclaw config set plugins.entries.openclaw-memory-decay.config.pythonPath "/absolute/path/to/venv/bin/python"
|
|
300
|
+
openclaw gateway restart
|
|
301
|
+
```
|
|
302
|
+
|
|
272
303
|
### `error: externally-managed-environment`
|
|
273
304
|
|
|
274
305
|
Your system Python is PEP 668 managed. Install `memory-decay` into a virtualenv instead of the system interpreter:
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -3,6 +3,10 @@ import { existsSync as nodeExistsSync, mkdtempSync, readFileSync, rmSync } from
|
|
|
3
3
|
import { homedir as nodeHomedir, tmpdir } from "node:os";
|
|
4
4
|
import { basename, dirname, isAbsolute, join, resolve } from "node:path";
|
|
5
5
|
|
|
6
|
+
const PYTHON_COMMAND_CANDIDATES = process.platform === "win32"
|
|
7
|
+
? ["python"]
|
|
8
|
+
: ["python3", "python", "python3.13", "python3.12", "python3.11", "python3.10"];
|
|
9
|
+
|
|
6
10
|
function resolvePythonPath(command, { execFileSync = nodeExecFileSync, isWin = process.platform === "win32" } = {}) {
|
|
7
11
|
if (isAbsolute(command)) {
|
|
8
12
|
return command;
|
|
@@ -43,7 +47,7 @@ export function buildPythonCandidates({
|
|
|
43
47
|
pathCandidates.push(join(root, isWin ? ".venv/Scripts/python.exe" : ".venv/bin/python"));
|
|
44
48
|
}
|
|
45
49
|
|
|
46
|
-
const commandCandidates = isWin ? ["python"] :
|
|
50
|
+
const commandCandidates = isWin ? ["python"] : PYTHON_COMMAND_CANDIDATES;
|
|
47
51
|
return [...new Set([
|
|
48
52
|
...pathCandidates.filter((candidate) => existsSync(candidate)),
|
|
49
53
|
...commandCandidates,
|
package/src/python-env.ts
CHANGED
|
@@ -20,6 +20,10 @@ interface DetectPythonEnvOptions {
|
|
|
20
20
|
removeTempDir?: (path: string) => void;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
const PYTHON_COMMAND_CANDIDATES = process.platform === "win32"
|
|
24
|
+
? ["python"]
|
|
25
|
+
: ["python3", "python", "python3.13", "python3.12", "python3.11", "python3.10"];
|
|
26
|
+
|
|
23
27
|
export function mergePythonEnv(
|
|
24
28
|
configured: PythonEnvLike,
|
|
25
29
|
detected: PythonEnvLike = {},
|
|
@@ -73,7 +77,7 @@ export function buildPythonCandidates({
|
|
|
73
77
|
join(root, isWin ? ".venv/Scripts/python.exe" : ".venv/bin/python")),
|
|
74
78
|
].filter((candidate): candidate is string => typeof candidate === "string" && candidate.length > 0 && existsSync(candidate));
|
|
75
79
|
|
|
76
|
-
const commandCandidates = isWin ? ["python"] :
|
|
80
|
+
const commandCandidates = isWin ? ["python"] : PYTHON_COMMAND_CANDIDATES;
|
|
77
81
|
return [...new Set([...pathCandidates, ...commandCandidates])];
|
|
78
82
|
}
|
|
79
83
|
|