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
+2
View File
@@ -27,6 +27,7 @@ import type {
FeedbackSubmissionType,
FeedbackBoardPage,
PortalUser,
UserModelSnapshot,
Session,
SessionConversationPage,
SessionListPage,
@@ -362,6 +363,7 @@ export async function getMe(): Promise<{
capabilities?: CapabilityMap;
grantedSkills?: string[];
unrestricted?: boolean;
userModelSnapshot?: UserModelSnapshot | null;
}> {
return portalFetch('/auth/me');
}
+19
View File
@@ -325,6 +325,25 @@ export type PlanDefinition = {
overageRate: number;
};
export type UserModelSnapshot = {
snapshot_id: string;
user_id: string;
projection: string;
profile_version: number;
fast_revision: number;
content_hash: string;
byte_size: number;
stale_after_sec: number;
loaded_at_hint?: string;
canonical_user_id?: string;
core?: {
active_projects?: Array<{ id?: string; name?: string; confidence?: number }>;
recent_focus?: Array<{ topic?: string; confidence?: number }>;
agent_hints?: string[];
};
meta?: Record<string, unknown>;
};
export type PortalUser = {
id: string;
username: string;