opencode-mempalace 0.1.0 → 0.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/README.md +67 -0
- package/package.json +3 -2
package/README.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# opencode-mempalace
|
|
2
|
+
|
|
3
|
+
OpenCode plugin for the [MemPalace](https://github.com/milla-jovovich/mempalace) memory system — a structured, persistent memory architecture for AI agents.
|
|
4
|
+
|
|
5
|
+
Auto-registers the MemPalace MCP server, injects the memory protocol into the system prompt, and loads context on session start.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Add to your OpenCode config (~/.config/opencode/opencode.jsonc)
|
|
11
|
+
{
|
|
12
|
+
"plugin": ["opencode-mempalace"]
|
|
13
|
+
}
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Requires the mempalace-js MCP server and a running [ChromaDB](https://www.trychroma.com/) instance.
|
|
17
|
+
|
|
18
|
+
## What it does
|
|
19
|
+
|
|
20
|
+
1. **MCP auto-registration** — Adds the mempalace MCP server to your OpenCode session automatically (19 tools: search, diary, knowledge graph, entity management, etc.)
|
|
21
|
+
2. **Memory protocol injection** — Appends `PALACE_PROTOCOL` to the system prompt, instructing the agent to *verify before guessing* by querying the palace for people, projects, and past events.
|
|
22
|
+
3. **Session context loading** — On the first message of each session, spawns a background explore agent to load recent diary entries, palace status, and key entity facts.
|
|
23
|
+
|
|
24
|
+
## Configuration
|
|
25
|
+
|
|
26
|
+
Pass options via your OpenCode plugin config:
|
|
27
|
+
|
|
28
|
+
| Option | Type | Default | Description |
|
|
29
|
+
|---|---|---|---|
|
|
30
|
+
| `mcpCommand` | `string[]` | Auto-detected | Command to start the MCP server |
|
|
31
|
+
| `disableMcp` | `boolean` | `false` | Skip auto-registering MCP server |
|
|
32
|
+
| `disableProtocol` | `boolean` | `false` | Skip injecting PALACE_PROTOCOL |
|
|
33
|
+
| `disableAutoLoad` | `boolean` | `false` | Skip auto-loading context on first message |
|
|
34
|
+
|
|
35
|
+
## MCP Tools
|
|
36
|
+
|
|
37
|
+
The mempalace MCP server exposes 19 tools:
|
|
38
|
+
|
|
39
|
+
| Tool | Description |
|
|
40
|
+
|---|---|
|
|
41
|
+
| `mempalace_search` | Semantic memory search |
|
|
42
|
+
| `mempalace_kg_query` | Query entity facts from knowledge graph |
|
|
43
|
+
| `mempalace_kg_timeline` | Entity fact timeline |
|
|
44
|
+
| `mempalace_kg_add` | Add facts to knowledge graph |
|
|
45
|
+
| `mempalace_kg_invalidate` | Invalidate outdated facts |
|
|
46
|
+
| `mempalace_kg_stats` | Knowledge graph statistics |
|
|
47
|
+
| `mempalace_diary_write` | Write diary entry |
|
|
48
|
+
| `mempalace_diary_read` | Read recent diary entries |
|
|
49
|
+
| `mempalace_status` | Palace overview |
|
|
50
|
+
| `mempalace_list_wings` | List palace wings |
|
|
51
|
+
| `mempalace_list_rooms` | List rooms in a wing |
|
|
52
|
+
| `mempalace_get_taxonomy` | Full wing/room taxonomy |
|
|
53
|
+
| `mempalace_add_drawer` | Store a memory |
|
|
54
|
+
| `mempalace_delete_drawer` | Remove a memory |
|
|
55
|
+
| `mempalace_check_duplicate` | Check for duplicate memories |
|
|
56
|
+
| `mempalace_traverse` | Graph traversal (BFS) |
|
|
57
|
+
| `mempalace_find_tunnels` | Find cross-wing connections |
|
|
58
|
+
| `mempalace_graph_stats` | Graph structure statistics |
|
|
59
|
+
| `mempalace_get_aaak_spec` | AAAK compression dialect spec |
|
|
60
|
+
|
|
61
|
+
## Acknowledgements
|
|
62
|
+
|
|
63
|
+
This project is a Bun/TypeScript port of the original [mempalace](https://github.com/milla-jovovich/mempalace) by [milla-jovovich](https://github.com/milla-jovovich). The palace architecture, AAAK compression dialect, knowledge graph design, and MCP tool definitions all originate from their work.
|
|
64
|
+
|
|
65
|
+
## License
|
|
66
|
+
|
|
67
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-mempalace",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "OpenCode plugin for MemPalace memory system — auto-registers MCP server, injects memory protocol into system prompt, and loads context on session start",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"files": [
|
|
9
|
-
"dist"
|
|
9
|
+
"dist",
|
|
10
|
+
"README.md"
|
|
10
11
|
],
|
|
11
12
|
"scripts": {
|
|
12
13
|
"build": "bun build src/index.ts --outdir dist --target bun --format esm && tsc -p tsconfig.build.json",
|