feat(memory-v2): restore personal shadow pipeline and candidate store

Recover WIP modules from stash so admin can persist capability config,
observe chat writes in shadow mode, and review persisted candidates.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-07-13 13:59:51 +08:00
parent 249b0697cb
commit e90a2da6cb
9 changed files with 773 additions and 1 deletions
@@ -0,0 +1,15 @@
import { createDbPool } from '../db.mjs';
import { ensurePersonalMemoryCandidateSchema } from '../memory-v2-personal-store.mjs';
if (process.env.MEMORY_PERSONAL_SCHEMA_CONFIRM !== 'local-only') {
throw new Error('Refusing schema change: set MEMORY_PERSONAL_SCHEMA_CONFIRM=local-only explicitly');
}
const pool = createDbPool();
try {
await ensurePersonalMemoryCandidateSchema(pool);
console.log('Memory V2 personal candidate schema ready.');
} finally {
await pool.end();
}