@deepseek-ai/dsh-schedule 0.2.0-rc.2 → 0.2.1-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.i18n.yaml CHANGED
@@ -15,27 +15,27 @@
15
15
  en: 23386452a66b2fbd
16
16
  zh: 4a8d91b2f313fead
17
17
  /deepseek-ai-dsh-schedule/use-this-package:
18
- en: 318cad8a73818a95
19
- zh: 267b9c86cb9f06d1
18
+ en: 88aba0cd93ff0903
19
+ zh: a8e4c257c319de53
20
20
  /deepseek-ai-dsh-schedule/understand-the-implementation:
21
- en: 676b7c508f37a1b7
22
- zh: c5e8520b3350f0b0
21
+ en: 3d11c664125e32d8
22
+ zh: 01a007a5ffb2ab63
23
23
  /deepseek-ai-dsh-schedule/further-exploration:
24
24
  en: d4404aa2dd7b3a94
25
25
  zh: 2dcd3d98cf281c32
26
26
  /deepseek-ai-dsh-schedule/model-experience:
27
27
  en: 215e7ba838619b7b
28
28
  zh: a311da3843709f90
29
- /deepseek-ai-dsh-schedule/model-experience/tool-schemas-on-root-agents:
30
- en: c4c31a3f6826626d
31
- zh: 5aa01bfa311b2f4c
32
- /deepseek-ai-dsh-schedule/model-experience/tool-schemas-on-root-agents/what-the-model-sees:
33
- en: fe159715b83e3058
34
- zh: e86fa4871283720f
35
- /deepseek-ai-dsh-schedule/model-experience/tool-schemas-on-root-agents/token-effect:
29
+ /deepseek-ai-dsh-schedule/model-experience/tool-schemas-in-mounted-presets:
30
+ en: 097a655a88e2a9f2
31
+ zh: 6612c58808186b1e
32
+ /deepseek-ai-dsh-schedule/model-experience/tool-schemas-in-mounted-presets/what-the-model-sees:
33
+ en: bcc153e35a059ba8
34
+ zh: 2c2ec93cd0dfa6c0
35
+ /deepseek-ai-dsh-schedule/model-experience/tool-schemas-in-mounted-presets/token-effect:
36
36
  en: ae0eb4d2609d4329
37
37
  zh: 4fe0a26e37c272dc
38
- /deepseek-ai-dsh-schedule/model-experience/tool-schemas-on-root-agents/kv-cache-effect:
38
+ /deepseek-ai-dsh-schedule/model-experience/tool-schemas-in-mounted-presets/kv-cache-effect:
39
39
  en: 7bf33bbe17e1da03
40
40
  zh: 2af9a2f842b4f430
41
41
  /deepseek-ai-dsh-schedule/model-experience/tool-results-after-management-calls:
@@ -69,8 +69,8 @@
69
69
  en: 1006325fa610366d
70
70
  zh: 476215d8a3c70fe4
71
71
  /deepseek-ai-dsh-schedule/known-limitations-and-deferred-work:
72
- en: fd511d607cbc7b8d
73
- zh: f45a14991cfa47e6
72
+ en: 4f01a96b25d462b7
73
+ zh: 22085f47cb287892
74
74
  /deepseek-ai-dsh-schedule/known-limitations-and-deferred-work/dev-note:
75
75
  en: e67f633dc6fe7773
76
76
  zh: 8ec3e73528ddb1a6
package/README.md CHANGED
@@ -23,9 +23,9 @@ Schedule delivers one-shot, fixed-rate, daily, weekly, and cron wall-clock remin
23
23
  <a id="use-this-package"></a>
24
24
  ## Use this package
25
25
 
26
- The shipped Web composition carries no `schedule` row; enable the optional experimental bundle `@deepseek-ai/dsh-experimental-schedule-bundle` from the Plugins page (Official group), or list it in a profile's `dsh.profile.bundles`, to insert and mount the service alongside storage-domain and the Session controller. Its `Config` states `deliveryHistoryDays` (default 30) and `deliveryHistoryRecords` (default 200). Storage backend routing belongs to storage-domain; Session model and preset restoration belong to the Session controller. Schedule cannot be mounted alone in a headless or SDK-only composition: delivery requires the Host Web Session controller and a Session persistence backend, because a delivery commits only after the Session acknowledges `session/flush`.
26
+ The shipped Web composition mounts the service alongside storage-domain and the Session controller. Its `Config` states `deliveryHistoryDays` (default 30) and `deliveryHistoryRecords` (default 200). Storage backend routing belongs to storage-domain; Session model and preset restoration belong to the Session controller. Schedule cannot be mounted alone in a headless or SDK-only composition: delivery requires the Host Web Session controller and a Session persistence backend, because a delivery commits only after the Session acknowledges `session/flush`.
27
27
 
