Add User Model Service and Temporal Recall for MeMind V0.1.

Introduce UMS ingest/snapshot pipeline, Context Planner with multi-source recall, runtime context injection, canonical user mapping, and session snapshot loading on auth/me.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-09-03 23:25:18 +08:00
parent bf66fdf493
commit 212ff3ff80
47 changed files with 4534 additions and 6 deletions
+21
View File
@@ -0,0 +1,21 @@
#!/usr/bin/env node
import { createUmsPool, isUmsDatabaseConfigured, runUmsSchema } from './db.mjs';
async function main() {
if (!isUmsDatabaseConfigured()) {
console.error('UMS 未配置。请设置 UMS_DATABASE_URL 或 UMS_MYSQL_*');
process.exit(1);
}
const pool = createUmsPool();
try {
await runUmsSchema(pool);
console.log('memind_user_model schema v0 migrated successfully.');
} finally {
await pool.end();
}
}
main().catch((err) => {
console.error(err);
process.exit(1);
});