- Add capture configuration system with modes: always, manual, decisions, off - Add Ollama-based conversation summarization and extraction - Add deduplication via embedding similarity (merge >0.90, link 0.75-0.90) - Add CLI commands: capture, capture-hook, config - Add MCP tools: memory_capture, memory_remember, memory_capture_config - Include summary.ts (previously uncommitted)
48 lines
1.5 KiB
JavaScript
48 lines
1.5 KiB
JavaScript
#!/usr/bin/env node
|
|
import { Command } from 'commander';
|
|
import { addCommand } from './commands/add';
|
|
import { queryCommand } from './commands/query';
|
|
import { linkCommand } from './commands/link';
|
|
import { showCommand } from './commands/show';
|
|
import { listCommand } from './commands/list';
|
|
import { updateCommand } from './commands/update';
|
|
import { removeCommand } from './commands/remove';
|
|
import { graphCommand } from './commands/graph';
|
|
import { serveCommand } from './commands/serve';
|
|
import { decayCommand } from './commands/decay';
|
|
import { childrenCommand } from './commands/children';
|
|
import { captureCommand, captureHookCommand, configCommand } from './commands/capture';
|
|
import { closeDb } from '../core/db';
|
|
|
|
const program = new Command();
|
|
|
|
program
|
|
.name('cortex')
|
|
.description('Cortex — AI project memory & knowledge graph\n\nStore, link, and search project knowledge as a graph of typed nodes.')
|
|
.version('1.0.0');
|
|
|
|
program.addCommand(addCommand);
|
|
program.addCommand(queryCommand);
|
|
program.addCommand(linkCommand);
|
|
program.addCommand(showCommand);
|
|
program.addCommand(listCommand);
|
|
program.addCommand(updateCommand);
|
|
program.addCommand(removeCommand);
|
|
program.addCommand(graphCommand);
|
|
program.addCommand(serveCommand);
|
|
program.addCommand(decayCommand);
|
|
program.addCommand(childrenCommand);
|
|
program.addCommand(captureCommand);
|
|
program.addCommand(captureHookCommand);
|
|
program.addCommand(configCommand);
|
|
|
|
program.hook('postAction', () => {
|
|
closeDb();
|
|
});
|
|
|
|
program.parseAsync(process.argv).catch((err) => {
|
|
console.error(err);
|
|
closeDb();
|
|
process.exit(1);
|
|
});
|