28
- The Agent receives `schedule_create`, `schedule_list`, `schedule_delete`, and `schedule_update`. Update replaces the name, instruction, or timing of one reminder in place and keeps its id and saved records; it is not offered for the relative `after` delay. Creation requires a non-empty prompt, a title, and exactly one of six selectors:
28
+ The reminder tools `schedule_create`, `schedule_list`, `schedule_delete`, and `schedule_update` come from [`@deepseek-ai/dsh-tool-schedule`](../tool-schedule/README.md), which a preset mounts; this package contributes the Host service those tools call. Update replaces the name, instruction, or timing of one reminder in place and keeps its id and saved records; it is not offered for the relative `after` delay. Creation requires a non-empty prompt, a title, and exactly one of six selectors:
29
29
 
30
30
  | Selector | Example | Timing |
31
31
  |---|---|---|
@@ -72,7 +72,7 @@ The optional `earlierRecordsPruned` flag records confirmed removal by an append,
72
72
 
73
73
  The Schedule domain declares the whole-unit layout because tasks are authoritative. When routed to the JSON backend, an unreadable file, malformed document, unsupported version, or invalid task rejects startup instead of publishing a partial task catalog. Failed recovery leaves `schedule.json` unchanged, while an initially absent file opens as an empty domain. Repairing the file permits reopening the same task identities. Registered startup awaits storage validation and runtime setup through `Service.init`; unloading during open releases the acquired domain without starting dispatch.
74
74
 
75
- Historical `schedule/change` events retain `LegacyScheduleRecord` (`after`, `at`, and `every`) in their decoder, fold, and invariant. The Host record decoder separately accepts `daily`, `weekly`, and `cron`; it preserves committed UTC targets and valid stored zone aliases across canonical-name changes. The Host record decoder requires a stored `title`: a task record whose title is missing, blank after trimming, untrimmed, or longer than 120 characters fails to decode with `ScheduleLogError`. The historical change decoder tolerates an absent `title` so an already-written Session log stays readable, and it applies the same validation when the member is present. The task schema declares no backup-and-skip policy, so one such stored task rejects the whole domain open instead of being dropped. Historical events do not populate the Host task table. Loading a Session with active historical reminders logs a warning to recreate them with `schedule_create`; the Host does not scan historical Sessions, migrate tasks implicitly, or convert existing `at` tasks into daily, weekly, or cron rules.
75
+ Historical `schedule/change` events retain `LegacyScheduleRecord` (`after`, `at`, and `every`) in their decoder and fold. The Host record decoder separately accepts `daily`, `weekly`, and `cron`; it preserves committed UTC targets and valid stored zone aliases across canonical-name changes. The Host record decoder requires a stored `title`: a task record whose title is missing, blank after trimming, untrimmed, or longer than 120 characters fails to decode with `ScheduleLogError`. The historical change decoder tolerates an absent `title` so an already-written Session log stays readable, and it applies the same validation when the member is present. The task schema declares no backup-and-skip policy, so one such stored task rejects the whole domain open instead of being dropped. Historical events do not populate the Host task table. Loading a Session with active historical reminders logs a warning to recreate them with `schedule_create`; the Host does not scan historical Sessions, migrate tasks implicitly, or convert existing `at` tasks into daily, weekly, or cron rules.
76
76
 
77
77
  The `schedule.archiveAdmission()` effect answers the Workspace registry's archive admission ([seam](../../workspace/workspace/README.md)) for every Session. Host tasks outlive their Session's Agent, so admission reads the stored rows rather than a live runtime or a Session-log fold: `workspace/session-activity` reports that Session's active Host tasks as the `schedule` family, one item per task with its stored id and title as label, and prepends that family to `next()` so other families keep their entries; `workspace/session-stop` removes those rows in one slot of the same serialized queue the tools use, so the stop is ordered behind a create whose write is still in flight; it deletes the rows directly, because re-entering the public `delete` from inside that queue would deadlock. A Session with no active Host task reports nothing and has nothing to stop.
78
78
 
