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:
2026-02-03 09:14:26 +01:00
parent 661325a235
commit 3d5a979a1b
8 changed files with 1735 additions and 80 deletions

View File

@@ -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';