opencode-mempalace-persistence 1.2.1 → 1.2.3
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 +6 -5
- package/dist/index.js +3 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -106,17 +106,18 @@ This is loaded automatically at session start via `instructions` in opencode.jso
|
|
|
106
106
|
|
|
107
107
|
### 5. (Optional) Auto-inject memory context
|
|
108
108
|
|
|
109
|
-
By default, the model must search MemPalace on its own via AGENTS.md instructions. For models with poor tool-use discipline, enable auto-injection — the plugin injects identity + relevant memories directly into the prompt
|
|
109
|
+
By default, the model must search MemPalace on its own via AGENTS.md instructions. For models with poor tool-use discipline, enable auto-injection — the plugin injects identity + relevant memories directly into the prompt.
|
|
110
|
+
|
|
111
|
+
Create `~/.mempalace/plugin-config.json`:
|
|
110
112
|
|
|
111
113
|
```json
|
|
112
114
|
{
|
|
113
|
-
"
|
|
114
|
-
"mempalace": {
|
|
115
|
-
"autoInjectContext": true
|
|
116
|
-
}
|
|
115
|
+
"autoInjectContext": true
|
|
117
116
|
}
|
|
118
117
|
```
|
|
119
118
|
|
|
119
|
+
**Do NOT put this in `opencode.json`** — OpenCode's schema validation rejects unknown keys. The plugin reads its config from `~/.mempalace/plugin-config.json` instead.
|
|
120
|
+
|
|
120
121
|
When enabled, on every user message:
|
|
121
122
|
- **First message**: Injects your identity from `~/.mempalace/identity.txt`
|
|
122
123
|
- **Every message**: Runs `mempalace search` and injects relevant results
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ const VENV_PYTHON = join(HOME, ".local/share/pipx/venvs/mempalace/bin/python3");
|
|
|
8
8
|
const MEMPALACE_BIN = join(HOME, ".local/bin/mempalace");
|
|
9
9
|
const OPENCODE_DB = join(HOME, ".local/share/opencode/opencode.db");
|
|
10
10
|
const STATE_FILE = join(HOME, ".mempalace/sync_state.json");
|
|
11
|
-
const
|
|
11
|
+
const PLUGIN_CONFIG = join(HOME, ".mempalace/plugin-config.json");
|
|
12
12
|
const IDENTITY_FILE = join(HOME, ".mempalace/identity.txt");
|
|
13
13
|
const OUT_DIR = "/tmp/oc-sessions";
|
|
14
14
|
const TMP_SCRIPT = "/tmp/oc-plugin-query.py";
|
|
@@ -45,9 +45,8 @@ function hasText(parts) {
|
|
|
45
45
|
}
|
|
46
46
|
function isAutoInjectEnabled() {
|
|
47
47
|
try {
|
|
48
|
-
const raw = readFileSync(
|
|
49
|
-
|
|
50
|
-
return !!cfg?.mempalace?.autoInjectContext;
|
|
48
|
+
const raw = readFileSync(PLUGIN_CONFIG, "utf-8");
|
|
49
|
+
return !!JSON.parse(raw)?.autoInjectContext;
|
|
51
50
|
}
|
|
52
51
|
catch {
|
|
53
52
|
return false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-mempalace-persistence",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "OpenCode plugin — auto-sync conversations to MemPalace memory in real-time. No forced wings, KG extraction via MCP tools.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|