Add standalone executable packaging with esbuild + pkg
- Add npm scripts for building Windows/Linux/macOS executables - Replace uuid package with crypto.randomUUID() for ESM compatibility - Use esbuild to pre-bundle code before pkg (fixes MCP SDK subpath exports) - Update CLI name from 'memory' to 'cortex' - Update USAGE.md with build instructions and standalone setup - Add bundle/ and build/ to .gitignore
This commit is contained in:
@@ -367,6 +367,24 @@ server.tool(
|
||||
}
|
||||
);
|
||||
|
||||
// --- memory_summary ---
|
||||
import { getCachedSummary, generateSummary } from '../core/summary';
|
||||
|
||||
server.tool(
|
||||
'memory_summary',
|
||||
'Get a pre-computed hierarchical summary of the memory graph. Use this instead of memory_list to reduce context usage.',
|
||||
{
|
||||
refresh: z.boolean().optional().describe('Force regenerate summary (default: use cached)'),
|
||||
},
|
||||
async ({ refresh }) => {
|
||||
let summary = refresh ? null : getCachedSummary();
|
||||
if (!summary) {
|
||||
summary = await generateSummary();
|
||||
}
|
||||
return { content: [{ type: 'text' as const, text: serialize(summary) }] };
|
||||
}
|
||||
);
|
||||
|
||||
// --- memory_prompt ---
|
||||
import { interpretAndExecute } from '../core/prompt/interpreter';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user