Repository navigation
feat(calendar): 接入校历、完整课表及多来源订阅 - #248
Merged
freedomkk-qfeng merged 10 commits intoNov 15, 2026
Merged
Conversation
…sources Add the calendar-subscriptions data plugin: per-feed configuration in its own storage domain, scheduled fetching with startup catch-up and hourly retry, and snapshots pushed through the calendar's registered-source seam. The ICS adapter reuses the calendar package's parser behind a new ./ics export, so subscriptions and manual imports read identical text. Partial or unreadable feeds keep the last good snapshot; a clean read replaces it without duplicates.
Register five tools over the subscription service: list, subscribe, update (label, interval, pause/resume), unsubscribe and refresh (one feed or all enabled). Writes ask first through the same pre-execute gate the calendar tools use, with a bilingual reason, and are denied without a session behind the call. A failed first fetch or refresh reports inline instead of throwing, so the model can tell the user the old events are kept. Replace setEnabled with updateFeed so one method covers label, interval and enable-state changes, and ship the skill documentation that describes the workflow and the sync-source boundary.
Contributor
Author
|
M3 已推(17e4e72):
|
Preserve optional bundle defaults and product-manifest resolution in the local Web launcher. Refresh the reviewed launcher hash, qualify peers with the locked Runtime, and access optional OIDC through Context.get for Cordis 4.1.
Zewang0217
marked this pull request as ready for review
November 8, 2026 14:58
Check calendar peers against the pinned Host, declare the subscription bundle peer, and respect source visibility for delivered reminders.
This was referenced Nov 15, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
关联 #186,接续 #113;机构数据见 EduWork-ECNU #71。
实现内容
本 PR 在通用日历中接入多来源订阅、教育校历与完整个人课表,学校数据由机构插件提供。
academic-calendar、academic-timetable格式。接口与边界
ctx.calendarSubscriptionsregisterFormat(id, { read, openSource? })ctx.calendar.registerSource({ provider, account, feed, ... })academic-timetable响应为{ institution, dataset },包含学期、时区、教学班及完整meetings;账号身份由 Host 确定。教育侧保留课程分组,公版日历继续使用普通事件模型。校历采用带schemaVersion和revision的结构化 JSON;普通事件可导出 ICS,教学周和阶段背景由教育插件表达。授权订阅复用 OIDC 当前账号和自动续期,只能请求机构配置批准的确切只读服务地址;不在订阅配置中另存 Token。退出、换号、停用、卸载和退订时取消或隔离旧请求。Host 服务读取与身份能力的边界记录在 ADR 0002,仍请维护者评审。
业务插件通过公开接口协作,不读取其他插件的内部表。提醒复用 #190 的通用通知投递、动作转交和工作台面板打开能力。没有 EduWork 桌面桥时仍可使用核心日历、校历及订阅。
方法、格式和生命周期约定见订阅说明、教育校历说明及接入约定。
验证
已同步 2026-11-08 的
main(6b1bd17),保留上游 DSH 0.2.2、产品装配与通知改动。使用其精确 npm 锁安装的 DSH0.2.2-rc.1/ Cordis4.1.0完成以下本地检查:此前还完成实际 EduWork 的 37 个假教务服务场景及 35 个浏览器面板场景,覆盖导入、调课、停课恢复、空课表、坏数据、并发、超时、离线、重启、退订重加、个人内容与提醒,并在普通 DSH 中验证校历和 HTTP 课表。这些记录来自 10 月 29 日,未将其表述为本次升级后的整包人工验收。
GitHub CI 于 2026-11-08 核对,代码提交
6a69060的 19 项检查全部通过:Build EduWork source、Check npm packages、Validate pinned DSH source integration。GitHub 已显示MERGEABLE;PR 已转为正式待审,尚未合并。后续交付
学校真实个人课表接口尚未提供,当前已验证通用 HTTP 接入及订阅更新。真实模型会话、DSH 0.2.2 整包界面及 Electron 系统弹窗仍需单独验收。
源码开发装配可用于联调;npm 发布、版本锁定和正式产品装配由维护者负责,本 PR 未发布 npm 或桌面 Release。机构版保留已确认的公版发行锁;校历插件与技能通过显式开发配置启用,待公共教育依赖发布后再登记到默认装配。
@freedomkk-qfeng 请老师看看校历展示、完整课表更新、个人内容保留,以及格式适配器与来源句柄的分工是否合适,有哪些需要调整,或者有更好的方案?
界面样例
截图记录于 2026-10-29,使用官方公开校历与合成课程数据;不是 DSH 0.2.2 整包的新截图。
截图存放于独立文档图片提交 8257931,该提交仅增加图片;其 CI 状态请以本 PR 的 Checks 为准。