Add context injection system (Milestone 3)

- Add src/core/context.ts with context gathering, ranking, and formatting
- Add src/core/config.ts for persistent configuration storage
- Add CLI commands: cortex context, cortex context-hook, cortex config
- Add memory_context MCP tool for Claude Code integration
- Add GET /api/context endpoint
- Include summary.ts from main branch for heartbeat dependency
This commit is contained in:
2026-02-03 10:02:28 +01:00
parent 999c748d3d
commit 516b5ec017
8 changed files with 814 additions and 0 deletions

View File

@@ -11,6 +11,8 @@ import { graphCommand } from './commands/graph';
import { serveCommand } from './commands/serve';
import { decayCommand } from './commands/decay';
import { childrenCommand } from './commands/children';
import { contextCommand, contextHookCommand } from './commands/context';
import { configCommand } from './commands/config';
import { closeDb } from '../core/db';
const program = new Command();
@@ -31,6 +33,9 @@ program.addCommand(graphCommand);
program.addCommand(serveCommand);
program.addCommand(decayCommand);
program.addCommand(childrenCommand);
program.addCommand(contextCommand);
program.addCommand(contextHookCommand);
program.addCommand(configCommand);
program.hook('postAction', () => {
closeDb();