@j0hanz/memdb 1.2.8 → 1.3.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 (56) hide show
  1. package/README.md +110 -287
  2. package/dist/assets/logo.svg +12 -0
  3. package/dist/config.d.ts +0 -1
  4. package/dist/config.js +0 -1
  5. package/dist/core/db.d.ts +6 -3
  6. package/dist/core/db.js +102 -47
  7. package/dist/core/memory-read.d.ts +1 -2
  8. package/dist/core/memory-read.js +32 -18
  9. package/dist/core/memory-write.d.ts +1 -2
  10. package/dist/core/memory-write.js +59 -83
  11. package/dist/core/relationships.d.ts +0 -1
  12. package/dist/core/relationships.js +15 -36
  13. package/dist/core/search.d.ts +2 -3
  14. package/dist/core/search.js +96 -89
  15. package/dist/index.d.ts +0 -1
  16. package/dist/index.js +42 -15
  17. package/dist/instructions.md +41 -24
  18. package/dist/logger.d.ts +0 -1
  19. package/dist/logger.js +0 -1
  20. package/dist/protocol-version-guard.d.ts +0 -1
  21. package/dist/protocol-version-guard.js +0 -1
  22. package/dist/schemas.d.ts +0 -1
  23. package/dist/schemas.js +14 -11
  24. package/dist/stdio-transport.d.ts +0 -1
  25. package/dist/stdio-transport.js +0 -1
  26. package/dist/tools.d.ts +1 -2
  27. package/dist/tools.js +195 -211
  28. package/dist/types.d.ts +0 -1
  29. package/dist/types.js +0 -1
  30. package/package.json +23 -20
  31. package/dist/config.d.ts.map +0 -1
  32. package/dist/config.js.map +0 -1
  33. package/dist/core/db.d.ts.map +0 -1
  34. package/dist/core/db.js.map +0 -1
  35. package/dist/core/memory-read.d.ts.map +0 -1
  36. package/dist/core/memory-read.js.map +0 -1
  37. package/dist/core/memory-write.d.ts.map +0 -1
  38. package/dist/core/memory-write.js.map +0 -1
  39. package/dist/core/relationships.d.ts.map +0 -1
  40. package/dist/core/relationships.js.map +0 -1
  41. package/dist/core/search.d.ts.map +0 -1
  42. package/dist/core/search.js.map +0 -1
  43. package/dist/index.d.ts.map +0 -1
  44. package/dist/index.js.map +0 -1
  45. package/dist/logger.d.ts.map +0 -1
  46. package/dist/logger.js.map +0 -1
  47. package/dist/protocol-version-guard.d.ts.map +0 -1
  48. package/dist/protocol-version-guard.js.map +0 -1
  49. package/dist/schemas.d.ts.map +0 -1
  50. package/dist/schemas.js.map +0 -1
  51. package/dist/stdio-transport.d.ts.map +0 -1
  52. package/dist/stdio-transport.js.map +0 -1
  53. package/dist/tools.d.ts.map +0 -1
  54. package/dist/tools.js.map +0 -1
  55. package/dist/types.d.ts.map +0 -1
  56. package/dist/types.js.map +0 -1
package/dist/tools.js CHANGED
@@ -19,6 +19,7 @@ const defaultDeps = {
19
19
  recallMemories,
20
20
  };
21
21
  const TOOL_TIMEOUT_MS = config.toolTimeoutMs;
22
+ const normalizeHash = (hash) => hash.toLowerCase();
22
23
  const isNonEmptyString = (value) => typeof value === 'string' && value.length > 0;
23
24
  const getErrorMessage = (error) => {
24
25
  if (error instanceof Error)
@@ -39,44 +40,78 @@ const createErrorResponse = (code, message, result) => {
39
40
  isError: true,
40
41
  };
41
42
  };
