# 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) ```typescript interface CalendarSearchContext { userId: string; retrieval: ContextPlan['retrievals'][0]; time: ContextPlan['time']; temporalMode: ContextPlan['temporal_mode']; } searchCalendar(ctx: CalendarSearchContext): Promise; ``` --- ## 3. 数据来源(计划) | 优先级 | 来源 | 说明 | |--------|------|------| | P0 | `h5_schedules` / scheduleService API | MeMind 内置日程 | | P1 | CalDAV 订阅 | 只读 sync | | P2 | iOS EventKit export | 经 MeInput 伴侣 App | --- ## 4. 归一化规则 ```json { "source": "calendar", "type": "event", "event_time": "", "observed_time": "", "title": "", "status": "planned", "confidence": 0.98, "source_ref": "calendar:schedule:" } ``` --- ## 5. Context Planner 权重 当 query 含 `行程|会议|约会|日历|几点|安排` 时: ```json "sources": { "calendar": 0.85, ... } ``` V0.2 启用 retrievals 中 `source: "calendar"`(V0.1 在 planner 中跳过未实现源)。 --- ## 6. V0.2 验收 1. 「我今天有什么安排?」→ Calendar items 排在 MeInput 前 2. Calendar event + MeInput 同事件 → Dedupe merge 3. `PLANNED_IN` 模式仅按 `event_time` 过滤