@wipcomputer/memory-crystal 0.7.28 → 0.7.30
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/.worktrees/memory-crystal-private--cc-mini-fix-home-fallback/.env.example +20 -0
- package/.worktrees/memory-crystal-private--cc-mini-fix-home-fallback/.publish-skill.json +1 -0
- package/.worktrees/memory-crystal-private--cc-mini-fix-home-fallback/CHANGELOG.md +1297 -0
- package/.worktrees/memory-crystal-private--cc-mini-fix-home-fallback/CLA.md +19 -0
- package/.worktrees/memory-crystal-private--cc-mini-fix-home-fallback/LICENSE +52 -0
- package/.worktrees/memory-crystal-private--cc-mini-fix-home-fallback/README-ENTERPRISE.md +226 -0
- package/.worktrees/memory-crystal-private--cc-mini-fix-home-fallback/README.md +151 -0
- package/.worktrees/memory-crystal-private--cc-mini-fix-home-fallback/RELAY.md +199 -0
- package/.worktrees/memory-crystal-private--cc-mini-fix-home-fallback/SKILL.md +462 -0
- package/.worktrees/memory-crystal-private--cc-mini-fix-home-fallback/TECHNICAL.md +656 -0
- package/.worktrees/memory-crystal-private--cc-mini-fix-home-fallback/_trash/RELEASE-NOTES-v0-7-23.md +48 -0
- package/.worktrees/memory-crystal-private--cc-mini-fix-home-fallback/_trash/RELEASE-NOTES-v0-7-25.md +24 -0
- package/.worktrees/memory-crystal-private--cc-mini-fix-home-fallback/_trash/RELEASE-NOTES-v0-7-26.md +7 -0
- package/.worktrees/memory-crystal-private--cc-mini-fix-home-fallback/_trash/RELEASE-NOTES-v0-7-28.md +31 -0
- package/.worktrees/memory-crystal-private--cc-mini-fix-home-fallback/_trash/RELEASE-NOTES-v0-7-29.md +28 -0
- package/.worktrees/memory-crystal-private--cc-mini-fix-home-fallback/_trash/RELEASE-NOTES-v0-7-4.md +64 -0
- package/.worktrees/memory-crystal-private--cc-mini-fix-home-fallback/_trash/RELEASE-NOTES-v0-7-5.md +19 -0
- package/.worktrees/memory-crystal-private--cc-mini-fix-home-fallback/cloud/README.md +116 -0
- package/.worktrees/memory-crystal-private--cc-mini-fix-home-fallback/cloud/docs/gpt-system-instructions.md +69 -0
- package/.worktrees/memory-crystal-private--cc-mini-fix-home-fallback/cloud/migrations/0001_init.sql +52 -0
- package/.worktrees/memory-crystal-private--cc-mini-fix-home-fallback/migrations/0001_init.sql +51 -0
- package/.worktrees/memory-crystal-private--cc-mini-fix-home-fallback/migrations/0002_cloud_storage.sql +49 -0
- package/.worktrees/memory-crystal-private--cc-mini-fix-home-fallback/openclaw.plugin.json +11 -0
- package/.worktrees/memory-crystal-private--cc-mini-fix-home-fallback/package-lock.json +4169 -0
- package/.worktrees/memory-crystal-private--cc-mini-fix-home-fallback/package.json +61 -0
- package/.worktrees/memory-crystal-private--cc-mini-fix-home-fallback/scripts/crystal-capture.sh +29 -0
- package/.worktrees/memory-crystal-private--cc-mini-fix-home-fallback/scripts/deploy-cloud.sh +153 -0
- package/.worktrees/memory-crystal-private--cc-mini-fix-home-fallback/scripts/ldm-backup.sh +116 -0
- package/.worktrees/memory-crystal-private--cc-mini-fix-home-fallback/scripts/migrate-lance-to-sqlite.mjs +218 -0
- package/.worktrees/memory-crystal-private--cc-mini-fix-home-fallback/skills/memory/SKILL.md +438 -0
- package/.worktrees/memory-crystal-private--cc-mini-fix-home-fallback/wrangler-demo.toml +8 -0
- package/.worktrees/memory-crystal-private--cc-mini-fix-home-fallback/wrangler-mcp.toml +24 -0
- package/.worktrees/memory-crystal-private--cc-mini-release-notes-v0.7.30/.env.example +20 -0
- package/.worktrees/memory-crystal-private--cc-mini-release-notes-v0.7.30/.publish-skill.json +1 -0
- package/.worktrees/memory-crystal-private--cc-mini-release-notes-v0.7.30/CHANGELOG.md +1297 -0
- package/.worktrees/memory-crystal-private--cc-mini-release-notes-v0.7.30/CLA.md +19 -0
- package/.worktrees/memory-crystal-private--cc-mini-release-notes-v0.7.30/LICENSE +52 -0
- package/.worktrees/memory-crystal-private--cc-mini-release-notes-v0.7.30/README-ENTERPRISE.md +226 -0
- package/.worktrees/memory-crystal-private--cc-mini-release-notes-v0.7.30/README.md +151 -0
- package/.worktrees/memory-crystal-private--cc-mini-release-notes-v0.7.30/RELAY.md +199 -0
- package/.worktrees/memory-crystal-private--cc-mini-release-notes-v0.7.30/RELEASE-NOTES-v0.7.30.md +29 -0
- package/.worktrees/memory-crystal-private--cc-mini-release-notes-v0.7.30/SKILL.md +462 -0
- package/.worktrees/memory-crystal-private--cc-mini-release-notes-v0.7.30/TECHNICAL.md +656 -0
- package/.worktrees/memory-crystal-private--cc-mini-release-notes-v0.7.30/_trash/RELEASE-NOTES-v0-7-23.md +48 -0
- package/.worktrees/memory-crystal-private--cc-mini-release-notes-v0.7.30/_trash/RELEASE-NOTES-v0-7-25.md +24 -0
- package/.worktrees/memory-crystal-private--cc-mini-release-notes-v0.7.30/_trash/RELEASE-NOTES-v0-7-26.md +7 -0
- package/.worktrees/memory-crystal-private--cc-mini-release-notes-v0.7.30/_trash/RELEASE-NOTES-v0-7-28.md +31 -0
- package/.worktrees/memory-crystal-private--cc-mini-release-notes-v0.7.30/_trash/RELEASE-NOTES-v0-7-29.md +28 -0
- package/.worktrees/memory-crystal-private--cc-mini-release-notes-v0.7.30/_trash/RELEASE-NOTES-v0-7-4.md +64 -0
- package/.worktrees/memory-crystal-private--cc-mini-release-notes-v0.7.30/_trash/RELEASE-NOTES-v0-7-5.md +19 -0
- package/.worktrees/memory-crystal-private--cc-mini-release-notes-v0.7.30/cloud/README.md +116 -0
- package/.worktrees/memory-crystal-private--cc-mini-release-notes-v0.7.30/cloud/docs/gpt-system-instructions.md +69 -0
- package/.worktrees/memory-crystal-private--cc-mini-release-notes-v0.7.30/cloud/migrations/0001_init.sql +52 -0
- package/.worktrees/memory-crystal-private--cc-mini-release-notes-v0.7.30/migrations/0001_init.sql +51 -0
- package/.worktrees/memory-crystal-private--cc-mini-release-notes-v0.7.30/migrations/0002_cloud_storage.sql +49 -0
- package/.worktrees/memory-crystal-private--cc-mini-release-notes-v0.7.30/openclaw.plugin.json +11 -0
- package/.worktrees/memory-crystal-private--cc-mini-release-notes-v0.7.30/package-lock.json +4169 -0
- package/.worktrees/memory-crystal-private--cc-mini-release-notes-v0.7.30/package.json +61 -0
- package/.worktrees/memory-crystal-private--cc-mini-release-notes-v0.7.30/scripts/crystal-capture.sh +29 -0
- package/.worktrees/memory-crystal-private--cc-mini-release-notes-v0.7.30/scripts/deploy-cloud.sh +153 -0
- package/.worktrees/memory-crystal-private--cc-mini-release-notes-v0.7.30/scripts/ldm-backup.sh +116 -0
- package/.worktrees/memory-crystal-private--cc-mini-release-notes-v0.7.30/scripts/migrate-lance-to-sqlite.mjs +218 -0
- package/.worktrees/memory-crystal-private--cc-mini-release-notes-v0.7.30/skills/memory/SKILL.md +438 -0
- package/.worktrees/memory-crystal-private--cc-mini-release-notes-v0.7.30/wrangler-demo.toml +8 -0
- package/.worktrees/memory-crystal-private--cc-mini-release-notes-v0.7.30/wrangler-mcp.toml +24 -0
- package/CHANGELOG.md +63 -0
- package/SKILL.md +13 -3
- package/TECHNICAL.md +30 -2
- package/_trash/RELEASE-NOTES-v0-7-28.md +15 -8
- package/_trash/RELEASE-NOTES-v0-7-29.md +28 -0
- package/_trash/RELEASE-NOTES-v0.7.30.md +29 -0
- package/package.json +1 -1
- package/scripts/migrate-lance-to-sqlite.mjs +2 -1
package/.worktrees/memory-crystal-private--cc-mini-release-notes-v0.7.30/RELEASE-NOTES-v0.7.30.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Release Notes: memory-crystal v0.7.30
|
|
2
|
+
|
|
3
|
+
**Date:** 2026-03-30
|
|
4
|
+
|
|
5
|
+
## What changed
|
|
6
|
+
|
|
7
|
+
### Hardcoded path removal
|
|
8
|
+
|
|
9
|
+
Two files had `/Users/lesa` hardcoded as a fallback path. Both now use portable alternatives.
|
|
10
|
+
|
|
11
|
+
**migrate-lance-to-sqlite.mjs** had a fallback that resolved the OpenClaw workspace to `/Users/lesa/.openclaw`. The migration script now calls `os.homedir()` to build the path dynamically, so it works on any machine without assuming a specific username. This was the last remaining hardcoded path in the migration pipeline (#99).
|
|
12
|
+
|
|
13
|
+
**dev-update.ts** (the ai/dev-updates scanner) had an iCloud path baked in for reading team documents. It now calls `resolveWorkspace()` to read the workspace root from LDM config (`~/.ldm/config.json`), making it portable across machines and user accounts (#98).
|
|
14
|
+
|
|
15
|
+
## Why
|
|
16
|
+
|
|
17
|
+
These paths broke on any machine where the username is not `lesa`. Part of a broader audit across all LDM OS repos to eliminate hardcoded user paths and make everything portable.
|
|
18
|
+
|
|
19
|
+
## Issues closed
|
|
20
|
+
|
|
21
|
+
- #98
|
|
22
|
+
- #99
|
|
23
|
+
|
|
24
|
+
## How to verify
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
grep -r "/Users/lesa" src/ scripts/ --include="*.ts" --include="*.mjs"
|
|
28
|
+
# Should return zero results
|
|
29
|
+
```
|
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wip-memory-crystal
|
|
3
|
+
description: Search and manage the shared memory crystal. Use when user says "do you remember", "search memory", "remember this", "forget that", "memory status", "what do you know about", or needs to recall past discussions, store facts, or check what's in memory.
|
|
4
|
+
version: "0.7.29"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Memory Crystal
|
|
8
|
+
|
|
9
|
+
All your AIs share one memory. Searchable, private, sovereign. Every conversation you have with any AI gets captured, embedded, and made searchable. Facts, preferences, and decisions persist across sessions and across tools.
|
|
10
|
+
|
|
11
|
+
## What it does
|
|
12
|
+
|
|
13
|
+
1. **Captures** every conversation automatically (cron job, every minute)
|
|
14
|
+
2. **Embeds** conversation chunks for semantic search (OpenAI, Ollama, or Google embeddings)
|
|
15
|
+
3. **Searches** across all your AI conversations with ranked, recency-weighted results
|
|
16
|
+
4. **Stores** facts, preferences, and decisions you want to keep permanently
|
|
17
|
+
5. **Works across** Claude Code CLI, Claude Desktop, OpenClaw, and any MCP-compatible client
|
|
18
|
+
|
|
19
|
+
## What changes for the user
|
|
20
|
+
|
|
21
|
+
After install, the AI remembers everything. Past conversations are searchable. Important facts persist. The user never has to re-explain context. Every AI tool they use shares the same memory.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Intelligent Install & Update
|
|
26
|
+
|
|
27
|
+
When installing from Claude Code CLI or OpenClaw, Memory Crystal discovers your existing AI sessions automatically. Installs the Learning Dreaming Machines Operating System (LDM OS) and creates a living memory system. From this point forward, every conversation is captured, archived, and embedded into searchable memory. Choose to install as Crystal Core (all your memories) or Crystal Node (a Crystal Core mirror).
|
|
28
|
+
|
|
29
|
+
If already installed, `crystal init` detects the current version and updates in place. Code gets updated. Data never gets touched.
|
|
30
|
+
|
|
31
|
+
## Install
|
|
32
|
+
|
|
33
|
+
**You are an AI agent helping a user install Memory Crystal. Walk them through the process step by step. Ask questions, explain what you're doing, and let them make choices.**
|
|
34
|
+
|
|
35
|
+
### Recommended: LDM OS path
|
|
36
|
+
|
|
37
|
+
Check if LDM OS is installed: `which ldm && ldm --version`
|
|
38
|
+
|
|
39
|
+
If yes, one command installs everything:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
ldm install wipcomputer/memory-crystal
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Then run `crystal init` for MC-specific setup (database, cron, role, pairing). Skip to Step 1 below.
|
|
46
|
+
|
|
47
|
+
If LDM OS is not installed, continue with Question 1.
|
|
48
|
+
|
|
49
|
+
### Question 1: Developer or end user?
|
|
50
|
+
|
|
51
|
+
Ask the user:
|
|
52
|
+
|
|
53
|
+
> "Are you installing this as a developer, or do you just want it to work?"
|
|
54
|
+
|
|
55
|
+
**Developer path:**
|
|
56
|
+
- Fork the repo so they can contribute back
|
|
57
|
+
- Clone locally, build from source
|
|
58
|
+
- They end up with `crystal` and `crystal-mcp` on PATH via `npm link`
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
git clone https://github.com/<their-fork>/memory-crystal.git
|
|
62
|
+
cd memory-crystal
|
|
63
|
+
npm install
|
|
64
|
+
npm run build
|
|
65
|
+
npm link
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**End user path:**
|
|
69
|
+
- One command, done
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
npm install -g @wipcomputer/memory-crystal
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
If npm is not available, check if the user has Node.js installed (`node --version`). They need Node.js 20+. If not installed, tell them to install it from https://nodejs.org first.
|
|
76
|
+
|
|
77
|
+
Both paths end with `crystal` and `crystal-mcp` on PATH.
|
|
78
|
+
|
|
79
|
+
### Question 2: First install or adding a device?
|
|
80
|
+
|
|
81
|
+
Ask the user:
|
|
82
|
+
|
|
83
|
+
> "Is this your first time installing Memory Crystal, or do you already have it on another machine?"
|
|
84
|
+
|
|
85
|
+
**First install:** Full setup. This machine becomes the source of truth. Continue to Step 1.
|
|
86
|
+
|
|
87
|
+
**Adding a device:** They already have a Crystal Core somewhere. Skip to "Adding a Device" below.
|
|
88
|
+
|
|
89
|
+
### Transparency: Tell the user what's about to happen
|
|
90
|
+
|
|
91
|
+
Before installing, explain exactly what will be created:
|
|
92
|
+
|
|
93
|
+
> "Here's what Memory Crystal will set up on your machine:
|
|
94
|
+
>
|
|
95
|
+
> - `~/.ldm/` ... a hidden folder in your home directory. This is where everything lives.
|
|
96
|
+
> - `~/.ldm/memory/crystal.db` ... your memory database. All conversations, all memories.
|
|
97
|
+
> - `~/.ldm/agents/` ... per-agent data (transcripts, daily logs, sessions)
|
|
98
|
+
> - `~/.ldm/bin/crystal-capture.sh` ... a script that captures conversations every minute via cron
|
|
99
|
+
> - `~/.ldm/bin/ldm-backup.sh` ... a backup script (optional daily schedule)
|
|
100
|
+
>
|
|
101
|
+
> Nothing gets installed outside this folder. Nothing phones home. Want me to go ahead?"
|
|
102
|
+
|
|
103
|
+
### Step 0: Install or upgrade the global CLI (ALWAYS run this)
|
|
104
|
+
|
|
105
|
+
**Always run this before crystal init.** Even if crystal is already installed. This ensures the global CLI is the latest version. Never skip this step. Never build from source and copy to extensions instead.
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
npm uninstall -g memory-crystal 2>/dev/null
|
|
109
|
+
npm install -g @wipcomputer/memory-crystal
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Then proceed to Step 1.
|
|
113
|
+
|
|
114
|
+
### Step 1: Initialize
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
crystal init
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
This does everything: scaffolds `~/.ldm/`, deploys code to `~/.ldm/extensions/memory-crystal/`, configures the Claude Code Stop hook, registers the MCP server, deploys capture and backup scripts, and installs a cron job. If OpenClaw is detected, it deploys the OC plugin too. Safe to run multiple times. If already installed, it detects the version and updates if needed.
|
|
121
|
+
|
|
122
|
+
You can also specify a role during init:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
crystal init --core # Install as Crystal Core
|
|
126
|
+
crystal init --node --pair mc1:... # Install as Node with pairing code
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**Core recommendation:** If this machine is always on (desktop, server, Mac mini), it should be your Crystal Core. The Core is the master memory. It does all embeddings and is the source of truth. If you're on a laptop, you can still install standalone. But when you're ready, you'll want a Core running on something permanent.
|
|
130
|
+
|
|
131
|
+
### Step 2: Set up embeddings
|
|
132
|
+
|
|
133
|
+
Memory Crystal needs an embedding provider to make conversations searchable. Check if the user already has one:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
echo $OPENAI_API_KEY
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
If that returns a key, skip to Step 3.
|
|
140
|
+
|
|
141
|
+
If not, ask the user which provider they want:
|
|
142
|
+
|
|
143
|
+
**Option A: MLX (free, local, Apple Silicon only)**
|
|
144
|
+
```bash
|
|
145
|
+
crystal mlx setup
|
|
146
|
+
```
|
|
147
|
+
Auto-installs Qwen2.5-3B on M-series Macs. Creates a LaunchAgent on port 18791. `crystal init` detects MLX automatically.
|
|
148
|
+
|
|
149
|
+
**Option B: OpenAI (recommended for non-Apple Silicon, requires API key)**
|
|
150
|
+
Tell the user to add this to their shell profile (`~/.zshrc` or `~/.bashrc`):
|
|
151
|
+
```bash
|
|
152
|
+
export OPENAI_API_KEY="sk-..."
|
|
153
|
+
```
|
|
154
|
+
They get the key from https://platform.openai.com/api-keys
|
|
155
|
+
|
|
156
|
+
**Option B: Ollama (free, local, no API key needed)**
|
|
157
|
+
```bash
|
|
158
|
+
ollama --version
|
|
159
|
+
# If not installed: https://ollama.com
|
|
160
|
+
ollama pull nomic-embed-text
|
|
161
|
+
```
|
|
162
|
+
Then add to shell profile:
|
|
163
|
+
```bash
|
|
164
|
+
export CRYSTAL_EMBEDDING_PROVIDER=ollama
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
**Option C: Google**
|
|
168
|
+
```bash
|
|
169
|
+
export CRYSTAL_EMBEDDING_PROVIDER=google
|
|
170
|
+
export GOOGLE_API_KEY="..."
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Step 3: Connect to your AI
|
|
174
|
+
|
|
175
|
+
`crystal init` already handled the main connections automatically:
|
|
176
|
+
- **Claude Code CLI:** Stop hook configured in `~/.claude/settings.json`, MCP server registered
|
|
177
|
+
- **OpenClaw:** If detected, plugin deployed to `~/.openclaw/extensions/memory-crystal/`
|
|
178
|
+
|
|
179
|
+
Verify the connections worked by running `crystal doctor`. If the MCP server or hook checks show warnings, fix them manually:
|
|
180
|
+
|
|
181
|
+
#### Claude Code CLI (manual fallback)
|
|
182
|
+
|
|
183
|
+
If `crystal init` couldn't register the MCP server automatically:
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
claude mcp add --scope user memory-crystal -- node ~/.ldm/extensions/memory-crystal/dist/mcp-server.js
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Then restart Claude Code (exit and re-open, or run `/mcp` to reconnect).
|
|
190
|
+
|
|
191
|
+
After restart, you will have these tools: `crystal_search`, `crystal_remember`, `crystal_forget`, `crystal_status`.
|
|
192
|
+
|
|
193
|
+
#### Claude Desktop (macOS app)
|
|
194
|
+
|
|
195
|
+
Check if Claude Desktop is installed:
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
ls ~/Library/Application\ Support/Claude/claude_desktop_config.json 2>/dev/null
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
If it exists, read the file and add the memory-crystal MCP server to it:
|
|
202
|
+
|
|
203
|
+
```json
|
|
204
|
+
{
|
|
205
|
+
"mcpServers": {
|
|
206
|
+
"memory-crystal": {
|
|
207
|
+
"command": "node",
|
|
208
|
+
"args": ["~/.ldm/extensions/memory-crystal/dist/mcp-server.js"]
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
Merge this into the existing config (don't overwrite other servers). Tell the user to restart Claude Desktop.
|
|
215
|
+
|
|
216
|
+
#### OpenClaw (manual fallback)
|
|
217
|
+
|
|
218
|
+
If `crystal init` didn't deploy to OpenClaw automatically:
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
cp -r ~/.ldm/extensions/memory-crystal/{dist,skills,package.json,openclaw.plugin.json} ~/.openclaw/extensions/memory-crystal/
|
|
222
|
+
cd ~/.openclaw/extensions/memory-crystal && npm install --omit=dev
|
|
223
|
+
openclaw gateway restart
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
**All runtimes share the same database.** Tell the user: "All your AIs share one memory at `~/.ldm/memory/crystal.db`."
|
|
227
|
+
|
|
228
|
+
### Step 4: Bridge (AI-to-AI Communication)
|
|
229
|
+
|
|
230
|
+
Memory Crystal includes Bridge, which lets your AIs talk to each other. Install it:
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
crystal bridge setup
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
If Bridge isn't installed yet:
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
npm install -g lesa-bridge
|
|
240
|
+
crystal bridge setup
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
This registers the Bridge MCP server. Your AIs can now send messages to each other and search each other's conversations.
|
|
244
|
+
|
|
245
|
+
### Step 5: Backups (optional)
|
|
246
|
+
|
|
247
|
+
Offer to set up automated backups:
|
|
248
|
+
|
|
249
|
+
> "Want me to set up daily backups of your memory? I'll install a backup that runs at 3 AM and keeps the last 7 copies."
|
|
250
|
+
|
|
251
|
+
```bash
|
|
252
|
+
crystal backup setup
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
The backup destination defaults to `~/.ldm/backups/`. The user can change this by setting `LDM_BACKUP_DIR` in their shell profile to wherever they trust: iCloud Drive, an external drive, Dropbox, etc.
|
|
256
|
+
|
|
257
|
+
**If the Core is on a laptop:** Strongly recommend backups. Laptops get lost, stolen, spilled on. The Core is the source of truth. Back it up.
|
|
258
|
+
|
|
259
|
+
### Step 6: Verify
|
|
260
|
+
|
|
261
|
+
Run `crystal doctor` to check that everything is set up correctly:
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
crystal doctor
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
This shows the status of every component: database, embeddings, capture, relay, MCP, backup, bridge. If anything is wrong, it tells you how to fix it.
|
|
268
|
+
|
|
269
|
+
Then test search:
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
crystal search "test"
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
If that works, tell the user: "Memory Crystal is installed. From now on, I can search our past conversations, remember important things, and share memory with your other AI tools. Try asking me 'do you remember what we talked about last week?'"
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
## Update
|
|
280
|
+
|
|
281
|
+
If Memory Crystal is already installed and a new version is available, update it:
|
|
282
|
+
|
|
283
|
+
> "Update Memory Crystal to the latest version"
|
|
284
|
+
|
|
285
|
+
The AI runs:
|
|
286
|
+
|
|
287
|
+
```bash
|
|
288
|
+
crystal update
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
This detects the installed version, shows what will change, and deploys the new code. It updates:
|
|
292
|
+
- Code in `~/.ldm/extensions/memory-crystal/dist/`
|
|
293
|
+
- Code in `~/.openclaw/extensions/memory-crystal/dist/` (if OpenClaw is present)
|
|
294
|
+
- Skills and package manifests
|
|
295
|
+
- CC Stop hook path (if changed)
|
|
296
|
+
- MCP server registration (if needed)
|
|
297
|
+
|
|
298
|
+
It never touches:
|
|
299
|
+
- `~/.ldm/memory/crystal.db` (your data)
|
|
300
|
+
- `~/.ldm/state/*` (watermarks, role state)
|
|
301
|
+
- `~/.ldm/secrets/*` (relay key)
|
|
302
|
+
- `~/.ldm/agents/*` (agent data, transcripts, daily logs)
|
|
303
|
+
|
|
304
|
+
After the update, run `crystal doctor` to verify everything is working. If the update changed hook paths or MCP registration, restart Claude Code.
|
|
305
|
+
|
|
306
|
+
---
|
|
307
|
+
|
|
308
|
+
## Adding a Device
|
|
309
|
+
|
|
310
|
+
If the user already has a Crystal Core on another machine:
|
|
311
|
+
|
|
312
|
+
### Step 1: Install the package
|
|
313
|
+
|
|
314
|
+
Same as above (developer fork or `npm install -g @wipcomputer/memory-crystal`).
|
|
315
|
+
|
|
316
|
+
### Step 2: Initialize as a Node
|
|
317
|
+
|
|
318
|
+
```bash
|
|
319
|
+
crystal init --agent <name>
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
Use a descriptive agent name like `cc-air`, `cc-laptop`, etc.
|
|
323
|
+
|
|
324
|
+
### Step 3: Pair with the Core
|
|
325
|
+
|
|
326
|
+
On the Core machine:
|
|
327
|
+
```bash
|
|
328
|
+
crystal pair
|
|
329
|
+
```
|
|
330
|
+
This shows a QR code and a pairing string.
|
|
331
|
+
|
|
332
|
+
On this machine:
|
|
333
|
+
```bash
|
|
334
|
+
crystal pair --code mc1:...
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
Both machines now share the encryption key.
|
|
338
|
+
|
|
339
|
+
### Step 4: Configure relay
|
|
340
|
+
|
|
341
|
+
Ask the user: "Do you want to use the free WIP.computer relay, or set up your own?"
|
|
342
|
+
|
|
343
|
+
**Option A: WIP.computer relay (recommended)**
|
|
344
|
+
- Free during beta. Nothing to set up
|
|
345
|
+
- Your data is end-to-end encrypted. The relay is blind
|
|
346
|
+
- Set env vars:
|
|
347
|
+
```bash
|
|
348
|
+
export CRYSTAL_RELAY_URL=<provided-url>
|
|
349
|
+
export CRYSTAL_RELAY_TOKEN=<provided-token>
|
|
350
|
+
export CRYSTAL_AGENT_ID=<agent-name>
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
**Option B: Self-hosted relay (full sovereignty)**
|
|
354
|
+
- Deploy your own Cloudflare Worker + R2 bucket
|
|
355
|
+
- Requires a Cloudflare account (free tier works)
|
|
356
|
+
- Walk them through the setup in RELAY.md
|
|
357
|
+
|
|
358
|
+
### Step 5: Connect to AI + Bridge + Verify
|
|
359
|
+
|
|
360
|
+
Same as first install Steps 3-6 above.
|
|
361
|
+
|
|
362
|
+
### Step 6: Demote to Node
|
|
363
|
+
|
|
364
|
+
```bash
|
|
365
|
+
crystal demote
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
This machine is now a Crystal Node. Conversations are captured, encrypted, and relayed to the Core. The Core embeds everything and pushes a searchable mirror back.
|
|
369
|
+
|
|
370
|
+
---
|
|
371
|
+
|
|
372
|
+
## Role Management
|
|
373
|
+
|
|
374
|
+
Two-role architecture: **Core** (master database, embedding server, relay sync) and **Node** (mirrors Core, syncs via relay, local search). Users can check and change roles at any time:
|
|
375
|
+
|
|
376
|
+
```bash
|
|
377
|
+
crystal role # Show current role
|
|
378
|
+
crystal promote # Make this device the Crystal Core
|
|
379
|
+
crystal demote # Make this device a Crystal Node
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
If a user starts on a laptop and later gets a desktop, they can promote the desktop and demote the laptop. No data loss.
|
|
383
|
+
|
|
384
|
+
---
|
|
385
|
+
|
|
386
|
+
## Coming Back Later
|
|
387
|
+
|
|
388
|
+
Users can always come back and say:
|
|
389
|
+
|
|
390
|
+
> "Hey, can you check what Memory Crystal features I have installed and what I'm missing?"
|
|
391
|
+
|
|
392
|
+
Run:
|
|
393
|
+
|
|
394
|
+
```bash
|
|
395
|
+
crystal doctor
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
This shows the full state of the install: role, database, embeddings, capture, relay, MCP, backup, bridge. Each check shows OK, WARN, or FAIL with a suggested fix.
|
|
399
|
+
|
|
400
|
+
---
|
|
401
|
+
|
|
402
|
+
## Tools
|
|
403
|
+
|
|
404
|
+
Once installed, these tools are available to the AI:
|
|
405
|
+
|
|
406
|
+
### crystal_search
|
|
407
|
+
|
|
408
|
+
Search across all stored memory. Semantic search with recency-weighted results.
|
|
409
|
+
|
|
410
|
+
```
|
|
411
|
+
crystal_search query="how do plugins work" limit=5
|
|
412
|
+
crystal_search query="user preferences" agent_id="main"
|
|
413
|
+
crystal_search query="security" intent="1Password"
|
|
414
|
+
crystal_search query="deployment" time_filter="7d" explain=true
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
Parameters: `query` (required), `limit`, `agent_id`, `time_filter` (24h/7d/30d), `intent` (disambiguate without adding search terms), `candidates` (rerank pool size), `explain` (show scoring breakdown).
|
|
418
|
+
|
|
419
|
+
Results are ranked by relevance and freshness, with color-coded freshness indicators:
|
|
420
|
+
- fresh (less than 3 days)
|
|
421
|
+
- recent (less than 7 days)
|
|
422
|
+
- aging (less than 14 days)
|
|
423
|
+
- stale (14+ days)
|
|
424
|
+
|
|
425
|
+
### crystal_remember
|
|
426
|
+
|
|
427
|
+
Store a fact or observation that persists across sessions.
|
|
428
|
+
|
|
429
|
+
```
|
|
430
|
+
crystal_remember text="User prefers Opus for complex tasks" category="preference"
|
|
431
|
+
crystal_remember text="API key rotated on 2026-03-01" category="event"
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
Categories: fact, preference, event, opinion, skill
|
|
435
|
+
|
|
436
|
+
### crystal_forget
|
|
437
|
+
|
|
438
|
+
Deprecate a stored memory by ID (marks as deprecated, doesn't delete).
|
|
439
|
+
|
|
440
|
+
```
|
|
441
|
+
crystal_forget id=42
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
### crystal_status
|
|
445
|
+
|
|
446
|
+
Check memory health: chunk count, agents, provider, data directory.
|
|
447
|
+
|
|
448
|
+
```
|
|
449
|
+
crystal_status
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
---
|
|
453
|
+
|
|
454
|
+
## Tips
|
|
455
|
+
|
|
456
|
+
- Search is semantic. "how do plugins work" finds conversations about plugin architecture even if those exact words weren't used.
|
|
457
|
+
- Store preferences and decisions as memories. They survive compaction and context limits.
|
|
458
|
+
- Use `agent_id` filter when you only want results from a specific agent.
|
|
459
|
+
- The cron job captures conversations every minute. No data loss even in long sessions.
|
|
460
|
+
- Available providers: openai (default), ollama (local, free), google.
|
|
461
|
+
- All runtimes (Claude Code, Claude Desktop, OpenClaw) share the same database at `~/.ldm/memory/crystal.db`.
|
|
462
|
+
- Run `crystal doctor` anytime to check what's installed and what's missing.
|