@sharkdyt/omni-memory-mcp 1.0.4 → 1.0.6
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 +318 -291
- package/dist/database.d.ts +2 -1
- package/dist/database.d.ts.map +1 -1
- package/dist/database.js +156 -34
- package/dist/database.js.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/tools/index.d.ts +2 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +2 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/prune.d.ts +11 -0
- package/dist/tools/prune.d.ts.map +1 -0
- package/dist/tools/prune.js +34 -0
- package/dist/tools/prune.js.map +1 -0
- package/dist/tools/stats.d.ts.map +1 -1
- package/dist/tools/stats.js +15 -9
- package/dist/tools/stats.js.map +1 -1
- package/dist/tools/upsert.d.ts +16 -0
- package/dist/tools/upsert.d.ts.map +1 -0
- package/dist/tools/upsert.js +57 -0
- package/dist/tools/upsert.js.map +1 -0
- package/dist/types.d.ts +18 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +68 -68
package/README.md
CHANGED
|
@@ -1,322 +1,349 @@
|
|
|
1
|
-
# Omni Memory MCP
|
|
2
|
-
|
|
3
|
-
Universal memory MCP server for multi-agent workflows.
|
|
4
|
-
100% local with SQLite + FTS5.
|
|
5
|
-
|
|
6
|
-
## npm Package
|
|
7
|
-
|
|
8
|
-
- Package: `@sharkdyt/omni-memory-mcp`
|
|
9
|
-
- npm: `https://www.npmjs.com/package/@sharkdyt/omni-memory-mcp`
|
|
10
|
-
- Current `latest`: `1.0.
|
|
11
|
-
|
|
12
|
-
## Project Memory
|
|
13
|
-
|
|
14
|
-
This project does not keep local `memory-bank/` files.
|
|
15
|
-
Operational context is stored through Omni Memory itself.
|
|
16
|
-
|
|
17
|
-
## Why this exists
|
|
18
|
-
|
|
19
|
-
- Keep AI memory local (no cloud dependency)
|
|
20
|
-
- Reuse the same memory across tools/agents
|
|
21
|
-
- Search fast with SQLite FTS5
|
|
22
|
-
|
|
23
|
-
## Features
|
|
24
|
-
|
|
1
|
+
# Omni Memory MCP
|
|
2
|
+
|
|
3
|
+
Universal memory MCP server for multi-agent workflows.
|
|
4
|
+
100% local with SQLite + FTS5.
|
|
5
|
+
|
|
6
|
+
## npm Package
|
|
7
|
+
|
|
8
|
+
- Package: `@sharkdyt/omni-memory-mcp`
|
|
9
|
+
- npm: `https://www.npmjs.com/package/@sharkdyt/omni-memory-mcp`
|
|
10
|
+
- Current `latest`: `1.0.6`
|
|
11
|
+
|
|
12
|
+
## Project Memory
|
|
13
|
+
|
|
14
|
+
This project does not keep local `memory-bank/` files.
|
|
15
|
+
Operational context is stored through Omni Memory itself.
|
|
16
|
+
|
|
17
|
+
## Why this exists
|
|
18
|
+
|
|
19
|
+
- Keep AI memory local (no cloud dependency)
|
|
20
|
+
- Reuse the same memory across tools/agents
|
|
21
|
+
- Search fast with SQLite FTS5
|
|
22
|
+
|
|
23
|
+
## Features
|
|
24
|
+
|
|
25
25
|
- Local-first storage (SQLite)
|
|
26
26
|
- Full-text search with FTS5
|
|
27
27
|
- MCP-native tools
|
|
28
28
|
- CRUD operations (`memory_add`, `memory_get`, `memory_update`, `memory_delete`, `memory_list`, `memory_search`)
|
|
29
|
+
- Canonical memory writes with `memory_upsert`
|
|
29
30
|
- Diagnostic tools (`memory_stats`)
|
|
30
31
|
- Organization by `area`, `project`, and `tags`
|
|
31
|
-
- Shared long-term memory across multiple projects and multiple coding agents/clients
|
|
32
|
-
- Canonical MCP config + client adapters (OpenCode, Codex, Cursor)
|
|
33
|
-
|
|
34
|
-
## Cross-Client MCP Standard
|
|
35
|
-
|
|
36
|
-
This project keeps one canonical MCP config and generates client-specific files.
|
|
37
|
-
|
|
38
|
-
Canonical source:
|
|
39
|
-
|
|
40
|
-
- `config/mcp/servers.json`
|
|
41
|
-
|
|
42
|
-
Generate adapters:
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
npm run mcp:generate
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
Validate adapters:
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
npm run mcp:validate
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
Generated files:
|
|
55
|
-
|
|
56
|
-
- `config/mcp/generated/opencode.windows.json`
|
|
57
|
-
- `config/mcp/generated/opencode.posix.json`
|
|
58
|
-
- `config/mcp/generated/opencode.windows.array.npx.json`
|
|
59
|
-
- `config/mcp/generated/opencode.windows.string-args.npx.json`
|
|
60
|
-
- `config/mcp/generated/opencode.windows.array.fallback-dist.json`
|
|
61
|
-
- `config/mcp/generated/opencode.posix.array.npx.json`
|
|
62
|
-
- `config/mcp/generated/opencode.posix.string-args.npx.json`
|
|
63
|
-
- `config/mcp/generated/opencode.posix.array.fallback-dist.json`
|
|
64
|
-
- `config/mcp/generated/codex.windows.json`
|
|
65
|
-
- `config/mcp/generated/codex.posix.json`
|
|
66
|
-
- `config/mcp/generated/cursor.windows.json`
|
|
67
|
-
- `config/mcp/generated/cursor.posix.json`
|
|
68
|
-
|
|
69
|
-
Compatibility matrix:
|
|
70
|
-
|
|
71
|
-
- `docs/mcp-compatibility-matrix.md`
|
|
72
|
-
|
|
73
|
-
## Quick Start (Most Newbie Friendly)
|
|
74
|
-
|
|
75
|
-
If your MCP client supports `command` + `args` + `env`, use:
|
|
76
|
-
|
|
77
|
-
```json
|
|
78
|
-
{
|
|
79
|
-
"mcpServers": {
|
|
80
|
-
"omni-memory": {
|
|
81
|
-
"command": "npx",
|
|
82
|
-
"args": ["-y", "@sharkdyt/omni-memory-mcp"],
|
|
83
|
-
"env": {
|
|
84
|
-
"OMNI_MEMORY_DIR": "~/.omni-memory"
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
This is the easiest setup because:
|
|
92
|
-
- No manual clone path
|
|
93
|
-
- No manual build path
|
|
94
|
-
- Works after npm registry publish
|
|
95
|
-
|
|
96
|
-
### OpenCode compatibility profiles
|
|
97
|
-
|
|
98
|
-
OpenCode support can vary by client version and environment.
|
|
99
|
-
This repository now generates three OpenCode profiles for each platform:
|
|
100
|
-
|
|
101
|
-
- `array.npx`: `command` as array (`["npx","-y","@sharkdyt/omni-memory-mcp"]`)
|
|
102
|
-
- `string-args.npx`: `command` as string + `args`
|
|
103
|
-
- `array.fallback-dist`: shell command that tries `npx` and falls back to local `dist/index.js`
|
|
104
|
-
|
|
105
|
-
Recommended default for OpenCode:
|
|
106
|
-
|
|
107
|
-
- `config/mcp/generated/opencode.<platform>.json` (this points to `array.fallback-dist`)
|
|
108
|
-
|
|
109
|
-
If you prefer explicit profile selection, copy one of:
|
|
110
|
-
|
|
111
|
-
- `config/mcp/generated/opencode.<platform>.array.npx.json`
|
|
112
|
-
- `config/mcp/generated/opencode.<platform>.string-args.npx.json`
|
|
113
|
-
- `config/mcp/generated/opencode.<platform>.array.fallback-dist.json`
|
|
114
|
-
|
|
115
|
-
## Path Guide (Relative vs Absolute)
|
|
116
|
-
|
|
117
|
-
If you prefer running from local source (`dist/index.js`), use an **absolute path**.
|
|
118
|
-
|
|
119
|
-
- Relative path example (can break): `./dist/index.js`
|
|
120
|
-
- Absolute path example (recommended): full path to file on disk
|
|
121
|
-
|
|
122
|
-
Why relative paths break:
|
|
123
|
-
- Many MCP clients resolve paths from their own process working directory, not from your config file directory.
|
|
124
|
-
|
|
125
|
-
### Absolute path examples
|
|
126
|
-
|
|
127
|
-
Linux:
|
|
128
|
-
|
|
129
|
-
```json
|
|
130
|
-
{
|
|
131
|
-
"command": "node",
|
|
132
|
-
"args": ["/home/your-user/.local/mcp/omni-memory-mcp/dist/index.js"]
|
|
133
|
-
}
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
macOS:
|
|
137
|
-
|
|
138
|
-
```json
|
|
139
|
-
{
|
|
140
|
-
"command": "node",
|
|
141
|
-
"args": ["/Users/your-user/.local/mcp/omni-memory-mcp/dist/index.js"]
|
|
142
|
-
}
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
Windows:
|
|
146
|
-
|
|
147
|
-
```json
|
|
148
|
-
{
|
|
149
|
-
"command": "node",
|
|
150
|
-
"args": ["C:\\Users\\your-user\\.local\\mcp\\omni-memory-mcp\\dist\\index.js"]
|
|
151
|
-
}
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
Note:
|
|
155
|
-
- `~` is convenient, but not every client expands it consistently on Windows. Absolute paths are safer.
|
|
156
|
-
|
|
157
|
-
## Install from Source (Local Dev)
|
|
158
|
-
|
|
159
|
-
```bash
|
|
160
|
-
git clone https://github.com/allanschramm/omni-memory-mcp.git
|
|
161
|
-
cd omni-memory-mcp
|
|
162
|
-
npm install
|
|
163
|
-
npm run build
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
Then configure your MCP client with `node` + absolute path to `dist/index.js`.
|
|
167
|
-
|
|
168
|
-
## OpenCode / Codex / Cursor
|
|
169
|
-
|
|
170
|
-
Instead of writing each config by hand, generate client-specific adapters:
|
|
171
|
-
|
|
172
|
-
```bash
|
|
173
|
-
npm run mcp:generate
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
Then copy the generated file for your client/platform from `config/mcp/generated/`.
|
|
177
|
-
|
|
178
|
-
### OpenCode troubleshooting priority
|
|
179
|
-
|
|
180
|
-
1. Use `opencode.<platform>.json` first (default fallback profile).
|
|
181
|
-
2. If your OpenCode build prefers native `npx` only, try `opencode.<platform>.array.npx.json`.
|
|
182
|
-
3. If your OpenCode build requires `command` string + `args`, use `opencode.<platform>.string-args.npx.json`.
|
|
183
|
-
|
|
184
|
-
## Tools
|
|
185
|
-
|
|
32
|
+
- Shared long-term memory across multiple projects and multiple coding agents/clients
|
|
33
|
+
- Canonical MCP config + client adapters (OpenCode, Codex, Cursor)
|
|
34
|
+
|
|
35
|
+
## Cross-Client MCP Standard
|
|
36
|
+
|
|
37
|
+
This project keeps one canonical MCP config and generates client-specific files.
|
|
38
|
+
|
|
39
|
+
Canonical source:
|
|
40
|
+
|
|
41
|
+
- `config/mcp/servers.json`
|
|
42
|
+
|
|
43
|
+
Generate adapters:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npm run mcp:generate
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Validate adapters:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
npm run mcp:validate
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Generated files:
|
|
56
|
+
|
|
57
|
+
- `config/mcp/generated/opencode.windows.json`
|
|
58
|
+
- `config/mcp/generated/opencode.posix.json`
|
|
59
|
+
- `config/mcp/generated/opencode.windows.array.npx.json`
|
|
60
|
+
- `config/mcp/generated/opencode.windows.string-args.npx.json`
|
|
61
|
+
- `config/mcp/generated/opencode.windows.array.fallback-dist.json`
|
|
62
|
+
- `config/mcp/generated/opencode.posix.array.npx.json`
|
|
63
|
+
- `config/mcp/generated/opencode.posix.string-args.npx.json`
|
|
64
|
+
- `config/mcp/generated/opencode.posix.array.fallback-dist.json`
|
|
65
|
+
- `config/mcp/generated/codex.windows.json`
|
|
66
|
+
- `config/mcp/generated/codex.posix.json`
|
|
67
|
+
- `config/mcp/generated/cursor.windows.json`
|
|
68
|
+
- `config/mcp/generated/cursor.posix.json`
|
|
69
|
+
|
|
70
|
+
Compatibility matrix:
|
|
71
|
+
|
|
72
|
+
- `docs/mcp-compatibility-matrix.md`
|
|
73
|
+
|
|
74
|
+
## Quick Start (Most Newbie Friendly)
|
|
75
|
+
|
|
76
|
+
If your MCP client supports `command` + `args` + `env`, use:
|
|
77
|
+
|
|
78
|
+
```json
|
|
79
|
+
{
|
|
80
|
+
"mcpServers": {
|
|
81
|
+
"omni-memory": {
|
|
82
|
+
"command": "npx",
|
|
83
|
+
"args": ["-y", "@sharkdyt/omni-memory-mcp"],
|
|
84
|
+
"env": {
|
|
85
|
+
"OMNI_MEMORY_DIR": "~/.omni-memory"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
This is the easiest setup because:
|
|
93
|
+
- No manual clone path
|
|
94
|
+
- No manual build path
|
|
95
|
+
- Works after npm registry publish
|
|
96
|
+
|
|
97
|
+
### OpenCode compatibility profiles
|
|
98
|
+
|
|
99
|
+
OpenCode support can vary by client version and environment.
|
|
100
|
+
This repository now generates three OpenCode profiles for each platform:
|
|
101
|
+
|
|
102
|
+
- `array.npx`: `command` as array (`["npx","-y","@sharkdyt/omni-memory-mcp"]`)
|
|
103
|
+
- `string-args.npx`: `command` as string + `args`
|
|
104
|
+
- `array.fallback-dist`: shell command that tries `npx` and falls back to local `dist/index.js`
|
|
105
|
+
|
|
106
|
+
Recommended default for OpenCode:
|
|
107
|
+
|
|
108
|
+
- `config/mcp/generated/opencode.<platform>.json` (this points to `array.fallback-dist`)
|
|
109
|
+
|
|
110
|
+
If you prefer explicit profile selection, copy one of:
|
|
111
|
+
|
|
112
|
+
- `config/mcp/generated/opencode.<platform>.array.npx.json`
|
|
113
|
+
- `config/mcp/generated/opencode.<platform>.string-args.npx.json`
|
|
114
|
+
- `config/mcp/generated/opencode.<platform>.array.fallback-dist.json`
|
|
115
|
+
|
|
116
|
+
## Path Guide (Relative vs Absolute)
|
|
117
|
+
|
|
118
|
+
If you prefer running from local source (`dist/index.js`), use an **absolute path**.
|
|
119
|
+
|
|
120
|
+
- Relative path example (can break): `./dist/index.js`
|
|
121
|
+
- Absolute path example (recommended): full path to file on disk
|
|
122
|
+
|
|
123
|
+
Why relative paths break:
|
|
124
|
+
- Many MCP clients resolve paths from their own process working directory, not from your config file directory.
|
|
125
|
+
|
|
126
|
+
### Absolute path examples
|
|
127
|
+
|
|
128
|
+
Linux:
|
|
129
|
+
|
|
130
|
+
```json
|
|
131
|
+
{
|
|
132
|
+
"command": "node",
|
|
133
|
+
"args": ["/home/your-user/.local/mcp/omni-memory-mcp/dist/index.js"]
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
macOS:
|
|
138
|
+
|
|
139
|
+
```json
|
|
140
|
+
{
|
|
141
|
+
"command": "node",
|
|
142
|
+
"args": ["/Users/your-user/.local/mcp/omni-memory-mcp/dist/index.js"]
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Windows:
|
|
147
|
+
|
|
148
|
+
```json
|
|
149
|
+
{
|
|
150
|
+
"command": "node",
|
|
151
|
+
"args": ["C:\\Users\\your-user\\.local\\mcp\\omni-memory-mcp\\dist\\index.js"]
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Note:
|
|
156
|
+
- `~` is convenient, but not every client expands it consistently on Windows. Absolute paths are safer.
|
|
157
|
+
|
|
158
|
+
## Install from Source (Local Dev)
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
git clone https://github.com/allanschramm/omni-memory-mcp.git
|
|
162
|
+
cd omni-memory-mcp
|
|
163
|
+
npm install
|
|
164
|
+
npm run build
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Then configure your MCP client with `node` + absolute path to `dist/index.js`.
|
|
168
|
+
|
|
169
|
+
## OpenCode / Codex / Cursor
|
|
170
|
+
|
|
171
|
+
Instead of writing each config by hand, generate client-specific adapters:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
npm run mcp:generate
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Then copy the generated file for your client/platform from `config/mcp/generated/`.
|
|
178
|
+
|
|
179
|
+
### OpenCode troubleshooting priority
|
|
180
|
+
|
|
181
|
+
1. Use `opencode.<platform>.json` first (default fallback profile).
|
|
182
|
+
2. If your OpenCode build prefers native `npx` only, try `opencode.<platform>.array.npx.json`.
|
|
183
|
+
3. If your OpenCode build requires `command` string + `args`, use `opencode.<platform>.string-args.npx.json`.
|
|
184
|
+
|
|
185
|
+
## Tools
|
|
186
|
+
|
|
186
187
|
### `memory_add`
|
|
187
188
|
|
|
188
|
-
|
|
189
|
-
{
|
|
190
|
-
"content": "User prefers TypeScript with strict mode",
|
|
191
|
-
"area": "preferences",
|
|
192
|
-
"project": "my-project",
|
|
193
|
-
"tags": ["typescript", "coding-style"]
|
|
194
|
-
}
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
### `memory_get`
|
|
189
|
+
Use `memory_add` for append-only notes that should always create a new record.
|
|
198
190
|
|
|
199
191
|
```json
|
|
200
192
|
{
|
|
201
|
-
"
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
### `memory_update`
|
|
206
|
-
|
|
207
|
-
```json
|
|
208
|
-
{
|
|
209
|
-
"id": "abc123",
|
|
210
|
-
"content": "Updated content",
|
|
211
|
-
"tags": ["new-tag"]
|
|
193
|
+
"content": "User prefers TypeScript with strict mode",
|
|
194
|
+
"area": "preferences",
|
|
195
|
+
"project": "my-project",
|
|
196
|
+
"tags": ["typescript", "coding-style"]
|
|
212
197
|
}
|
|
213
198
|
```
|
|
214
199
|
|
|
215
|
-
### `
|
|
216
|
-
|
|
217
|
-
```json
|
|
218
|
-
{
|
|
219
|
-
"id": "abc123"
|
|
220
|
-
}
|
|
221
|
-
```
|
|
200
|
+
### `memory_upsert`
|
|
222
201
|
|
|
223
|
-
|
|
202
|
+
Use `memory_upsert` when agents should converge on one canonical memory instead of creating duplicates.
|
|
224
203
|
|
|
225
204
|
```json
|
|
226
205
|
{
|
|
227
|
-
"
|
|
228
|
-
"
|
|
229
|
-
"
|
|
230
|
-
"
|
|
206
|
+
"content": "Repository standard: prefer exact Zod schemas for MCP tools",
|
|
207
|
+
"name": "repo-tooling-standard",
|
|
208
|
+
"project": "omni-memory-mcp",
|
|
209
|
+
"area": "preferences",
|
|
210
|
+
"tags": ["mcp", "zod"]
|
|
231
211
|
}
|
|
232
212
|
```
|
|
233
213
|
|
|
234
|
-
|
|
214
|
+
Follow-up updates can reuse the same canonical slot:
|
|
235
215
|
|
|
236
216
|
```json
|
|
237
217
|
{
|
|
238
|
-
"
|
|
239
|
-
"
|
|
240
|
-
"
|
|
241
|
-
"enableAdvancedSyntax": false
|
|
218
|
+
"content": "Repository standard: prefer exact Zod schemas and concise tool text responses",
|
|
219
|
+
"match_name": "repo-tooling-standard",
|
|
220
|
+
"project": "omni-memory-mcp"
|
|
242
221
|
}
|
|
243
222
|
```
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
223
|
+
|
|
224
|
+
### `memory_get`
|
|
225
|
+
|
|
226
|
+
```json
|
|
227
|
+
{
|
|
228
|
+
"id": "abc123"
|
|
229
|
+
}
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### `memory_update`
|
|
233
|
+
|
|
234
|
+
```json
|
|
235
|
+
{
|
|
236
|
+
"id": "abc123",
|
|
237
|
+
"content": "Updated content",
|
|
238
|
+
"tags": ["new-tag"]
|
|
239
|
+
}
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### `memory_delete`
|
|
243
|
+
|
|
244
|
+
```json
|
|
245
|
+
{
|
|
246
|
+
"id": "abc123"
|
|
247
|
+
}
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
### `memory_list`
|
|
251
|
+
|
|
252
|
+
```json
|
|
253
|
+
{
|
|
254
|
+
"area": "snippets",
|
|
255
|
+
"project": "my-project",
|
|
256
|
+
"tag": "important",
|
|
257
|
+
"limit": 20
|
|
258
|
+
}
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### `memory_search`
|
|
262
|
+
|
|
263
|
+
```json
|
|
264
|
+
{
|
|
265
|
+
"query": "typescript configuration",
|
|
266
|
+
"project": "my-project",
|
|
267
|
+
"limit": 10,
|
|
268
|
+
"enableAdvancedSyntax": false
|
|
269
|
+
}
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
*Note: `enableAdvancedSyntax` allows FTS5 boolean logic (e.g. `"typescript" AND "react" NOT "vue"`) but requires a strictly valid FTS5 query or it will throw an error.*
|
|
273
|
+
|
|
247
274
|
### `memory_stats`
|
|
248
275
|
|
|
249
276
|
```json
|
|
250
277
|
{}
|
|
251
278
|
```
|
|
252
|
-
*Returns total memories, size on disk,
|
|
253
|
-
|
|
254
|
-
## Memory Areas
|
|
255
|
-
|
|
256
|
-
| Area | Description |
|
|
257
|
-
| --- | --- |
|
|
258
|
-
| `general` | General notes |
|
|
259
|
-
| `snippets` | Code snippets and patterns |
|
|
260
|
-
| `solutions` | Problem-solution pairs |
|
|
261
|
-
| `preferences` | User/team preferences |
|
|
262
|
-
|
|
263
|
-
## Data Storage
|
|
264
|
-
|
|
265
|
-
Default directory:
|
|
266
|
-
|
|
267
|
-
```text
|
|
268
|
-
~/.omni-memory/
|
|
269
|
-
|- omni-memory.db
|
|
270
|
-
|- omni-memory.db-wal
|
|
271
|
-
`- omni-memory.db-shm
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
Environment variables:
|
|
275
|
-
|
|
276
|
-
| Variable | Default | Description |
|
|
277
|
-
| --- | --- | --- |
|
|
278
|
-
| `OMNI_MEMORY_DIR` | `~/.omni-memory` | Data storage directory |
|
|
279
|
-
| `OMNI_MEMORY_DB` | `{OMNI_MEMORY_DIR}/omni-memory.db` | SQLite DB file path |
|
|
280
|
-
|
|
281
|
-
## Development
|
|
282
|
-
|
|
283
|
-
```bash
|
|
284
|
-
npm install
|
|
285
|
-
npm run check
|
|
286
|
-
npm run build
|
|
287
|
-
npm test
|
|
288
|
-
```
|
|
289
|
-
|
|
290
|
-
Extra commands:
|
|
291
|
-
|
|
292
|
-
```bash
|
|
293
|
-
npm run dev # watch mode
|
|
294
|
-
npm run start # run server from dist/
|
|
295
|
-
```
|
|
296
|
-
|
|
297
|
-
## Documentation and Memory Hygiene
|
|
298
|
-
|
|
299
|
-
For every meaningful project change, keep both sources of truth updated:
|
|
300
|
-
|
|
301
|
-
1. Repository docs (`README.md`, `docs/*`, compatibility/config docs) must reflect current behavior.
|
|
302
|
-
2. Omni Memory must receive a concise project memory entry with:
|
|
303
|
-
- what changed,
|
|
304
|
-
- why it changed,
|
|
305
|
-
- constraints/assumptions,
|
|
306
|
-
- next steps (if any).
|
|
307
|
-
|
|
308
|
-
Minimum release/update gate:
|
|
309
|
-
|
|
310
|
-
1. `npm run mcp:generate`
|
|
311
|
-
2. `npm run mcp:validate`
|
|
312
|
-
3. `npm run check`
|
|
313
|
-
4. Update docs for any behavior/config change
|
|
314
|
-
5. Add/update important project memory in Omni Memory
|
|
315
|
-
|
|
316
|
-
Operational checklist:
|
|
317
|
-
|
|
318
|
-
- `docs/release-checklist.md`
|
|
319
|
-
|
|
320
|
-
## License
|
|
321
|
-
|
|
322
|
-
Apache 2.0. See `LICENSE`.
|
|
279
|
+
*Returns total memories, size on disk, breakdown by project and area, plus local upsert metrics such as `memory_upsert_created` and `memory_upsert_updated`.*
|
|
280
|
+
|
|
281
|
+
## Memory Areas
|
|
282
|
+
|
|
283
|
+
| Area | Description |
|
|
284
|
+
| --- | --- |
|
|
285
|
+
| `general` | General notes |
|
|
286
|
+
| `snippets` | Code snippets and patterns |
|
|
287
|
+
| `solutions` | Problem-solution pairs |
|
|
288
|
+
| `preferences` | User/team preferences |
|
|
289
|
+
|
|
290
|
+
## Data Storage
|
|
291
|
+
|
|
292
|
+
Default directory:
|
|
293
|
+
|
|
294
|
+
```text
|
|
295
|
+
~/.omni-memory/
|
|
296
|
+
|- omni-memory.db
|
|
297
|
+
|- omni-memory.db-wal
|
|
298
|
+
`- omni-memory.db-shm
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
Environment variables:
|
|
302
|
+
|
|
303
|
+
| Variable | Default | Description |
|
|
304
|
+
| --- | --- | --- |
|
|
305
|
+
| `OMNI_MEMORY_DIR` | `~/.omni-memory` | Data storage directory |
|
|
306
|
+
| `OMNI_MEMORY_DB` | `{OMNI_MEMORY_DIR}/omni-memory.db` | SQLite DB file path |
|
|
307
|
+
|
|
308
|
+
## Development
|
|
309
|
+
|
|
310
|
+
```bash
|
|
311
|
+
npm install
|
|
312
|
+
npm run check
|
|
313
|
+
npm run build
|
|
314
|
+
npm test
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
Extra commands:
|
|
318
|
+
|
|
319
|
+
```bash
|
|
320
|
+
npm run dev # watch mode
|
|
321
|
+
npm run start # run server from dist/
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
## Documentation and Memory Hygiene
|
|
325
|
+
|
|
326
|
+
For every meaningful project change, keep both sources of truth updated:
|
|
327
|
+
|
|
328
|
+
1. Repository docs (`README.md`, `docs/*`, compatibility/config docs) must reflect current behavior.
|
|
329
|
+
2. Omni Memory must receive a concise project memory entry with:
|
|
330
|
+
- what changed,
|
|
331
|
+
- why it changed,
|
|
332
|
+
- constraints/assumptions,
|
|
333
|
+
- next steps (if any).
|
|
334
|
+
|
|
335
|
+
Minimum release/update gate:
|
|
336
|
+
|
|
337
|
+
1. `npm run mcp:generate`
|
|
338
|
+
2. `npm run mcp:validate`
|
|
339
|
+
3. `npm run check`
|
|
340
|
+
4. Update docs for any behavior/config change
|
|
341
|
+
5. Add/update important project memory in Omni Memory
|
|
342
|
+
|
|
343
|
+
Operational checklist:
|
|
344
|
+
|
|
345
|
+
- `docs/release-checklist.md`
|
|
346
|
+
|
|
347
|
+
## License
|
|
348
|
+
|
|
349
|
+
Apache 2.0. See `LICENSE`.
|
package/dist/database.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Omni Memory MCP - Database Module
|
|
3
3
|
* SQLite + FTS5 for local memory storage and full-text search
|
|
4
4
|
*/
|
|
5
|
-
import type { Memory, AddMemoryArgs, UpdateMemoryArgs, ListMemoryArgs, SearchMemoryArgs, SearchResult, MemoryStats } from "./types.js";
|
|
5
|
+
import type { Memory, AddMemoryArgs, UpdateMemoryArgs, UpsertMemoryArgs, ListMemoryArgs, SearchMemoryArgs, SearchResult, MemoryStats, UpsertMemoryResult } from "./types.js";
|
|
6
6
|
declare function normalizeUserPath(inputPath: string): string;
|
|
7
7
|
declare function resolveStoragePaths(): {
|
|
8
8
|
dataDir: string;
|
|
@@ -15,6 +15,7 @@ export declare function getMemory(id: string): Memory | null;
|
|
|
15
15
|
export declare function updateMemory(args: UpdateMemoryArgs): {
|
|
16
16
|
changes: number;
|
|
17
17
|
};
|
|
18
|
+
export declare function upsertMemory(args: UpsertMemoryArgs): UpsertMemoryResult;
|
|
18
19
|
export declare function deleteMemory(id: string): {
|
|
19
20
|
changes: number;
|
|
20
21
|
};
|
package/dist/database.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../src/database.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,KAAK,EACV,MAAM,EAEN,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,WAAW,
|
|
1
|
+
{"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../src/database.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,KAAK,EACV,MAAM,EAEN,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAcpB,iBAAS,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CASpD;AAED,iBAAS,mBAAmB,IAAI;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAQlE;AAqID,wBAAgB,SAAS,CAAC,IAAI,EAAE,aAAa,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAgB7D;AAED,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAMnD;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAyBxE;AAqBD,wBAAgB,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,kBAAkB,CA8EvE;AAED,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAM5D;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,EAAE,CA6B3D;AAED,wBAAgB,QAAQ,IAAI,WAAW,CAgDtC;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,gBAAgB,GAAG,YAAY,EAAE,CA0DrE;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,gBAAgB,GAAG,YAAY,EAAE,CA0CrE;AAED,wBAAgB,aAAa,IAAI,IAAI,CAKpC;AAED,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,CAAC;AAGlD,wBAAgB,aAAa,IAAI,IAAI,CAUpC"}
|