@danielsimonjr/memory-mcp 0.41.0 → 0.48.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/dist/__tests__/file-path.test.js +6 -2
- package/dist/__tests__/performance/benchmarks.test.js +151 -149
- package/dist/core/KnowledgeGraphManager.js +43 -20
- package/dist/features/AnalyticsManager.js +11 -11
- package/dist/features/CompressionManager.js +1 -20
- package/dist/features/index.js +1 -1
- package/dist/index.js +4 -37
- package/dist/memory-saved-searches.jsonl +0 -0
- package/dist/memory-tag-aliases.jsonl +0 -0
- package/dist/memory.jsonl +23 -222
- package/dist/search/BasicSearch.js +21 -51
- package/dist/search/BooleanSearch.js +9 -30
- package/dist/search/FuzzySearch.js +11 -30
- package/dist/search/RankedSearch.js +4 -20
- package/dist/search/SearchFilterChain.js +187 -0
- package/dist/search/index.js +4 -0
- package/dist/server/MCPServer.js +5 -842
- package/dist/server/toolDefinitions.js +732 -0
- package/dist/server/toolHandlers.js +117 -0
- package/dist/types/import-export.types.js +1 -1
- package/dist/utils/constants.js +3 -2
- package/dist/utils/entityUtils.js +108 -0
- package/dist/utils/filterUtils.js +155 -0
- package/dist/utils/index.js +26 -0
- package/dist/utils/paginationUtils.js +81 -0
- package/dist/utils/responseFormatter.js +55 -0
- package/dist/utils/tagUtils.js +107 -0
- package/dist/utils/validationHelper.js +99 -0
- package/package.json +34 -2
package/dist/features/index.js
CHANGED
|
@@ -9,4 +9,4 @@ export { ArchiveManager } from './ArchiveManager.js';
|
|
|
9
9
|
export { BackupManager } from './BackupManager.js';
|
|
10
10
|
export { ExportManager } from './ExportManager.js';
|
|
11
11
|
export { ImportManager } from './ImportManager.js';
|
|
12
|
-
|
|
12
|
+
// Note: ExportFilter type moved to types/import-export.types.ts
|
package/dist/index.js
CHANGED
|
@@ -1,44 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { promises as fs } from 'fs';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
import { fileURLToPath } from 'url';
|
|
5
2
|
import { logger } from './utils/logger.js';
|
|
6
3
|
import { KnowledgeGraphManager } from './core/KnowledgeGraphManager.js';
|
|
7
4
|
import { MCPServer } from './server/MCPServer.js';
|
|
8
|
-
//
|
|
9
|
-
|
|
10
|
-
//
|
|
11
|
-
export
|
|
12
|
-
if (process.env.MEMORY_FILE_PATH) {
|
|
13
|
-
// Custom path provided, use it as-is (with absolute path resolution)
|
|
14
|
-
return path.isAbsolute(process.env.MEMORY_FILE_PATH)
|
|
15
|
-
? process.env.MEMORY_FILE_PATH
|
|
16
|
-
: path.join(path.dirname(fileURLToPath(import.meta.url)), process.env.MEMORY_FILE_PATH);
|
|
17
|
-
}
|
|
18
|
-
// No custom path set, check for backward compatibility migration
|
|
19
|
-
const oldMemoryPath = path.join(path.dirname(fileURLToPath(import.meta.url)), 'memory.json');
|
|
20
|
-
const newMemoryPath = defaultMemoryPath;
|
|
21
|
-
try {
|
|
22
|
-
// Check if old file exists and new file doesn't
|
|
23
|
-
await fs.access(oldMemoryPath);
|
|
24
|
-
try {
|
|
25
|
-
await fs.access(newMemoryPath);
|
|
26
|
-
// Both files exist, use new one (no migration needed)
|
|
27
|
-
return newMemoryPath;
|
|
28
|
-
}
|
|
29
|
-
catch {
|
|
30
|
-
// Old file exists, new file doesn't - migrate
|
|
31
|
-
logger.info('Found legacy memory.json file, migrating to memory.jsonl for JSONL format compatibility');
|
|
32
|
-
await fs.rename(oldMemoryPath, newMemoryPath);
|
|
33
|
-
logger.info('Successfully migrated memory.json to memory.jsonl');
|
|
34
|
-
return newMemoryPath;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
catch {
|
|
38
|
-
// Old file doesn't exist, use new path
|
|
39
|
-
return newMemoryPath;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
5
|
+
// Import path utilities from canonical location (has path traversal protection)
|
|
6
|
+
import { defaultMemoryPath, ensureMemoryFilePath } from './utils/pathUtils.js';
|
|
7
|
+
// Re-export path utilities for backward compatibility
|
|
8
|
+
export { defaultMemoryPath, ensureMemoryFilePath };
|
|
42
9
|
// Re-export KnowledgeGraphManager for backward compatibility
|
|
43
10
|
export { KnowledgeGraphManager };
|
|
44
11
|
let knowledgeGraphManager;
|
|
File without changes
|
|
File without changes
|