@@ -90,11 +90,11 @@ The `schedule.archiveAdmission()` effect answers the Workspace registry's archiv
90
90
  <a id="model-experience"></a>
91
91
  ## Model Experience
92
92
 
93
- ### Tool schemas on root Agents
93
+ ### Tool schemas in mounted presets
94
94
 
95
95
  #### What the model sees
96
96
 
97
- The [generated tool catalog](../../../docs/tool-catalog.md#deepseek-aidsh-schedule) contains the descriptions and schemas for `schedule_create`, `schedule_list`, `schedule_delete`, and `schedule_update`, registered in live root Agent scopes while Schedule is loaded.
97
+ The [generated tool catalog](../../../docs/tool-catalog.md#deepseek-aidsh-tool-schedule) contains the descriptions and schemas for `schedule_create`, `schedule_list`, `schedule_delete`, and `schedule_update`, which [`@deepseek-ai/dsh-tool-schedule`](../tool-schedule/README.md) contributes to the presets that mount it.
98
98
 
99
99
  #### Token effect
100
100
 
@@ -155,6 +155,7 @@ Reminder messages append to the original Session's history and preserve earlier
155
155
  - Deletion removes the task row together with its saved delivery records: future delivery stops, the task leaves `list` and `catalog`, and `history` no longer resolves it.
156
156
  - Old Session-log reminders require explicit recreation. Previously physically deleted tasks are not restored or fabricated.
157
157
  - Management edits are limited to active tasks. Pause, execution status, delivery outside the original Session, and a new Session for each run are not supported. Name, instruction, and timing updates are available to the model through `schedule_update` for its own Session, and to the Web detail for the selected task; a cross-Session relay workflow is not supported, product permission policy remains undecided, and the Session-binding check is not caller authorization.
158
+ - `create` and `update` refuse a Session a delegated child owns with `subagent_session` when the Agent's delegation depth is above zero — the accounting the delegation cap itself enforces, read from the persisted session header so it survives a cold resume. Delivery resolves the bound Session through the Session controller, which rejects the live Agent of a delegated child, so a task bound there could never be delivered. Restricting the caller belongs to the tool layer: `@deepseek-ai/dsh-tool-schedule` refuses all four of its tools for a delegated caller. `list`, `catalog`, `history`, and `delete` keep serving that Session, so a task stored before this rule stays removable.
158
159
  - Cron uses the five-field Vixie dialect, so the smallest interval is one minute and sub-minute scheduling is unsupported. Secondary expressions are not accepted: `L`, `W`, `#`, month or weekday names, `@daily`-style macros, and a seconds field are rejected. The stored record keeps only the canonical expression, so the exact spelling supplied at creation is not retained.
159
160
  - Daily, weekly, and cron future targets use the Host's current IANA data; decoding and restarting never recompute an already committed target. Only UTC target years 0001–9999 are supported; exhaustion retains the task as inactive after delivery.
160
161
  - Saved delivery records are pruned on append to the configured `deliveryHistoryDays` window, measured back from each receipt's `deliveredAt`, and to the `deliveryHistoryRecords` cap; the appended latest receipt always survives, and a pruned window marks the task's earlier records unavailable. The JSON backend stores the Schedule domain in one `schedule.json` document, so every task mutation rewrites all retained tasks and their histories, and the Host loads all retained history into memory. History pagination bounds returned record count, not storage growth, retained memory, prompt bytes, or write cost.
package/README.zh.md CHANGED
@@ -23,9 +23,9 @@ Schedule 将一次性、固定周期、按每日、按每周以及 cron 本地
23
23
  <a id="use-this-package"></a>
24
24
  ## 使用此包
25
25
 
26
- 随发行版交付的 Web 组合不含 `schedule` 行;在插件管理页的“官方”分组中启用可选实验性 bundle `@deepseek-ai/dsh-experimental-schedule-bundle`,或把它列进 profile 的 `dsh.profile.bundles`,即可插入此服务并将它与 storage-domain、Session controller 一起挂载。其 `Config` 声明 `deliveryHistoryDays`(默认 30)与 `deliveryHistoryRecords`(默认 200)。存储后端路由由 storage-domain 管理;会话模型与 preset 恢复由 Session controller 管理。Schedule 无法在 headless 或仅 SDK 的组合中单独挂载:投递需要 Host 的 Web Session controller 和 Session 持久化后端,因为只有在 Session 确认 `session/flush` 之后一次投递才会提交。
26
+ 随发行版交付的 Web 组合把此服务与 storage-domain、Session controller 一起挂载。其 `Config` 声明 `deliveryHistoryDays`(默认 30)与 `deliveryHistoryRecords`(默认 200)。存储后端路由由 storage-domain 管理;会话模型与 preset 恢复由 Session controller 管理。Schedule 无法在 headless 或仅 SDK 的组合中单独挂载:投递需要 Host 的 Web Session controller 和 Session 持久化后端,因为只有在 Session 确认 `session/flush` 之后一次投递才会提交。
27
27
 
28
- Agent 获得 `schedule_create`、`schedule_list`、`schedule_delete` 和 `schedule_update`。更新原地替换一条提醒的名称、指令或时间,保留其 id 与已保存记录;相对的 `after` 延迟不支持更新。创建时需要非空提示文本、标题,且必须只提供以下六个选择器之一:
28
+ 提醒工具 `schedule_create`、`schedule_list`、`schedule_delete` 和 `schedule_update` 来自 [`@deepseek-ai/dsh-tool-schedule`](../tool-schedule/README.zh.md),由 preset 挂载;本包提供这些工具调用的宿主服务。更新原地替换一条提醒的名称、指令或时间,保留其 id 与已保存记录;相对的 `after` 延迟不支持更新。创建时需要非空提示文本、标题,且必须只提供以下六个选择器之一:
29
29
 
30
30
  | 选择器 | 示例 | 时间语义 |
31
31
  |---|---|---|
@@ -72,7 +72,7 @@ cron 输入携带 `expression` 和 `time_zone`。表达式是标准五字段 Vix
72
72
 
73
73
  Schedule domain 声明整 unit 布局,因为任务是权威数据。路由到 JSON 后端时,文件不可读、文档损坏、版本不受支持或任务非法都会拒绝启动,而不是发布部分任务目录。恢复失败不会改写 `schedule.json`,初始不存在的文件则作为空 domain 打开;修复该文件后可按相同任务身份重新打开。注册启动通过 `Service.init` 等待存储校验与运行时初始化;打开期间卸载会释放已取得的 domain,而不开始投递。
74
74
 
75
- 历史 `schedule/change` 事件在解码器、fold 和 invariant 中保留 `LegacyScheduleRecord`(`after`、`at` 和 `every`)。宿主记录解码器单独接受 `daily`、`weekly` 和 `cron`,保留已提交的 UTC 目标,并在规范名称变化后继续接受有效的已存储时区别名。宿主记录解码器要求已存储的 `title`:标题缺失、去除首尾空白后为空、带首尾空白或超过 120 个字符的任务记录都以 `ScheduleLogError` 拒绝解码。历史变更解码器容忍缺失的 `title`,以便已写入的 Session 日志仍可读取;该成员存在时按同样的规则校验。任务 schema 未声明备份并跳过的策略,因此一条这样的已存储任务会拒绝整个 domain 的打开,而不是被丢弃。历史事件不填充宿主任务表。加载含有活动历史提醒的会话时,日志会提示通过 `schedule_create` 重新创建;宿主不扫描历史会话、不隐式迁移任务,也不将已有 `at` 任务转换为每日、每周或 cron 规则。
75
+ 历史 `schedule/change` 事件在解码器和 fold 中保留 `LegacyScheduleRecord`(`after`、`at` 和 `every`)。宿主记录解码器单独接受 `daily`、`weekly` 和 `cron`,保留已提交的 UTC 目标,并在规范名称变化后继续接受有效的已存储时区别名。宿主记录解码器要求已存储的 `title`:标题缺失、去除首尾空白后为空、带首尾空白或超过 120 个字符的任务记录都以 `ScheduleLogError` 拒绝解码。历史变更解码器容忍缺失的 `title`,以便已写入的 Session 日志仍可读取;该成员存在时按同样的规则校验。任务 schema 未声明备份并跳过的策略,因此一条这样的已存储任务会拒绝整个 domain 的打开,而不是被丢弃。历史事件不填充宿主任务表。加载含有活动历史提醒的会话时,日志会提示通过 `schedule_create` 重新创建;宿主不扫描历史会话、不隐式迁移任务,也不将已有 `at` 任务转换为每日、每周或 cron 规则。
76
76
 
77
77
  `schedule.archiveAdmission()` effect 为每个会话回答 Workspace 注册表的归档准入([接缝](../../workspace/workspace/README.zh.md))。宿主任务比其会话的 Agent 活得更久,因此准入读取已存储的行,而不是活 runtime 或会话日志 fold:`workspace/session-activity` 把该会话的活动宿主任务作为 `schedule` 族报告,每条任务一项、以其已存储 id 与 title 作名称,并把该族前插到 `next()` 的结果之前,使其他族保留各自条目;`workspace/session-stop` 在与工具相同的串行队列的一个槽位里删除这些行,因此停止会排在写入尚未完成的创建之后;它直接删行,因为在队列内重入公开的 `delete` 会自锁。没有活动宿主任务的会话不报告任何内容,也没有可停的提醒。
78
78
 
@@ -90,11 +90,11 @@ Schedule domain 声明整 unit 布局,因为任务是权威数据。路由到
90
90
  <a id="model-experience"></a>
91
91
  ## 模型体验
92
92
 
93
- ### 根 Agent 的工具 schema
93
+ ### 挂载 preset 中的工具 schema
94
94
 
95
95
  #### 模型看到什么
96
96
 
97
- [生成的工具目录](../../../docs/tool-catalog.zh.md#deepseek-aidsh-schedule) 包含 `schedule_create`、`schedule_list`、`schedule_delete` 和 `schedule_update` 的描述与 schema;Schedule 加载期间,这些工具注册在活动根 Agent 的作用域中。
97
+ [生成的工具目录](../../../docs/tool-catalog.zh.md#deepseek-aidsh-tool-schedule) 包含 `schedule_create`、`schedule_list`、`schedule_delete` 和 `schedule_update` 的描述与 schema;这些工具由 [`@deepseek-ai/dsh-tool-schedule`](../tool-schedule/README.zh.md) 贡献给挂载它的 preset。
98
98
 
99
99
  #### Token 影响
100
100
 
@@ -155,6 +155,7 @@ This is a scheduled message from the user
155
155
  - 删除会移除任务行及其已保存的投递记录:后续投递停止,任务离开 `list` 与 `catalog`,`history` 也不再解析到它。
156
156
  - 旧会话日志提醒需要明确重新创建。此前已物理删除的任务不会被恢复或虚构。
157
157
  - 仅可修改活动任务的管理字段。不支持暂停、执行状态、原会话以外的投递或每次运行新建会话。名称、指令和时间更新可由模型通过 `schedule_update` 修改其自身 Session 内的提醒,也可在 Web 详情中对所选任务修改;不支持跨会话转交工作流,产品权限策略尚未确定,会话绑定校验不等于调用者鉴权。
158
+ - 对由被委派子 agent 拥有的 Session,当该 Agent 的委派深度大于零时,`create` 与 `update` 会以 `subagent_session` 拒绝(这正是委派封顶本身执行的记账,读取自持久化 session header,因此冷恢复后仍然成立)。投递会经由 Session controller 解析该绑定 Session,而后者拒绝被委派子 agent 的活跃 Agent,因此绑定到那里的任务永远无法投递。调用方限制属于工具层:`@deepseek-ai/dsh-tool-schedule` 会拒绝被委派调用方的每一个工具。`list`、`catalog`、`history` 与 `delete` 仍服务该 Session,所以在这条规则之前存储的任务仍可删除。
158
159
  - Cron 使用五字段 Vixie 方言,因此最小间隔为一分钟,不支持亚分钟级调度。不接受扩展表达式:`L`、`W`、`#`、月份或星期名称、`@daily` 风格宏以及秒字段都会被拒绝。存储记录只保留规范化表达式,创建时提供的原始拼写不会被保留。
159
160
  - Daily、Weekly 与 Cron 的未来目标使用宿主当前的 IANA 数据;解码和重启绝不重新计算已提交的目标。UTC 目标仅支持 0001–9999 年;没有后续目标时,任务在投递后保留为未运行状态。
160
161
  - 已保存的发送记录在追加确认时按配置的 `deliveryHistoryDays` 窗口(以每条回执的 `deliveredAt` 向前计算)与 `deliveryHistoryRecords` 条数上限裁剪;新追加的最近一次回执始终保留,发生裁剪时任务标记更早记录不可用。JSON 后端把 Schedule domain 存在一个 `schedule.json` 文档中,因此每次任务变更都会重写全部保留任务及其历史,宿主也会把全部保留历史加载到内存。历史分页仅限制返回的记录数,不限制存储增长、保留的内存、提示文本字节数或写入成本。