mnemosyne-core 2.0.2 → 2.1.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.
Files changed (47) hide show
  1. package/README.md +42 -25
  2. package/dist/{Store-BtdYuiUx.d.mts → Store-BJ8b6xbs.d.mts} +2 -0
  3. package/dist/{Store-BtdYuiUx.d.ts → Store-BJ8b6xbs.d.ts} +2 -0
  4. package/dist/cli/index.js +475 -5708
  5. package/dist/cli/index.js.map +1 -1
  6. package/dist/cli/index.mjs +475 -5709
  7. package/dist/cli/index.mjs.map +1 -1
  8. package/dist/{index-yTOihMUk.d.mts → index-2AoCh09i.d.mts} +1 -1
  9. package/dist/{index-B2oTMNlL.d.ts → index-BZrUZX8Z.d.ts} +1 -1
  10. package/dist/{index-B8PTQKy9.d.mts → index-CHbW0NJZ.d.mts} +1 -1
  11. package/dist/{index-DWk78ifo.d.ts → index-CfqixdlW.d.ts} +1 -1
  12. package/dist/index.d.mts +4 -4
  13. package/dist/index.d.ts +4 -4
  14. package/dist/index.js +328 -5739
  15. package/dist/index.js.map +1 -1
  16. package/dist/index.mjs +327 -5739
  17. package/dist/index.mjs.map +1 -1
  18. package/dist/mcp/index.d.mts +2 -2
  19. package/dist/mcp/index.d.ts +2 -2
  20. package/dist/mcp/index.js +19 -2
  21. package/dist/mcp/index.js.map +1 -1
  22. package/dist/mcp/index.mjs +26 -2
  23. package/dist/mcp/index.mjs.map +1 -1
  24. package/dist/sdk/index.d.mts +202 -50
  25. package/dist/sdk/index.d.ts +202 -50
  26. package/dist/sdk/index.js +76 -34
  27. package/dist/sdk/index.js.map +1 -1
  28. package/dist/sdk/index.mjs +76 -34
  29. package/dist/sdk/index.mjs.map +1 -1
  30. package/dist/server/api.d.mts +1 -1
  31. package/dist/server/api.d.ts +1 -1
  32. package/dist/server/api.js +231 -154
  33. package/dist/server/api.js.map +1 -1
  34. package/dist/server/api.mjs +231 -154
  35. package/dist/server/api.mjs.map +1 -1
  36. package/dist/server/index.d.mts +2 -2
  37. package/dist/server/index.d.ts +2 -2
  38. package/dist/server/index.js +296 -5711
  39. package/dist/server/index.js.map +1 -1
  40. package/dist/server/index.mjs +295 -5711
  41. package/dist/server/index.mjs.map +1 -1
  42. package/dist/server/websocket.d.mts +1 -1
  43. package/dist/server/websocket.d.ts +1 -1
  44. package/dist/ws/index.d.mts +1 -1
  45. package/dist/ws/index.d.ts +1 -1
  46. package/package.json +1 -1
  47. package/dist/sharp-win32-x64-CXV3GA3G.node +0 -0
package/README.md CHANGED
@@ -12,8 +12,8 @@ Your knowledge. One SQLite file. Accessible to you and your agents.
12
12
 
13
13
  ```bash
14
14
  npm install -g mnemosyne-core
15
- mnemosyne init
16
- mnemosyne start
15
+ mnemosyne init --data-dir ./data
16
+ mnemosyne start --data-dir ./data
17
17
  # Open http://localhost:7321/dashboard
18
18
  ```
19
19
 
@@ -29,6 +29,17 @@ Mnemosyne is an **exocortex** — an external brain that belongs to you.
29
29
 
30
30
  ---
31
31
 
32
+ ## Naming Guide
33
+
34
+ | Term | Everyday Meaning |
35
+ |---|---|
36
+ | **Project** | A folder or workspace (e.g. "Work", "Personal") |
37
+ | **Atom** | A note, idea, or document |
38
+ | **Block** | A paragraph, snippet, or file attachment inside an atom |
39
+ | **Bond** | A link or relationship between two atoms |
40
+
41
+ ---
42
+
32
43
  ## Features
33
44
 
34
45
  | Feature | What it does |
@@ -50,16 +61,16 @@ Mnemosyne is an **exocortex** — an external brain that belongs to you.
50
61
 
51
62
  ```bash
52
63
  npm install -g mnemosyne-core
53
- mnemosyne init
54
- mnemosyne start
64
+ mnemosyne init --data-dir ./data
65
+ mnemosyne start --data-dir ./data
55
66
  ```
56
67
 
57
68
  **Or in your project:**
58
69
 
59
70
  ```bash
60
71
  npm install mnemosyne-core
61
- npx mnemosyne init
62
- npx mnemosyne start
72
+ npx mnemosyne init --data-dir ./data
73
+ npx mnemosyne start --data-dir ./data
63
74
  ```
64
75
 
65
76
  **Requirements:** Node.js 20+
@@ -77,7 +88,7 @@ Add to `claude_desktop_config.json`:
77
88
  "mcpServers": {
78
89
  "mnemosyne": {
79
90
  "command": "npx",
80
- "args": ["mnemosyne-core", "start", "--mcp-transport", "stdio"]
91
+ "args": ["mnemosyne-core", "start", "--data-dir", "./data", "--mcp-transport", "stdio"]
81
92
  }
82
93
  }
