@memclaw/plugin 0.9.2 → 0.9.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/dist/index.js CHANGED
@@ -38,7 +38,7 @@ function memclawPlugin(api) {
38
38
  exports.plugin = {
39
39
  id: 'memclaw',
40
40
  name: 'MemClaw',
41
- version: '0.9.2',
41
+ version: '0.9.3',
42
42
  configSchema: {
43
43
  type: 'object',
44
44
  properties: {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "memclaw",
3
3
  "name": "MemClaw",
4
- "version": "0.9.2",
4
+ "version": "0.9.3",
5
5
  "description": "Layered semantic memory for OpenClaw with L0/L1/L2 tiered retrieval, easy setup, and migration from native memory",
6
6
  "kind": "memory",
7
7
  "skills": ["skill"],
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@memclaw/plugin",
3
- "version": "0.9.2",
4
- "description": "MemClaw - The Cortex Memory' plugin for OpenClaw. Layered semantic memory for OpenClaw with easy setup and migration",
3
+ "version": "0.9.3",
4
+ "description": "MemClaw - The Cortex Memory plugin for OpenClaw. Layered semantic memory for OpenClaw with easy setup and migration",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
package/skill/SKILL.md CHANGED
@@ -21,7 +21,22 @@ MemClaw provides **three-layer semantic memory** with tiered retrieval:
21
21
 
22
22
  The search engine queries all three layers internally and returns unified results with `snippet` and `content`.
23
23
 
24
- ## Quick Decision Flow
24
+ ## Pre-Use Requirements
25
+
26
+ **IMPORTANT**: Before using MemClaw for the first time, you MUST ensure:
27
+
28
+ 1. **Qdrant** is running on port 6333/6334
29
+ 2. **cortex-mem-service** is running on port 8085 with `--data-dir` and valid `config.toml`
30
+ 3. **LLM/Embedding API keys** are configured in `config.toml`
31
+
32
+ **Manual Configuration Required**: Users must manually configure the following in `config.toml`:
33
+ - `llm.api_key` — LLM API key for memory processing
34
+ - `embedding.api_key` — Embedding API key for vector search
35
+ - `llm.api_base_url` / `embedding.api_base_url` — API endpoints (if not using OpenAI default)
36
+
37
+ > **See `references/setup.md`** for complete installation, service setup, and configuration instructions.
38
+
39
+ ## Decision Flow
25
40
 
26
41
  1. **Need to find something** → `cortex_search`
27
42
  2. **Need more context** → `cortex_recall`
@@ -64,11 +79,14 @@ The search engine queries all three layers internally and returns unified result
64
79
  | Services won't start | Check ports 6333, 6334, 8085; verify `api_key` in config.toml |
65
80
  | Search returns no results | Run `cortex_list_sessions` to verify; lower `min_score` threshold |
66
81
  | Migration fails | Ensure OpenClaw workspace at `~/.openclaw/workspace` |
82
+ | cortex-mem-service fails | Ensure `--data-dir` is set and `config.toml` exists in that directory |
83
+ | LLM/Embedding errors | Verify `llm.api_key` and `embedding.api_key` are configured in `config.toml` |
84
+ | Platform not supported | MemClaw supports macOS Apple Silicon and Windows x64 only |
67
85
 
68
86
  ## References
69
87
 
70
88
  For detailed information, see:
71
89
 
72
- - **`references/setup.md`** — Installation and configuration guide
90
+ - **`references/setup.md`** — Installation, service setup, and configuration guide
73
91
  - **`references/tools.md`** — Detailed tool parameters and examples
74
- - **`references/maintenance.md`** — CLI commands for data maintenance and optimization
92
+ - **`references/maintenance.md`** — CLI commands for data maintenance and optimization
@@ -2,110 +2,255 @@
2
2
 
3
3
  Installation and configuration guide for MemClaw.
4
4
 
5
+ ## Supported Platforms
6
+
7
+ | Platform | npm Package |
8
+ |----------|-------------|
9
+ | macOS Apple Silicon | `@memclaw/bin-darwin-arm64` |
10
+ | Windows x64 | `@memclaw/bin-win-x64` |
11
+
12
+ > **Note**: MemClaw is only supported on the platforms listed above.
13
+
5
14
  ## Requirements
6
15
 
7
16
  | Requirement | Details |
8
17
  |-------------|---------|
9
- | **Platforms** | Windows x86, macOS Apple Silicon |
10
18
  | **Node.js** | ≥ 20.0.0 |
11
19
  | **OpenClaw** | Installed and configured |
20
+ | **Qdrant** | Vector database (port 6333/6334) |
21
+ | **cortex-mem-service** | Memory service (port 8085) |
12
22
 
13
- ## Installation
23
+ ## Binary Installation
14
24
 
15
- ```bash
16
- openclaw plugins install @memclaw/plugin
17
- ```
25
+ MemClaw binaries (Qdrant, cortex-mem-service, cortex-mem-cli) are distributed via platform-specific npm packages:
18
26
 
19
- ## OpenClaw Configuration
27
+ - `@memclaw/bin-darwin-arm64` — macOS Apple Silicon
28
+ - `@memclaw/bin-win-x64` — Windows x64
20
29
 
21
- Edit your `openclaw.json`:
30
+ These packages are installed automatically as optional dependencies when installing `@memclaw/plugin`.
22
31
 
23
- ```json
24
- {
25
- "plugins": {
26
- "entries": {
27
- "memclaw": {
28
- "enabled": true,
29
- "config": {
30
- "serviceUrl": "http://127.0.0.1:8085",
31
- "tenantId": "tenant_claw",
32
- "autoStartServices": true
33
- }
34
- }
35
- }
36
- },
37
- "agents": {
38
- "defaults": {
39
- "memorySearch": { "enabled": false }
40
- }
41
- }
42
- }
32
+ ### Manual Binary Installation
33
+
34
+ If binaries are not installed, run:
35
+
36
+ ```
37
+ npm install @memclaw/bin-darwin-arm64
43
38
  ```
44
39
 
45
- > **Important**: Set `memorySearch.enabled: false` to disable OpenClaw's built-in memory search and use MemClaw instead.
40
+ or (for Windows):
41
+
42
+ ```
43
+ npm install @memclaw/bin-win-x64
44
+ ```
46
45
 
47
- ## LLM Configuration
46
+ ## First-Time Setup Checklist
48
47
 
49
- On first run, MemClaw creates a configuration file:
48
+ **Before using MemClaw, complete these steps:**
50
49
 
51
- | Platform | Path |
52
- |----------|------|
53
- | Windows | `%APPDATA%\memclaw\config.toml` |
54
- | macOS | `~/Library/Application Support/memclaw/config.toml` |
50
+ ### Step 1: Verify Platform Support
51
+
52
+ Ensure you are on a supported platform (macOS Apple Silicon or Windows x86/x64).
53
+
54
+ ### Step 2: Prepare Data Directory
55
+
56
+ The `--data-dir` parameter specifies the root directory for MemClaw data. By default, use the system's application data directory:
55
57
 
56
- Edit the configuration file and fill in required fields:
58
+ | Platform | Default `--data-dir` |
59
+ |----------|----------------------|
60
+ | macOS | `~/Library/Application Support/memclaw` |
61
+ | Windows | `%LOCALAPPDATA%\memclaw` |
62
+ | Linux | `~/.local/share/memclaw` |
63
+
64
+ The `config.toml` file should be placed directly in this directory.
65
+
66
+ ### Step 3: Create Configuration File
67
+
68
+ **CRITICAL**: The `config.toml` file MUST be placed in the data directory BEFORE starting cortex-mem-service.
69
+
70
+ Create `config.toml` with the following content:
57
71
 
58
72
  ```toml
73
+ # MemClaw Configuration
74
+ #
75
+ # Fill in the required values marked with [REQUIRED] before starting the service.
76
+
77
+ # ============================================================
78
+ # Qdrant Vector Database Configuration
79
+ # ============================================================
80
+ [qdrant]
81
+ # Qdrant gRPC API URL
82
+ url = "http://localhost:6334"
83
+ # Collection name for storing memory vectors
84
+ collection_name = "memclaw"
85
+ # Connection timeout in seconds
86
+ timeout_secs = 30
87
+
88
+ # ============================================================
59
89
  # LLM Configuration [REQUIRED for memory processing]
90
+ # ============================================================
60
91
  [llm]
61
92
  # Your LLM API endpoint (OpenAI-compatible)
62
93
  api_base_url = "https://api.openai.com/v1"
63
94
  # Your API key [REQUIRED]
64
- api_key = "sk-xxx"
95
+ api_key = "your-api-key-here"
65
96
  # Model for memory extraction and layer generation
66
- model_efficient = "gpt-4o-mini"
97
+ model_efficient = "gpt-5-mini"
67
98
  temperature = 0.1
68
- max_tokens = 4096
99
+ max_tokens = 65535
69
100
 
101
+ # ============================================================
70
102
  # Embedding Configuration [REQUIRED for vector search]
103
+ # ============================================================
71
104
  [embedding]
72
105
  # Your embedding API endpoint (OpenAI-compatible)
73
106
  api_base_url = "https://api.openai.com/v1"
74
107
  # Your API key [REQUIRED - can be same as llm.api_key]
75
- api_key = "sk-xxx"
108
+ api_key = "your-api-key-here"
76
109
  model_name = "text-embedding-3-small"
77
110
  batch_size = 10
111
+ timeout_secs = 30
112
+
113
+ # ============================================================
114
+ # Service Configuration
115
+ # ============================================================
116
+ [server]
117
+ host = "localhost"
118
+ port = 8085
119
+
120
+ # ============================================================
121
+ # Cortex Memory Settings
122
+ # ============================================================
123
+ [cortex]
124
+ # Data directory path - MUST match the --data-dir argument
125
+ # Default paths by platform:
126
+ # macOS: "~/Library/Application Support/memclaw"
127
+ # Windows: "%LOCALAPPDATA%\\memclaw"
128
+ # Linux: "~/.local/share/memclaw"
129
+ data_dir = "."
130
+ enable_intent_analysis = false
131
+ ```
132
+
133
+ ### Step 4: Verify Services
134
+
135
+ Check that Qdrant and cortex-mem-service are accessible:
136
+
137
+ | Service | Port | Health Check |
138
+ |---------|------|--------------|
139
+ | Qdrant | 6333 (HTTP), 6334 (gRPC) | HTTP GET to `http://localhost:6333` should return Qdrant version info |
140
+ | cortex-mem-service | 8085 | HTTP GET to `http://localhost:8085/health` should return `{"status":"ok"}` |
141
+
142
+ ### Step 5: Start Services (if not running)
143
+
144
+ **Starting Qdrant:**
145
+
146
+ If `autoStartServices` is `true` in plugin config, MemClaw will start Qdrant automatically.
147
+
148
+ To start manually, run the Qdrant binary from the platform package with:
149
+ - `--storage-path` pointing to a storage directory
150
+ - `--http-port 6333`
151
+ - `--grpc-port 6334`
152
+
153
+ **Starting cortex-mem-service:**
154
+
155
+ **CRITICAL**: cortex-mem-service MUST be started with `--data-dir` flag pointing to the directory containing `config.toml`.
156
+
157
+ Arguments:
158
+ - `--data-dir <path>` — Path to data directory containing `config.toml` (**REQUIRED**)
159
+ - `--config <path>` — Path to config file (optional, defaults to `config.toml` in data directory)
160
+
161
+ Example:
162
+ ```
163
+ cortex-mem-service --data-dir ~/Library/Application\ Support/memclaw
164
+ ```
165
+
166
+ Or on Windows:
167
+ ```
168
+ cortex-mem-service --data-dir %LOCALAPPDATA%\memclaw
78
169
  ```
79
170
 
80
- Then restart OpenClaw.
171
+ ## Plugin Configuration
81
172
 
82
- ## Configuration Options
173
+ Edit your `openclaw.json`:
174
+
175
+ ```json
176
+ {
177
+ "plugins": {
178
+ "entries": {
179
+ "memclaw": {
180
+ "enabled": true,
181
+ "config": {
182
+ "serviceUrl": "http://localhost:8085",
183
+ "tenantId": "tenant_claw",
184
+ "autoStartServices": true
185
+ }
186
+ }
187
+ }
188
+ },
189
+ "agents": {
190
+ "defaults": {
191
+ "memorySearch": { "enabled": false }
192
+ }
193
+ }
194
+ }
195
+ ```
196
+
197
+ > **Important**: Set `memorySearch.enabled: false` to disable OpenClaw's built-in memory search and use MemClaw instead.
198
+
199
+ ### Configuration Options
83
200
 
84
201
  | Option | Type | Default | Description |
85
202
  |--------|------|---------|-------------|
86
- | `serviceUrl` | string | `http://127.0.0.1:8085` | Cortex Memory service URL |
203
+ | `serviceUrl` | string | `http://localhost:8085` | Cortex Memory service URL |
87
204
  | `tenantId` | string | `tenant_claw` | Tenant ID for data isolation |
88
- | `autoStartServices` | boolean | `true` | Auto-start Qdrant and service |
205
+ | `autoStartServices` | boolean | `true` | Auto-start Qdrant and cortex-mem-service |
89
206
  | `defaultSessionId` | string | `default` | Default session for memory operations |
90
207
  | `searchLimit` | number | `10` | Default number of search results |
91
208
  | `minScore` | number | `0.6` | Minimum relevance score (0-1) |
92
209
 
93
210
  ## Troubleshooting
94
211
 
95
- ### Services Won't Start
212
+ ### Platform Not Supported
213
+
214
+ If you see "Platform not supported" error:
215
+ - Verify you are on macOS Apple Silicon or Windows x64
216
+ - Check that the correct `@memclaw/bin-*` package is installed
217
+
218
+ ### Binaries Not Found
219
+
220
+ If binaries are missing:
221
+ 1. Verify `@memclaw/bin-*` package is in `node_modules`
222
+ 2. Try reinstalling: `npm install @memclaw/bin-darwin-arm64` (or `bin-win-x64`)
223
+
224
+ ### cortex-mem-service Won't Start
225
+
226
+ 1. Verify `--data-dir` flag is provided
227
+ 2. Verify `config.toml` exists in the data directory
228
+ 3. Verify required fields in `config.toml`:
229
+ - `llm.api_key` is non-empty
230
+ - `embedding.api_key` is non-empty
231
+ - `cortex.data_dir` matches `--data-dir` argument
232
+
233
+ Default data directories:
234
+ | Platform | Path |
235
+ |----------|------|
236
+ | macOS | `~/Library/Application Support/memclaw` |
237
+ | Windows | `%LOCALAPPDATA%\memclaw` |
238
+ | Linux | `~/.local/share/memclaw` |
239
+
240
+ ### Services Not Accessible
96
241
 
97
- 1. Check that ports 6333, 6334, 8085 are available
98
- 2. Verify `api_key` fields are filled in config.toml
99
- 3. Run `openclaw skills` to check plugin status
242
+ 1. Verify ports 6333, 6334, 8085 are not in use by other applications
243
+ 2. Verify firewall allows connections on these ports
244
+ 3. Check service logs for error messages
100
245
 
101
- ### Configuration File Not Created
246
+ ### Configuration File Issues
102
247
 
103
- 1. Ensure OpenClaw has write permissions to the config directory
104
- 2. Check OpenClaw logs for error messages
105
- 3. Manually create the directory and restart OpenClaw
248
+ 1. Ensure `config.toml` uses valid TOML syntax
249
+ 2. Verify file encoding is UTF-8
250
+ 3. On Windows, use double backslashes in paths: `C:\\Users\\...`
106
251
 
107
252
  ### API Key Issues
108
253
 
109
- 1. Verify your API key is valid and has sufficient credits
110
- 2. Ensure `api_base_url` is correct for your provider
111
- 3. Check network connectivity to the API endpoint
254
+ 1. Verify API key is valid and has sufficient credits
255
+ 2. Verify `api_base_url` is correct for your provider
256
+ 3. Verify network connectivity to the API endpoint