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>
1.8 KiB
1.8 KiB
Calendar Source Adapter v0.2(接口冻结)
| 字段 | 值 |
|---|---|
| 状态 | Draft(V0.2) |
| 实现 | temporal-recall-service/adapters/calendar.mjs(V0.1 stub) |
1. 职责
从 MeMind 日程系统(scheduleService / 未来 CalDAV)读取 event_time 权威 的 calendar events,归一化为 TimelineItem。
与 MeInput/Chat 的区别:
| Source | event_time 来源 |
|---|---|
| Calendar | 结构化字段(权威) |
| MeInput/Chat | 文本抽取( hypothesis ) |
2. Adapter 签名(Frozen)
interface CalendarSearchContext {
userId: string;
retrieval: ContextPlan['retrievals'][0];
time: ContextPlan['time'];
temporalMode: ContextPlan['temporal_mode'];
}
searchCalendar(ctx: CalendarSearchContext): Promise<TimelineItem[]>;
3. 数据来源(计划)
| 优先级 | 来源 | 说明 |
|---|---|---|
| P0 | h5_schedules / scheduleService API |
MeMind 内置日程 |
| P1 | CalDAV 订阅 | 只读 sync |
| P2 | iOS EventKit export | 经 MeInput 伴侣 App |
4. 归一化规则
{
"source": "calendar",
"type": "event",
"event_time": "<schedule.start_at>",
"observed_time": "<schedule.created_at>",
"title": "<schedule.title>",
"status": "planned",
"confidence": 0.98,
"source_ref": "calendar:schedule:<id>"
}
5. Context Planner 权重
当 query 含 行程|会议|约会|日历|几点|安排 时:
"sources": { "calendar": 0.85, ... }
V0.2 启用 retrievals 中 source: "calendar"(V0.1 在 planner 中跳过未实现源)。
6. V0.2 验收
- 「我今天有什么安排?」→ Calendar items 排在 MeInput 前
- Calendar event + MeInput 同事件 → Dedupe merge
PLANNED_IN模式仅按event_time过滤