83
94
  }
@@ -88,7 +99,7 @@ Restart Claude Desktop → Settings → MCP → Mnemosyne appears with all tools
88
99
  ### Cursor (SSE — server mode)
89
100
 
90
101
  ```bash
91
- mnemosyne start --port 7321
102
+ mnemosyne start --data-dir ./data --port 7321
92
103
  ```
93
104
 
94
105
  Then in Cursor: Settings → MCP → Add server → `http://localhost:7321/mcp/manifest`
@@ -99,16 +110,30 @@ Then in Cursor: Settings → MCP → Add server → `http://localhost:7321/mcp/m
99
110
  import { MnemosyneClient } from 'mnemosyne-core/sdk';
100
111
 
101
112
  const client = new MnemosyneClient({ baseUrl: 'http://localhost:7321' });
102
- const atoms = await client.searchSemantic('server setup', { limit: 5 });
113
+
114
+ // Create a project
115
+ const { project } = await client.createProject({ name: 'Work Notes' });
116
+
117
+ // Create an atom (a note)
118
+ const { atom } = await client.createAtom({
119
+ project_id: project.id,
120
+ title: 'Meeting Notes',
121
+ type: 'text',
122
+ });
123
+
124
+ // Search by keyword
125
+ const results = await client.searchKeyword('meeting');
126
+ console.log(`Found ${results.count} results`);
103
127
  ```
104
128
 
129
+ See **[WORKING_EXAMPLE.md](WORKING_EXAMPLE.md)** for a complete runnable walkthrough.
130
+
105
131
  ### Embedded (your own app)
106
132
 
107
133
  ```typescript
108
134
  import { Mnemosyne, ApiRouter, McpServer } from 'mnemosyne-core';
109
135
 
110
- const brain = new Mnemosyne();
111
- await brain.init();
136
+ const brain = new Mnemosyne({ dbPath: './data/nexus.db' });
112
137
 
113
138
  const api = new ApiRouter(brain.store);
114
139
  const mcp = new McpServer(brain.store);
@@ -150,23 +175,15 @@ server.on('request', (req, res) => api.handle(req, res));
150
175
 
151
176
  ---
152
177
 
153
- ## Documentation
154
-
155
- - **[Getting Started](docs/getting-started.md)** — Install, first project, search, export
156
- - **[Agent Setup](docs/agent-setup.md)** — Claude Desktop, Cursor, SDK, permissions
157
- - **[API Reference](docs/04-developer-guide/api-reference.md)** — REST endpoints
158
- - **[Architecture](docs/04-developer-guide/architecture.md)** — Database schema, design decisions
159
-
160
- ---
161
-
162
178
  ## CLI Commands
163
179
 
164
180
  ```bash
165
- mnemosyne init # Scaffold data/ directory + config.yaml + SQLite DB
166
- mnemosyne start # Start server (API + dashboard + MCP SSE)
167
- mnemosyne start --mcp-transport stdio # Stdio mode for Claude Desktop
168
- mnemosyne migrate --from v1.json --to data/nexus.db # v1.0 v2.0
169
- mnemosyne export --project "Work" --format markdown # Export project
181
+ mnemosyne init --data-dir ./data # Scaffold data/ + config.yaml + DB
182
+ mnemosyne start --data-dir ./data # Start server (API + dashboard + MCP SSE)
183
+ mnemosyne start --data-dir ./data --mcp-transport stdio # Stdio for Claude Desktop
184
+ mnemosyne doctor --data-dir ./data # Diagnostics: deps, config, DB health
185
+ mnemosyne migrate --from v1.json --to data/nexus.db # v1.0 → v2.0
186
+ mnemosyne export --project "Work" --format markdown # Export project
170
187
  ```
171
188
 
172
189
  ---
@@ -208,6 +208,7 @@ declare class Store extends EventEmitter {
208
208
  getProject(id: string): Project | undefined;
209
209
  getProjectByName(name: string): Project | undefined;
210
210
  getProjects(): Project[];
211
+ deleteProject(id: string): boolean;
211
212
  createAtom(projectId: string, title: string, type: string, createdBy: string, opts?: {
212
213
  parentId?: string;
213
214
  summary?: string;
@@ -244,6 +245,7 @@ declare class Store extends EventEmitter {
244
245
  outgoing: Bond[];
245
246
  incoming: Bond[];
246
247
  };
248
+ getAllBonds(): Bond[];
247
249
  updateBond(id: string, fields: {
248
250
  label?: string;
249
251
  color?: string;
@@ -208,6 +208,7 @@ declare class Store extends EventEmitter {
208
208
  getProject(id: string): Project | undefined;
209
209
  getProjectByName(name: string): Project | undefined;
210
210
  getProjects(): Project[];
211
+ deleteProject(id: string): boolean;
211
212
  createAtom(projectId: string, title: string, type: string, createdBy: string, opts?: {
212
213
  parentId?: string;
213
214
  summary?: string;
@@ -244,6 +245,7 @@ declare class Store extends EventEmitter {
244
245
  outgoing: Bond[];
245
246
  incoming: Bond[];
246
247
  };
248
+ getAllBonds(): Bond[];
247
249
  updateBond(id: string, fields: {
248
250
  label?: string;
249
251
  color?: string;