feat(schedule): add durable after reminders

This commit is contained in:
pku-xht
2026-08-05 19:00:02 +08:00
committed by Tianyi Cui
parent a229b42e24
commit f7e7851e3f
102 changed files with 2619 additions and 122 deletions

View File

@@ -0,0 +1,6 @@
# Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write examples/web-schedule/README.md
README.md: 98ba3c78cfff2c6db62487db727f08825077f150
README.zh.md: e36b12acc97313d7feaa3af55e5dc46294d7e8da

View File

@@ -0,0 +1,17 @@
# Durable Web Schedule
English | [中文](README.zh.md)
This overlay opts one `dsh web` process into durable Schedule reminders without changing the shipped default Web composition:
```sh
dsh web --config examples/web-schedule/cordis.yml
```
The current overlay supports one-shot reminders created with a positive whole-number `after_seconds`. The model manages them through `schedule_create`, `schedule_list`, and `schedule_delete`; every result identifies the delivery mode as `session-local`.
The original Session log owns each reminder. A live root Agent waits, retries after it becomes idle, and records a durable dispatch receipt in the Web conversation. Closing the process or leaving the Session cold stops its in-memory timer without deleting the record; reopening that same Session restores the wait and delivers an overdue reminder. Merely reading cold history never activates it, and a fork does not inherit its parent's reminders.
Create and actual delete operations acknowledge success only after Session persistence confirms their event prefix. A reminder receipt likewise appears only after its dispatch is durable. Schedule does not provide browser, operating-system, email, SMS, or other external notification, and the best-effort model follow-up is not a delivery acknowledgement.
Absolute-time, fixed-interval, and cron rules are not accepted by this layer.

View File

@@ -0,0 +1,17 @@
# 持久 Web Schedule
[English](README.md) | 中文
此 overlay 让一个 `dsh web` 进程显式启用持久 Schedule 提醒,同时不改变交付的默认 Web 组合:
```sh
dsh web --config examples/web-schedule/cordis.yml
```
当前 overlay 支持使用正整数 `after_seconds` 创建的一次性提醒。模型通过 `schedule_create``schedule_list``schedule_delete` 管理它们;每个结果都会把交付模式标为 `session-local`
每条提醒由原 Session 日志拥有。live 根 Agent 会等待,在恢复 idle 后重试,并在 Web 会话中记录持久 dispatch 回执。关闭进程或让 Session 保持 cold 会停止内存 timer但不会删除记录重新打开同一个 Session 会恢复等待并交付逾期提醒。仅查看 cold 历史不会激活提醒fork 也不会继承父 Session 的提醒。
创建和实际删除操作只有在 Session persistence 确认对应事件前缀后才会确认成功。提醒回执同样只在 dispatch 持久化后出现。Schedule 不提供浏览器、操作系统、邮件、短信或其他外部通知best-effort 模型 follow-up 也不构成交付确认。
本层不接受绝对时间、固定间隔或 cron 规则。

View File

@@ -0,0 +1,10 @@
# Opt-in Schedule patch over the shipped Web composition. The Schedule owner
# only observes roots published after this overlay loads, so this remains an
# explicit capability rather than changing the default Web tree.
- insert:
- id: tool-schedule
name: '@deepseek-ai/dsh-tool-schedule'
- id: ui-schedule
name: '@deepseek-ai/dsh-client-ui-schedule'