212ff3ff80
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>
22 lines
521 B
JavaScript
22 lines
521 B
JavaScript
#!/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);
|
|
});
|