openclaw-memory-mapper 1.0.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 +158 -0
- package/bin/cli.js +97 -0
- package/dist/assets/index-KpCnSdTn.js +351 -0
- package/dist/assets/index-Lq-0Ml6V.css +1 -0
- package/dist/favicon.svg +21 -0
- package/dist/index.html +16 -0
- package/dist/server/index.js +461 -0
- package/package.json +85 -0
- package/server/index.ts +541 -0
- package/server/tsconfig.json +13 -0
package/README.md
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# OpenClaw Memory Mapper
|
|
2
|
+
|
|
3
|
+
**Stop Flying Blind: Visualize Your AI's Memory**
|
|
4
|
+
|
|
5
|
+
Your AI knows everything about you. But you know nothing about what it remembers.
|
|
6
|
+
|
|
7
|
+
Local AI memory systems are black boxes - scattered files across various directories with no visibility into what's stored, how it's organized, or why your AI "forgot" something it should know. Debugging means manually digging through directories, hoping to find the right file.
|
|
8
|
+
|
|
9
|
+
Memory Mapper changes that. One command, complete visibility.
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx openclaw-memory-mapper
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
That's it. Your browser opens and guides you through setup.
|
|
18
|
+
|
|
19
|
+
<!--  -->
|
|
20
|
+
|
|
21
|
+
## Onboarding
|
|
22
|
+
|
|
23
|
+
When you first launch Memory Mapper, the onboarding wizard walks you through setup:
|
|
24
|
+
|
|
25
|
+
### Step 1: Welcome
|
|
26
|
+
Review the security guarantees (100% local, read-only, no telemetry).
|
|
27
|
+
|
|
28
|
+
### Step 2: Configure Sources
|
|
29
|
+
Add the path(s) to your memory directories:
|
|
30
|
+
|
|
31
|
+
1. Click **"Add custom path"**
|
|
32
|
+
2. Enter your memory folder path (e.g., `~/my-memory`, `~/.claude`, or any directory where your AI stores memory files)
|
|
33
|
+
3. The app auto-detects if the path exists
|
|
34
|
+
4. Check the box to enable the source
|
|
35
|
+
5. Add multiple paths if your memory is spread across directories
|
|
36
|
+
|
|
37
|
+
### Step 3: Review
|
|
38
|
+
Confirm the paths you've configured and click **"Get Started"**.
|
|
39
|
+
|
|
40
|
+
That's it - you're in.
|
|
41
|
+
|
|
42
|
+
## Why Use This?
|
|
43
|
+
|
|
44
|
+
### Debug 10x Faster
|
|
45
|
+
When your AI behaves oddly or "forgets" something, instantly see what memory it actually has access to. No more guessing, no more `find` commands.
|
|
46
|
+
|
|
47
|
+
### Memory Hygiene
|
|
48
|
+
Spot orphaned files, see storage usage across layers, and understand what's taking up space. Keep your memory system clean and efficient.
|
|
49
|
+
|
|
50
|
+
### System Understanding
|
|
51
|
+
Finally see how your local AI actually stores and retrieves information. Interactive flow diagrams show your memory architecture.
|
|
52
|
+
|
|
53
|
+
### Migration Helper
|
|
54
|
+
Visualize your memory layout before and after upgrading or moving AI systems. Know exactly what you're working with.
|
|
55
|
+
|
|
56
|
+
## Features
|
|
57
|
+
|
|
58
|
+
### Architecture View
|
|
59
|
+
Interactive flow diagram showing your memory structure, auto-discovered from your configured paths:
|
|
60
|
+
|
|
61
|
+
- **Daily Logs** - Temporal memory files (YYYY-MM-DD.md pattern)
|
|
62
|
+
- **Architecture Docs** - System documentation (*_ARCHITECTURE.md)
|
|
63
|
+
- **Persistent Memory** - Long-term memory stores
|
|
64
|
+
- **Context Builders** - Dynamic context assembly
|
|
65
|
+
- **Knowledge Bases** - Specialized knowledge (crypto, domain-specific)
|
|
66
|
+
- **Swarm Telemetry** - Multi-agent logs and scripts
|
|
67
|
+
- **Archives** - Compressed historical data
|
|
68
|
+
|
|
69
|
+
Click any node to see details about that memory layer.
|
|
70
|
+
|
|
71
|
+
### File Browser
|
|
72
|
+
Explore the actual files that make up your AI's memory:
|
|
73
|
+
- Browse any configured memory directory
|
|
74
|
+
- See file sizes, modification dates, and directory structure
|
|
75
|
+
- Read file contents directly in the app
|
|
76
|
+
|
|
77
|
+
### Security & Privacy Dashboard
|
|
78
|
+
Full transparency into what the app is doing:
|
|
79
|
+
- Activity log showing every file access
|
|
80
|
+
- Pause/resume access controls
|
|
81
|
+
- Export audit trail as CSV
|
|
82
|
+
- Revoke permissions at any time
|
|
83
|
+
|
|
84
|
+
### System Status
|
|
85
|
+
Real-time overview of your memory system:
|
|
86
|
+
- Connection status for each configured source
|
|
87
|
+
- File counts and storage usage per layer
|
|
88
|
+
- Refresh data on demand
|
|
89
|
+
|
|
90
|
+
## Security & Privacy
|
|
91
|
+
|
|
92
|
+
Memory Mapper is designed with security as a core principle:
|
|
93
|
+
|
|
94
|
+
| Guarantee | Description |
|
|
95
|
+
|-----------|-------------|
|
|
96
|
+
| **Read-Only** | Cannot modify, delete, or create any files |
|
|
97
|
+
| **Local-Only** | All processing on your machine, nothing sent externally |
|
|
98
|
+
| **No Telemetry** | Zero analytics, tracking, or phone-home behavior |
|
|
99
|
+
| **User-Controlled** | Only accesses paths you explicitly configure |
|
|
100
|
+
| **Open Source** | Full source code available for audit |
|
|
101
|
+
|
|
102
|
+
Your AI's memories stay on your machine, visible only to you.
|
|
103
|
+
|
|
104
|
+
## Installation
|
|
105
|
+
|
|
106
|
+
### Quick (npx)
|
|
107
|
+
```bash
|
|
108
|
+
npx openclaw-memory-mapper
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Global Install
|
|
112
|
+
```bash
|
|
113
|
+
npm install -g openclaw-memory-mapper
|
|
114
|
+
memory-mapper
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
The app starts a local server and opens in your browser at `http://localhost:3001`.
|
|
118
|
+
|
|
119
|
+
## Who Is This For?
|
|
120
|
+
|
|
121
|
+
- **AI Power Users** who've outgrown basic setups and need visibility into their memory systems
|
|
122
|
+
- **Developers** building on local AI platforms who need debugging tools
|
|
123
|
+
- **Anyone** who's ever thought "what does this AI actually remember about me?"
|
|
124
|
+
|
|
125
|
+
## Development
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
git clone https://github.com/anthropics/openclaw-memory-mapper
|
|
129
|
+
cd openclaw-memory-mapper
|
|
130
|
+
bun install
|
|
131
|
+
bun run dev
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Opens at `http://localhost:5173` in development mode.
|
|
135
|
+
|
|
136
|
+
## Requirements
|
|
137
|
+
|
|
138
|
+
- Node.js 18+ or Bun
|
|
139
|
+
- A local AI memory system (any directory structure)
|
|
140
|
+
|
|
141
|
+
## Tech Stack
|
|
142
|
+
|
|
143
|
+
| Technology | Purpose |
|
|
144
|
+
|------------|---------|
|
|
145
|
+
| React 19 + TypeScript | Frontend framework |
|
|
146
|
+
| Vite | Build tooling |
|
|
147
|
+
| Tailwind CSS v4 | Styling |
|
|
148
|
+
| React Flow | Architecture visualization |
|
|
149
|
+
| Radix UI | Accessible components |
|
|
150
|
+
| Express.js | Backend API |
|
|
151
|
+
|
|
152
|
+
## License
|
|
153
|
+
|
|
154
|
+
MIT
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
*Works with any local AI memory system - Claude, OpenClaw, or custom setups.*
|
package/bin/cli.js
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { spawn } from 'child_process';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
5
|
+
import { dirname, join } from 'path';
|
|
6
|
+
import { existsSync } from 'fs';
|
|
7
|
+
|
|
8
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
9
|
+
const __dirname = dirname(__filename);
|
|
10
|
+
const ROOT = join(__dirname, '..');
|
|
11
|
+
|
|
12
|
+
const PORT = process.env.PORT || 3001;
|
|
13
|
+
|
|
14
|
+
// Colors for terminal output
|
|
15
|
+
const cyan = (text) => `\x1b[36m${text}\x1b[0m`;
|
|
16
|
+
const green = (text) => `\x1b[32m${text}\x1b[0m`;
|
|
17
|
+
const dim = (text) => `\x1b[2m${text}\x1b[0m`;
|
|
18
|
+
const red = (text) => `\x1b[31m${text}\x1b[0m`;
|
|
19
|
+
|
|
20
|
+
console.log('');
|
|
21
|
+
console.log(cyan('🧠OpenClaw Memory Mapper'));
|
|
22
|
+
console.log(dim(' Visualize your Claude agent\'s memory architecture'));
|
|
23
|
+
console.log('');
|
|
24
|
+
|
|
25
|
+
// Check if we're running from source (dev) or installed package (prod)
|
|
26
|
+
const devServerPath = join(ROOT, 'server', 'index.ts');
|
|
27
|
+
const prodServerPath = join(ROOT, 'dist', 'server', 'index.js');
|
|
28
|
+
const isDevMode = existsSync(devServerPath) && !existsSync(prodServerPath);
|
|
29
|
+
|
|
30
|
+
async function openBrowser(url) {
|
|
31
|
+
const { platform } = process;
|
|
32
|
+
const command = platform === 'darwin' ? 'open' : platform === 'win32' ? 'start' : 'xdg-open';
|
|
33
|
+
spawn(command, [url], { stdio: 'ignore', detached: true }).unref();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
async function startServer() {
|
|
37
|
+
if (isDevMode) {
|
|
38
|
+
// Development mode - use tsx to run TypeScript server
|
|
39
|
+
console.log(dim(' Running in development mode...'));
|
|
40
|
+
|
|
41
|
+
const server = spawn('npx', ['tsx', devServerPath], {
|
|
42
|
+
stdio: 'inherit',
|
|
43
|
+
env: { ...process.env, PORT: String(PORT) },
|
|
44
|
+
shell: true,
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
server.on('error', (err) => {
|
|
48
|
+
console.error(red(' Failed to start server:'), err.message);
|
|
49
|
+
process.exit(1);
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
// Wait for server to start, then open browser
|
|
53
|
+
setTimeout(() => {
|
|
54
|
+
console.log(green(` ✓ Server running at http://localhost:${PORT}`));
|
|
55
|
+
console.log(dim(' Opening browser...'));
|
|
56
|
+
console.log('');
|
|
57
|
+
openBrowser(`http://localhost:${PORT}`);
|
|
58
|
+
}, 2000);
|
|
59
|
+
|
|
60
|
+
} else if (existsSync(prodServerPath)) {
|
|
61
|
+
// Production mode - run compiled JavaScript server
|
|
62
|
+
console.log(dim(' Starting server...'));
|
|
63
|
+
|
|
64
|
+
try {
|
|
65
|
+
// Set PORT before importing
|
|
66
|
+
process.env.PORT = String(PORT);
|
|
67
|
+
|
|
68
|
+
// Dynamic import of the compiled server
|
|
69
|
+
await import(prodServerPath);
|
|
70
|
+
|
|
71
|
+
console.log(green(` ✓ Server running at http://localhost:${PORT}`));
|
|
72
|
+
console.log(dim(' Opening browser...'));
|
|
73
|
+
console.log('');
|
|
74
|
+
|
|
75
|
+
// Small delay to ensure server is listening
|
|
76
|
+
setTimeout(() => {
|
|
77
|
+
openBrowser(`http://localhost:${PORT}`);
|
|
78
|
+
}, 500);
|
|
79
|
+
} catch (err) {
|
|
80
|
+
console.error(red(' Failed to start server:'), err.message);
|
|
81
|
+
process.exit(1);
|
|
82
|
+
}
|
|
83
|
+
} else {
|
|
84
|
+
console.error(red(' Error: No server found.'));
|
|
85
|
+
console.error(dim(' Run "npm run build" first, or use "npm run dev" for development.'));
|
|
86
|
+
process.exit(1);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Handle Ctrl+C gracefully
|
|
91
|
+
process.on('SIGINT', () => {
|
|
92
|
+
console.log('');
|
|
93
|
+
console.log(dim(' Shutting down...'));
|
|
94
|
+
process.exit(0);
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
startServer();
|