42
- const withTimeout = async (promise, ms, onTimeout) => {
43
- if (ms <= 0)
44
- return await promise;
45
- let timeout;
46
- const timeoutPromise = new Promise((resolve) => {
47
- timeout = setTimeout(() => {
48
- resolve(onTimeout());
49
- }, ms);
50
- });
51
- try {
52
- return await Promise.race([promise, timeoutPromise]);
53
- }
54
- finally {
55
- if (timeout)
56
- clearTimeout(timeout);
57
- }
58
- };
59
- const createTimeoutResponse = () => createErrorResponse('E_TIMEOUT', `Tool execution timed out after ${TOOL_TIMEOUT_MS}ms`, { timeoutMs: TOOL_TIMEOUT_MS });
60
- const ok = (result) => {
43
+ const createSuccessResponse = (result) => {
61
44
  const structured = { ok: true, result };
62
45
  return {
63
46
  content: [{ type: 'text', text: JSON.stringify(structured) }],
64
47
  structuredContent: structured,
65
48
  };
66
49
  };
67
- const runHandlerSafely = async (code, handler, params) => {
68
- try {
69
- const resultPromise = Promise.resolve().then(() => handler(params));
70
- return await withTimeout(resultPromise, TOOL_TIMEOUT_MS, createTimeoutResponse);
71
- }
72
- catch (err) {
73
- return createErrorResponse(code, getErrorMessage(err));
50
+ class ToolFailure extends Error {
51
+ result;
52
+ code;
53
+ constructor(code, message, result) {
54
+ super(message);
55
+ this.result = result;
56
+ this.code = code;
74
57
  }
58
+ }
59
+ const createTimeoutResponse = (timeoutMs) => createErrorResponse('E_TIMEOUT', `Tool execution timed out after ${timeoutMs}ms`, { timeoutMs });
60
+ const createTimedToolHandler = (defaultErrorCode, timeoutMs, run) => {
61
+ return async (params) => {
62
+ const controller = new AbortController();
63
+ const ctx = { signal: controller.signal };
64
+ const execution = Promise.resolve().then(() => run(params, ctx));
65
+ if (timeoutMs <= 0) {
66
+ try {
67
+ return await execution;
68
+ }
69
+ catch (err) {
70
+ if (err instanceof ToolFailure) {
71
+ return createErrorResponse(err.code, err.message, err.result);
72
+ }
73
+ return createErrorResponse(defaultErrorCode, getErrorMessage(err));
74
+ }
75
+ }
76
+ let timeout;
77
+ const timeoutPromise = new Promise((resolve) => {
78
+ timeout = setTimeout(() => {
79
+ controller.abort();
80
+ resolve(createTimeoutResponse(timeoutMs));
81
+ }, timeoutMs);
82
+ });
83
+ try {
84
+ return await Promise.race([execution, timeoutPromise]);
85
+ }
86
+ catch (err) {
87
+ if (err instanceof ToolFailure) {
88
+ return createErrorResponse(err.code, err.message, err.result);
89
+ }
90
+ return createErrorResponse(defaultErrorCode, getErrorMessage(err));
91
+ }
92
+ finally {
93
+ if (timeout)
94
+ clearTimeout(timeout);
95
+ }
96
+ };
75
97
  };
76
- const wrapHandler = (code, handler) => {
77
- return async (params) => runHandlerSafely(code, handler, params);
98
+ const defineTool = (spec) => {
99
+ return {
100
+ name: spec.name,
101
+ options: {
102
+ title: spec.title,
103
+ description: spec.description,
104
+ inputSchema: spec.inputSchema,
105
+ outputSchema: spec.outputSchema,
106
+ ...(spec.annotations ? { annotations: spec.annotations } : {}),
107
+ },
108
+ handler: createTimedToolHandler(spec.errorCode, spec.timeoutMs ?? TOOL_TIMEOUT_MS, async (params, ctx) => {
109
+ const input = spec.inputSchema.parse(params);
110
+ const result = await spec.run(input, ctx);
111
+ return createSuccessResponse(result);
112
+ }),
113
+ };
78
114
  };
79
- const normalizeHash = (hash) => hash.toLowerCase();
80
115
  const toCreateMemoryInput = (input) => ({
81
116
  content: input.content,
82
117
  tags: input.tags,
@@ -85,247 +120,196 @@ const toCreateMemoryInput = (input) => ({
85
120
  ? {}
86
121
  : { memory_type: input.memory_type }),
87
122
  });
88
- const buildStoreMemoryTool = (deps) => ({
89
- name: 'store_memory',
90
- options: {
123
+ const buildTools = (deps) => [
124
+ defineTool({
125
+ name: 'store_memory',
91
126
  title: 'Store Memory',
92
127
  description: 'Store a new memory with tags',
93
128
  inputSchema: StoreMemoryInputSchema,
94
129
  outputSchema: DefaultOutputSchema,
95
130
  annotations: { idempotentHint: true },
96
- },
97
- handler: wrapHandler('E_STORE_MEMORY', async (params) => {
98
- const input = StoreMemoryInputSchema.parse(params);
99
- const result = await deps.createMemory(toCreateMemoryInput({
100
- content: input.content,
101
- tags: input.tags,
102
- importance: input.importance,
103
- memory_type: input.memory_type,
104
- }));
105
- return ok(result);
131
+ errorCode: 'E_STORE_MEMORY',
132
+ run: async (input) => {
133
+ const result = await deps.createMemory(toCreateMemoryInput({
134
+ content: input.content,
135
+ tags: input.tags,
136
+ importance: input.importance,
137
+ memory_type: input.memory_type,
138
+ }));
139
+ return result;
140
+ },
106
141
  }),
107
- });
108
- const buildStoreMemoriesTool = (deps) => ({
109
- name: 'store_memories',
110
- options: {
142
+ defineTool({
143
+ name: 'store_memories',
111
144
  title: 'Store Multiple Memories',
112
145
  description: 'Store multiple memories in a single batch operation. Returns per-item results with partial success support.',
113
146
  inputSchema: StoreMemoriesInputSchema,
114
147
  outputSchema: DefaultOutputSchema,
115
148
  annotations: { idempotentHint: true },
116
- },
117
- handler: wrapHandler('E_STORE_MEMORIES', async (params) => {
118
- const input = StoreMemoriesInputSchema.parse(params);
119
- const items = input.items.map((item) => toCreateMemoryInput({
120
- content: item.content,
121
- tags: item.tags,
122
- importance: item.importance,
123
- memory_type: item.memory_type,
124
- }));
125
- const result = await deps.createMemories(items);
126
- return ok(result);
149
+ errorCode: 'E_STORE_MEMORIES',
150
+ run: async (input, ctx) => {
151
+ const items = input.items.map((item) => toCreateMemoryInput({
152
+ content: item.content,
153
+ tags: item.tags,
154
+ importance: item.importance,
155
+ memory_type: item.memory_type,
156
+ }));
157
+ return await deps.createMemories(items, ctx.signal);
158
+ },
127
159
  }),
128
- });
129
- const buildGetMemoryTool = (deps) => ({
130
- name: 'get_memory',
131
- options: {
160
+ defineTool({
161
+ name: 'get_memory',
132
162
  title: 'Get Memory',
133
163
  description: 'Retrieve memory by hash',
134
164
  inputSchema: GetMemoryInputSchema,
135
165
  outputSchema: DefaultOutputSchema,
136
- },
137
- handler: wrapHandler('E_GET_MEMORY', async (params) => {
138
- const input = GetMemoryInputSchema.parse(params);
139
- const result = await deps.getMemory(normalizeHash(input.hash));
140
- if (!result) {
141
- return createErrorResponse('E_NOT_FOUND', 'Memory not found');
142
- }
143
- return ok(result);
166
+ errorCode: 'E_GET_MEMORY',
167
+ run: async (input) => {
168
+ const result = await deps.getMemory(normalizeHash(input.hash));
169
+ if (!result)
170
+ throw new ToolFailure('E_NOT_FOUND', 'Memory not found');
171
+ return result;
172
+ },
144
173
  }),
145
- });
146
- const buildDeleteMemoryTool = (deps) => ({
147
- name: 'delete_memory',
148
- options: {
174
+ defineTool({
175
+ name: 'delete_memory',
149
176
  title: 'Delete Memory',
150
177
  description: 'Delete by hash',
151
178
  inputSchema: DeleteMemoryInputSchema,
152
179
  outputSchema: DefaultOutputSchema,
153
180
  annotations: { destructiveHint: true },
154
- },
155
- handler: wrapHandler('E_DELETE_MEMORY', async (params) => {
156
- const input = DeleteMemoryInputSchema.parse(params);
157
- const result = await deps.deleteMemory(normalizeHash(input.hash));
158
- if (result.changes === 0) {
159
- return createErrorResponse('E_NOT_FOUND', 'Memory not found');
160
- }
161
- return ok({ deleted: true });
181
+ errorCode: 'E_DELETE_MEMORY',
182
+ run: async (input) => {
183
+ const result = await deps.deleteMemory(normalizeHash(input.hash));
184
+ if (result.changes === 0)
185
+ throw new ToolFailure('E_NOT_FOUND', 'Memory not found');
186
+ return { deleted: true };
187
+ },
162
188
  }),
163
- });
164
- const buildDeleteMemoriesTool = (deps) => ({
165
- name: 'delete_memories',
166
- options: {
189
+ defineTool({
190
+ name: 'delete_memories',
167
191
  title: 'Delete Multiple Memories',
168
192
  description: 'Delete multiple memories by hash in a single batch operation. Returns per-item results with partial success support.',
169
193
  inputSchema: DeleteMemoriesInputSchema,
170
194
  outputSchema: DefaultOutputSchema,
171
195
  annotations: { destructiveHint: true },
172
- },
173
- handler: wrapHandler('E_DELETE_MEMORIES', async (params) => {
174
- const input = DeleteMemoriesInputSchema.parse(params);
175
- const result = await deps.deleteMemories(input.hashes.map(normalizeHash));
176
- return ok(result);
196
+ errorCode: 'E_DELETE_MEMORIES',
197
+ run: async (input, ctx) => {
198
+ return await deps.deleteMemories(input.hashes.map(normalizeHash), ctx.signal);
199
+ },
177
200
  }),
178
- });
179
- const buildUpdateMemoryTool = (deps) => ({
180
- name: 'update_memory',
181
- options: {
201
+ defineTool({
202
+ name: 'update_memory',
182
203
  title: 'Update Memory',
183
204
  description: 'Update memory content. Returns new hash since content change affects the hash.',
184
205
  inputSchema: UpdateMemoryInputSchema,
185
206
  outputSchema: DefaultOutputSchema,
186
207
  annotations: { idempotentHint: true },
187
- },
188
- handler: wrapHandler('E_UPDATE_MEMORY', async (params) => {
189
- const input = UpdateMemoryInputSchema.parse(params);
190
- const result = await deps.updateMemory(normalizeHash(input.hash), {
191
- content: input.content,
192
- tags: input.tags,
193
- });
194
- return ok(result);
208
+ errorCode: 'E_UPDATE_MEMORY',
209
+ run: async (input) => {
210
+ return await deps.updateMemory(normalizeHash(input.hash), {
211
+ content: input.content,
212
+ tags: input.tags,
213
+ });
214
+ },
195
215
  }),
196
- });
197
- const buildCoreTools = (deps) => [
198
- buildStoreMemoryTool(deps),
199
- buildStoreMemoriesTool(deps),
200
- buildGetMemoryTool(deps),
201
- buildDeleteMemoryTool(deps),
202
- buildDeleteMemoriesTool(deps),
203
- buildUpdateMemoryTool(deps),
204
- ];
205
- const buildSearchTools = (deps) => [
206
- {
216
+ defineTool({
207
217
  name: 'search_memories',
208
- options: {
209
- title: 'Search Memories',
210
- description: 'Search memories by content and tags',
211
- inputSchema: SearchMemoriesInputSchema,
212
- outputSchema: DefaultOutputSchema,
213
- annotations: { readOnlyHint: true },
218
+ title: 'Search Memories',
219
+ description: 'Search memories by content and tags',
220
+ inputSchema: SearchMemoriesInputSchema,
221
+ outputSchema: DefaultOutputSchema,
222
+ annotations: { readOnlyHint: true },
223
+ errorCode: 'E_SEARCH_MEMORIES',
224
+ run: async (input, ctx) => {
225
+ return await deps.searchMemories({ query: input.query }, ctx.signal);
214
226
  },
215
- handler: wrapHandler('E_SEARCH_MEMORIES', async (params) => {
216
- const input = SearchMemoriesInputSchema.parse(params);
217
- const result = await deps.searchMemories({ query: input.query });
218
- return ok(result);
219
- }),
220
- },
221
- {
227
+ }),
228
+ defineTool({
222
229
  name: 'recall',
223
- options: {
224
- title: 'Recall Memories',
225
- description: 'Search for memories and traverse relationships to return a connected graph cluster. ' +
226
- 'Use this for deeper context retrieval that follows knowledge graph connections.',
227
- inputSchema: RecallInputSchema,
228
- outputSchema: DefaultOutputSchema,
229
- annotations: { readOnlyHint: true },
230
- },
231
- handler: wrapHandler('E_RECALL', async (params) => {
232
- const input = RecallInputSchema.parse(params);
233
- const result = await deps.recallMemories({
230
+ title: 'Recall Memories',
231
+ description: 'Search for memories and traverse relationships to return a connected graph cluster. ' +
232
+ 'Use this for deeper context retrieval that follows knowledge graph connections.',
233
+ inputSchema: RecallInputSchema,
234
+ outputSchema: DefaultOutputSchema,
235
+ annotations: { readOnlyHint: true },
236
+ errorCode: 'E_RECALL',
237
+ run: async (input, ctx) => {
238
+ return await deps.recallMemories({
234
239
  query: input.query,
235
240
  ...(input.depth !== undefined && { depth: input.depth }),
236
- });
237
- return ok(result);
238
- }),
239
- },
240
- ];
241
- const buildRelationshipTools = (deps) => [
242
- {
243
- name: 'create_relationship',
244
- options: {
245
- title: 'Create Relationship',
246
- description: 'Link two memories with a typed relationship. Creates a knowledge graph edge between memories.',
247
- inputSchema: CreateRelationshipInputSchema,
248
- outputSchema: DefaultOutputSchema,
249
- annotations: { idempotentHint: true },
241
+ }, ctx.signal);
250
242
  },
251
- handler: wrapHandler('E_CREATE_RELATIONSHIP', async (params) => {
252
- const input = CreateRelationshipInputSchema.parse(params);
253
- const result = await deps.createRelationship({
243
+ }),
244
+ defineTool({
245
+ name: 'create_relationship',
246
+ title: 'Create Relationship',
247
+ description: 'Link two memories with a typed relationship. Creates a knowledge graph edge between memories.',
248
+ inputSchema: CreateRelationshipInputSchema,
249
+ outputSchema: DefaultOutputSchema,
250
+ annotations: { idempotentHint: true },
251
+ errorCode: 'E_CREATE_RELATIONSHIP',
252
+ run: async (input) => {
253
+ return await deps.createRelationship({
254
254
  from_hash: normalizeHash(input.from_hash),
255
255
  to_hash: normalizeHash(input.to_hash),
256
256
  relation_type: input.relation_type,
257
257
  });
258
- return ok(result);
259
- }),
260
- },
261
- {
262
- name: 'get_relationships',
263
- options: {
264
- title: 'Get Relationships',
265
- description: 'Get all relationships for a memory. Returns linked memories with relationship types.',
266
- inputSchema: GetRelationshipsInputSchema,
267
- outputSchema: DefaultOutputSchema,
268
- annotations: { readOnlyHint: true },
269
258
  },
270
- handler: wrapHandler('E_GET_RELATIONSHIPS', async (params) => {
271
- const input = GetRelationshipsInputSchema.parse(params);
272
- const result = await deps.getRelationships({
259
+ }),
260
+ defineTool({
261
+ name: 'get_relationships',
262
+ title: 'Get Relationships',
263
+ description: 'Get all relationships for a memory. Returns linked memories with relationship types.',
264
+ inputSchema: GetRelationshipsInputSchema,
265
+ outputSchema: DefaultOutputSchema,
266
+ annotations: { readOnlyHint: true },
267
+ errorCode: 'E_GET_RELATIONSHIPS',
268
+ run: async (input) => {
269
+ return await deps.getRelationships({
273
270
  hash: normalizeHash(input.hash),
274
271
  ...(input.direction !== undefined && { direction: input.direction }),
275
272
  });
276
- return ok(result);
277
- }),
278
- },
279
- {
280
- name: 'delete_relationship',
281
- options: {
282
- title: 'Delete Relationship',
283
- description: 'Remove a relationship between two memories.',
284
- inputSchema: DeleteRelationshipInputSchema,
285
- outputSchema: DefaultOutputSchema,
286
- annotations: { destructiveHint: true },
287
273
  },
288
- handler: wrapHandler('E_DELETE_RELATIONSHIP', async (params) => {
289
- const input = DeleteRelationshipInputSchema.parse(params);
274
+ }),
275
+ defineTool({
276
+ name: 'delete_relationship',
277
+ title: 'Delete Relationship',
278
+ description: 'Remove a relationship between two memories.',
279
+ inputSchema: DeleteRelationshipInputSchema,
280
+ outputSchema: DefaultOutputSchema,
281
+ annotations: { destructiveHint: true },
282
+ errorCode: 'E_DELETE_RELATIONSHIP',
283
+ run: async (input) => {
290
284
  const result = await deps.deleteRelationship({
291
285
  from_hash: normalizeHash(input.from_hash),
292
286
  to_hash: normalizeHash(input.to_hash),
293
287
  relation_type: input.relation_type,
294
288
  });
295
- if (result.changes === 0) {
296
- return createErrorResponse('E_NOT_FOUND', 'Relationship not found');
297
- }
298
- return ok({ deleted: true });
299
- }),
300
- },
301
- ];
302
- const buildStatsTools = (deps) => [
303
- {
289
+ if (result.changes === 0)
290
+ throw new ToolFailure('E_NOT_FOUND', 'Relationship not found');
291
+ return { deleted: true };
292
+ },
293
+ }),
294
+ defineTool({
304
295
  name: 'memory_stats',
305
- options: {
306
- title: 'Memory Stats',
307
- description: 'Database statistics and health',
308
- inputSchema: MemoryStatsInputSchema,
309
- outputSchema: DefaultOutputSchema,
310
- annotations: { readOnlyHint: true },
296
+ title: 'Memory Stats',
297
+ description: 'Database statistics and health',
298
+ inputSchema: MemoryStatsInputSchema,
299
+ outputSchema: DefaultOutputSchema,
300
+ annotations: { readOnlyHint: true },
301
+ errorCode: 'E_MEMORY_STATS',
302
+ run: async () => {
303
+ return await deps.getStats();
311
304
  },
312
- handler: wrapHandler('E_MEMORY_STATS', async (params) => {
313
- MemoryStatsInputSchema.parse(params);
314
- const result = await deps.getStats();
315
- return ok(result);
316
- }),
317
- },
318
- ];
319
- const buildTools = (deps) => [
320
- ...buildCoreTools(deps),
321
- ...buildSearchTools(deps),
322
- ...buildRelationshipTools(deps),
323
- ...buildStatsTools(deps),
305
+ }),
324
306
  ];
325
- export function registerAllTools(server, deps = defaultDeps) {
307
+ export function registerAllTools(server, localIcon, deps = defaultDeps) {
326
308
  const tools = buildTools(deps);
309
+ const iconMetadata = localIcon
310
+ ? { icons: [{ src: localIcon, mimeType: 'image/svg+xml', sizes: ['any'] }] }
311
+ : {};
327
312
  for (const tool of tools) {
328
- server.registerTool(tool.name, tool.options, tool.handler);
313
+ server.registerTool(tool.name, { ...tool.options, ...iconMetadata }, tool.handler);
329
314
  }
330
315
  }
331
- //# sourceMappingURL=tools.js.map
package/dist/types.d.ts CHANGED
@@ -74,4 +74,3 @@ export interface RecallResult {
74
74
  readonly relationships: Relationship[];
75
75
  readonly depth: number;
76
76
  }
77
- //# sourceMappingURL=types.d.ts.map
package/dist/types.js CHANGED
@@ -8,4 +8,3 @@ export const MEMORY_TYPES = [
8
8
  'error',
9
9
  'gradient',
10
10
  ];
11
- //# sourceMappingURL=types.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@j0hanz/memdb",
3
- "version": "1.2.8",
3
+ "version": "1.3.0",
4
4
  "mcpName": "io.github.j0hanz/memdb",
5
5
  "description": "A SQLite-backed MCP memory server with local workspace storage.",
6
6
  "type": "module",
@@ -18,21 +18,24 @@
18
18
  "README.md"
19
19
  ],
20
20
  "scripts": {
21
- "clean": "node -e \"require('fs').rmSync('dist', {recursive:true, force:true}); require('fs').rmSync('.tsbuildinfo', {recursive:true, force:true}); ['tsconfig.tsbuildinfo', 'tsconfig.build.tsbuildinfo', 'tsconfig.test.tsbuildinfo'].forEach(f => require('fs').rmSync(f, {force:true}))\"",
22
- "validate:instructions": "node -e \"require('fs').accessSync('src/instructions.md')\"",
23
- "build": "npm run clean && tsc -p tsconfig.json && npm run validate:instructions && npm run copy:assets && node -e \"require('fs').chmodSync('dist/index.js', '755')\"",
24
- "copy:assets": "node -e \"require('fs').mkdirSync('dist', { recursive: true }); require('fs').copyFileSync('src/instructions.md', 'dist/instructions.md')\"",
21
+ "clean": "node scripts/tasks.mjs clean",
22
+ "validate:instructions": "node scripts/tasks.mjs validate:instructions",
23
+ "build": "node scripts/tasks.mjs build",
24
+ "copy:assets": "node scripts/tasks.mjs copy:assets",
25
25
  "prepare": "npm run build",
26
- "dev": "tsx watch src/index.ts",
26
+ "dev": "tsc --watch --preserveWatchOutput",
27
+ "dev:run": "node --env-file=.env --watch dist/index.js",
27
28
  "start": "node dist/index.js",
28
- "test": "node --import tsx/esm --test tests/*.test.ts",
29
- "test:coverage": "node --import tsx/esm --test --experimental-test-coverage tests/*.test.ts",
30
- "duplication": "npx --yes jscpd -k 50 -f typescript -r json -o .jscpd src",
31
- "lint": "eslint .",
32
29
  "format": "prettier --write .",
33
- "format:check": "prettier --check .",
34
- "type-check": "tsc -p tsconfig.json --noEmit",
35
- "type-check:test": "tsc -p tsconfig.test.json --noEmit",
30
+ "type-check": "node scripts/tasks.mjs type-check",
31
+ "type-check:diagnostics": "tsc --noEmit --extendedDiagnostics",
32
+ "type-check:trace": "node -e \"require('fs').rmSync('.ts-trace',{recursive:true,force:true})\" && tsc --noEmit --generateTrace .ts-trace",
33
+ "lint": "eslint .",
34
+ "lint:fix": "eslint . --fix",
35
+ "test": "node scripts/tasks.mjs test",
36
+ "test:coverage": "node scripts/tasks.mjs test --coverage",
37
+ "knip": "knip",
38
+ "knip:fix": "knip --fix",
36
39
  "inspector": "npx @modelcontextprotocol/inspector",
37
40
  "prepublishOnly": "npm run lint && npm run type-check && npm run build"
38
41
  },
@@ -51,24 +54,24 @@
51
54
  "homepage": "https://github.com/j0hanz/memdb-mcp-server#readme",
52
55
  "license": "MIT",
53
56
  "dependencies": {
54
- "@modelcontextprotocol/sdk": "^1.25.2",
55
- "zod": "^4.3.5"
57
+ "@modelcontextprotocol/sdk": "^1.26.0",
58
+ "zod": "^4.3.6"
56
59
  },
57
60
  "devDependencies": {
58
61
  "@eslint/js": "^9.39.2",
59
62
  "@trivago/prettier-plugin-sort-imports": "^6.0.2",
60
- "@types/node": "^25.0.6",
63
+ "@types/node": "^25.2.0",
61
64
  "eslint": "^9.39.2",
62
65
  "eslint-config-prettier": "^10.1.8",
63
66
  "eslint-plugin-de-morgan": "^2.0.0",
64
67
  "eslint-plugin-depend": "^1.4.0",
65
- "eslint-plugin-sonarjs": "^3.0.5",
68
+ "eslint-plugin-sonarjs": "^3.0.6",
66
69
  "eslint-plugin-unused-imports": "^4.3.0",
67
- "knip": "^5.81.0",
68
- "prettier": "^3.8.0",
70
+ "knip": "^5.83.0",
71
+ "prettier": "^3.8.1",
69
72
  "tsx": "^4.21.0",
70
73
  "typescript": "^5.9.3",
71
- "typescript-eslint": "^8.52.0"
74
+ "typescript-eslint": "^8.54.0"
72
75
  },
73
76
  "engines": {
74
77
  "node": ">=22.0.0"
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAGA,KAAK,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAoD1C,eAAO,MAAM,MAAM;;;;CAQlB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,OAAO,MAAM,cAAc,CAAC;AAInC,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,QAAQ,EAAE,WAAW,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B,MAAM,QAAQ,GAAG,aAAa,CAAC,GAAG,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;QAC3D,MAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QACrC,cAAc,CAAC,QAAQ,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC;IAC1C,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"memory-read.d.ts","sourceRoot":"","sources":["../../src/core/memory-read.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,iBAAiB,EACjB,MAAM,EACN,WAAW,EACX,eAAe,EAChB,MAAM,aAAa,CAAC;AAoBrB,eAAO,MAAM,SAAS,GAAI,MAAM,MAAM,KAAG,MAAM,GAAG,SASjD,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,KAAG,eAG3C,CAAC;AAoBF,eAAO,MAAM,cAAc,GAAI,QAAQ,MAAM,EAAE,KAAG,iBAejD,CAAC;AA4BF,eAAO,MAAM,QAAQ,QAAO,WAU3B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"memory-read.js","sourceRoot":"","sources":["../../src/core/memory-read.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,EAAE,EAEF,UAAU,EACV,UAAU,EACV,oBAAoB,EACpB,cAAc,EACd,aAAa,EACb,wBAAwB,GACzB,MAAM,SAAS,CAAC;AAEjB,MAAM,mBAAmB,GAAG,EAAE,CAAC,OAAO,CAAC,uCAAuC,CAAC,CAAC;AAChF,MAAM,qBAAqB,GAAG,EAAE,CAAC,OAAO,CACtC,oEAAoE,CACrE,CAAC;AACF,MAAM,sBAAsB,GAAG,EAAE,CAAC,OAAO,CACvC,qCAAqC,CACtC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,IAAY,EAAsB,EAAE;IAC5D,OAAO,wBAAwB,CAAC,GAAG,EAAE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