memory-engineering-mcp
Version:
🧠AI Memory System powered by MongoDB Atlas & Voyage AI - Autonomous memory management with zero manual work
77 lines • 2.68 kB
JavaScript
import { z } from 'zod';
// Cline's 6 core memories + codebaseMap for code embeddings
export const CORE_MEMORY_NAMES = [
'projectbrief',
'productContext',
'activeContext',
'systemPatterns',
'techContext',
'progress',
'codebaseMap' // Enhanced with Voyage AI code embeddings
];
// Cline's memory hierarchy
export const MEMORY_HIERARCHY = {
'projectbrief': {
dependsOn: [],
description: 'Foundation document that shapes all other files'
},
'productContext': {
dependsOn: ['projectbrief'],
description: 'Why this project exists and who needs it'
},
'systemPatterns': {
dependsOn: ['projectbrief'],
description: 'System architecture and design patterns'
},
'techContext': {
dependsOn: ['projectbrief'],
description: 'Technologies and development setup'
},
'activeContext': {
dependsOn: ['productContext', 'systemPatterns', 'techContext'],
description: 'Current work focus and learnings'
},
'progress': {
dependsOn: ['activeContext'],
description: 'What works and what\'s left to build'
},
'codebaseMap': {
dependsOn: ['projectbrief'],
description: 'Directory structure and searchable code embeddings'
}
};
// Tool schemas - simplified
export const InitToolSchema = z.object({
projectPath: z.string().optional(),
projectName: z.string().optional()
});
export const ReadAllToolSchema = z.object({
projectPath: z.string().optional()
});
export const ReadToolSchema = z.object({
memoryName: z.enum(CORE_MEMORY_NAMES),
projectPath: z.string().optional()
});
export const UpdateToolSchema = z.object({
memoryName: z.enum(CORE_MEMORY_NAMES),
content: z.string().min(1),
projectPath: z.string().optional()
});
export const SearchToolSchema = z.object({
query: z.string().min(1),
projectPath: z.string().optional(),
limit: z.number().int().min(1).max(20).default(10),
codeSearch: z.enum(['similar', 'implements', 'uses', 'pattern']).optional(),
filePath: z.string().optional()
});
// Cline's key principle embedded in type
export const CLINE_PRINCIPLE = "I MUST read ALL memory bank files at the start of EVERY task - this is not optional.";
// Sync options for code
export const SyncCodeSchema = z.object({
projectPath: z.string().optional(),
patterns: z.array(z.string()).optional().default(['**/*.ts', '**/*.js', '**/*.py']),
minChunkSize: z.number().optional().default(5),
forceRegenerate: z.boolean().optional().default(false),
includeTests: z.boolean().optional().default(false)
});
//# sourceMappingURL=memory-v5.js.map