Merge pull request #5161 from deepseek-harness/feat/preset-scoped-schedule-tools
feat(web): scope the reminder stack to the presets that declare it
This commit is contained in:
commit
0ebba99d8b
142 files changed
+2526
-1214
No files matched your search
@@ -15,5 +15,5 @@
|
||||
en: 21d7ec9a9ff3cbf2
|
||||
zh: 93d03b8b3012aa7e
|
||||
/agent-note-host-owned-scheduled-messages/consequences:
|
||||
en: a48f13f89a1944b1
|
||||
zh: f8fa677122ce2e12
|
||||
en: 3ae0cd93ed95431e
|
||||
zh: 25a0a2bc25863651
|
||||
@@ -58,7 +58,7 @@ Session inbox persistence and the task put occur in separate persistence systems
|
||||
|
||||
**Keep the mock's hourly choice out of the stored vocabulary.** The approved mock lists 每小时整点 beside the daily, weekly and one-shot choices. Hourly and fixed-rate intervals are the same elapsed-time rule, so the card maps that menu slot onto the existing interval kind instead of adding a persisted kind. A dedicated hourly kind would need a new durable variant, its decoder, its target resolution, and its tool schema, all to express what an interval already expresses.
|
||||
|
||||
Task discovery and timers do not depend on loaded Sessions. The after, absolute-time, and fixed-rate selectors retain their semantics alongside Daily, Weekly, and Cron; reading existing saved tasks does not rewrite them. The Host must have its ordinary Session persistence and recovery services available, and enabling the optional experimental bundle `@deepseek-ai/dsh-experimental-schedule-bundle` mounts Schedule; the Web composition carries its row disabled. Explicit deletion stops future delivery and removes the task from `list` and `catalog` without deleting conversation messages; the removed row takes its saved receipts with it. History is pruned to the configured window and record cap when an acknowledgment is appended, loaded into Host memory, and rewritten with the task on each acknowledgment. Pagination limits the returned record count; the plugin configuration (`deliveryHistoryDays`, default 30, and `deliveryHistoryRecords`, default 200) limits storage growth. Earlier overwritten receipts and deliveries whose task write failed cannot be reconstructed. Pause and execution-history operations remain unsupported.
|
||||
Task discovery and timers do not depend on loaded Sessions. The after, absolute-time, and fixed-rate selectors retain their semantics alongside Daily, Weekly, and Cron; reading existing saved tasks does not rewrite them. The Host must have its ordinary Session persistence and recovery services available, and the shipped Web composition mounts the Schedule service for the whole deployment. Explicit deletion stops future delivery and removes the task from `list` and `catalog` without deleting conversation messages; the removed row takes its saved receipts with it. History is pruned to the configured window and record cap when an acknowledgment is appended, loaded into Host memory, and rewritten with the task on each acknowledgment. Pagination limits the returned record count; the plugin configuration (`deliveryHistoryDays`, default 30, and `deliveryHistoryRecords`, default 200) limits storage growth. Earlier overwritten receipts and deliveries whose task write failed cannot be reconstructed. Pause and execution-history operations remain unsupported.
|
||||
|
||||
Required coverage includes startup from stored tasks, missing-status normalization, cold Session restoration, latest-only catch-up, inactive-task retention without repeat dispatch, real message receipts, deletion across restart, removal of a deleted task's saved deliveries, queue/persistence failures, and disposal. Wall-clock obligations include gaps and skipped dates, earlier-only overlaps, fractional seconds, UTC-range edges, committed-target and alias preservation, and post-restoration clock rollback. Weekly adds weekday normalization and validation, next-target selection across a gap and an overlap, and stored set preservation. Historical decoders must reject Daily, Weekly, and Cron while Host storage accepts them. Client coverage includes every recurring kind, exact rule time, zone, and weekday set, All/Enabled/Inactive status filters, retained inactive details and original-Session navigation, authoritative refresh after confirmed deletion and notification, empty lists, reconnect, and late responses. Presentation coverage includes the page's New action starting a Session, the transcript card's narrowing of persisted result JSON including an incomplete or replayed result, the header clock's direct open for exactly one task and its count label, the idle-only row mark with the hover-card two-task limit and omission line. History coverage includes legacy byte preservation, append and restart, immutable sent instructions, strict latest-receipt consistency, stable cursor pagination, binding checks, failed persistence, and late page replies during refresh or task changes. Cross-store crash duplication remains an explicit limitation rather than a completion claim.
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ Session 收件箱持久化和任务 put 发生在两个持久化系统中。收
|
||||
|
||||
**不把 mock 的「每小时整点」引入持久词表。** 设计稿把它与每天、每周、仅一次并列。每小时整点与固定间隔在语义上是同一种按经过时间计量的规则,因此详情里的该项直接映射到既有的间隔类型,而不是新增一个持久种类。若真要新增,需要新的持久变体、解码器、目标解析与工具 schema,而它表达的能力现有间隔已经覆盖。
|
||||
|
||||
任务发现和 timer 不依赖已加载的 Session。延迟、绝对时间和固定速率选择器在与 Daily、Weekly、Cron 并存时保留自身语义;读取已有任务不会重写它们。Host 必须提供普通 Session 持久化和恢复服务,而挂载 Schedule 需要启用可选实验 bundle `@deepseek-ai/dsh-experimental-schedule-bundle`;Web 组合以禁用状态携带其条目。显式删除会阻止后续投递,并将任务从 `list` 和 `catalog` 中移除,不删除对话消息;被移除的行会带走其已保存回执。历史在追加确认时按配置的窗口与条数上限裁剪,随后加载到 Host 内存,并在每次确认时随任务一起重写。分页限制返回记录数量,不限制存储增长或指令字节数。此前被覆盖的回执,以及任务写入失败的投递记录,无法重建。暂停和执行历史操作仍不受支持。
|
||||
任务发现和 timer 不依赖已加载的 Session。延迟、绝对时间和固定速率选择器在与 Daily、Weekly、Cron 并存时保留自身语义;读取已有任务不会重写它们。Host 必须提供普通 Session 持久化和恢复服务,而随发行版交付的 Web 组合为整个部署挂载 Schedule 服务。显式删除会阻止后续投递,并将任务从 `list` 和 `catalog` 中移除,不删除对话消息;被移除的行会带走其已保存回执。历史在追加确认时按配置的窗口与条数上限裁剪,随后加载到 Host 内存,并在每次确认时随任务一起重写。分页限制返回记录数量,不限制存储增长或指令字节数。此前被覆盖的回执,以及任务写入失败的投递记录,无法重建。暂停和执行历史操作仍不受支持。
|
||||
|
||||
必要覆盖范围包括从已存储任务启动、缺失状态规范化、冷 Session 恢复、仅补发最新发生时点、保留未运行任务且不重复投递、真实消息回执、重启后的删除结果、删除会移除已保存发送记录、排队或持久化失败,以及销毁。钟表规则的验证要求包括缺口和跳过的日期、仅选择较早时点的重叠、小数秒、UTC 范围边缘、已提交目标和别名保留,以及恢复后的时钟回拨。Weekly 另需覆盖星期集合的规范化与校验、跨缺口与重叠的下一目标选择,以及已存集合的保留。历史解码器必须拒绝 Daily、Weekly 与 Cron,而宿主存储接受它们。客户端覆盖范围包括每种重复规则、精确规则时间、时区和星期集合、全部/已开启/未运行状态筛选、保留未运行任务详情和原 Session 导航、确认删除和通知后的权威刷新、空列表、重新连接和晚到响应。呈现覆盖范围包括页面“新建”操作打开新会话、transcript 卡片从不完整或回放的结果 JSON 中收窄任务、页头时钟在恰好一个任务时直接打开并给出数量标签、仅空闲行标记及其悬浮卡片两个任务上限与遗漏行。历史覆盖范围包括旧文件字节保留、追加与重启、不可变的发送指令、最近回执一致性严格校验、稳定游标分页、绑定校验、持久化失败,以及刷新或切换任务期间晚到的分页响应。跨存储崩溃导致的重复投递仍是明确限制,不能被表述为完成保证。
|
||||
|
||||
|
||||
+4
-4
@@ -9,11 +9,11 @@
|
||||
en: 2ba6c43b20a3d347
|
||||
zh: 5647179ddaa38ad9
|
||||
/agent-note-ship-experimental-capabilities-as-optional-bundles/decision:
|
||||
en: fdd54ede661f7a83
|
||||
zh: a41ed1a872bb8ba3
|
||||
en: 1c5a43b3ce2d3056
|
||||
zh: b59f549a12cf67d1
|
||||
/agent-note-ship-experimental-capabilities-as-optional-bundles/alternatives-considered:
|
||||
en: a65d84004e48b3ef
|
||||
zh: 17221f08e7a8a89b
|
||||
/agent-note-ship-experimental-capabilities-as-optional-bundles/consequences:
|
||||
en: e7fb2a93a89ba9b6
|
||||
zh: 37ed9f0a3ca44583
|
||||
en: a5c9699904fa72f1
|
||||
zh: 80763881150593e2
|
||||
+2
-2
@@ -10,7 +10,7 @@ The Web plugin page offered two optional bundles, Agent Teams and voice input. A
|
||||
|
||||
## Decision
|
||||
|
||||
`OPTIONAL_BUNDLES` lists Agent Teams, voice input, Auto review, and the Schedule bundle. Every optional bundle declares `icon` and exports `./locale/*.json` with `meta.title` and `meta.description`, so the Official group renders a localized title, description, and image; `verify-default-product-isolation` rejects an optional bundle without them. The Inspector's `cordis.patch.yml` names the package instead of a built-artifact path, so the same file is the bundle patch and the `--patch` overlay for a built Web launch.
|
||||
`OPTIONAL_BUNDLES` lists Agent Teams, voice input, and Auto review. Every optional bundle declares `icon` and exports `./locale/*.json` with `meta.title` and `meta.description`, so the Official group renders a localized title, description, and image; `verify-default-product-isolation` rejects an optional bundle without them. The Inspector's `cordis.patch.yml` names the package instead of a built-artifact path, so the same file is the bundle patch and the `--patch` overlay for a built Web launch.
|
||||
|
||||
An optional bundle is a runtime dependency of the installation, so its dependency graph is downloaded by every `dsh` install. The list therefore admits only packages whose graph is already in the installation's closure; Auto review adds nothing. The Inspector stays available through explicit installation and does not appear in the default plugin list. The browser-use and computer-use providers stay explicit compositions: Playwright MCP, Chrome DevTools MCP, and the native Cua Driver runtime binaries add about 85 MB and 21 packages to every install whether or not the bundle is enabled, and a shipped Cua Driver MCP switch would offer a capability whose executable the installation does not carry. Those provider packages keep locale display metadata for their component rows. Two more packages stay out for other reasons: `ptc-runtime-python` replaces the PTC runtime, and `workflow-ptc` rejects a non-TypeScript runtime at load while the Web presets carry `workflow-ptc` rows a bundle patch cannot reach; `browser-use-stagehand-native` requires a native model name and API key at schema validation with no configuration form on the page.
|
||||
|
||||
@@ -22,4 +22,4 @@ An optional bundle is a runtime dependency of the installation, so its dependenc
|
||||
|
||||
## Consequences
|
||||
|
||||
The Official group carries four optional-bundle entries, each tagged experimental by its experimental name. The runtime dependency closure of the installation is unchanged. A browser-use or computer-use provider still needs its Service Definition and the provider in a profile patch or composition.
|
||||
The Official group carries three optional-bundle entries, each tagged experimental by its experimental name. The runtime dependency closure of the installation is unchanged. A browser-use or computer-use provider still needs its Service Definition and the provider in a profile patch or composition.
|
||||
+2
-2
@@ -10,7 +10,7 @@ Web 插件页只提供两个可选 bundle:Agent Teams 与语音输入。Auto r
|
||||
|
||||
## 决策
|
||||
|
||||
`OPTIONAL_BUNDLES` 列出 Agent Teams、语音输入、Auto review 与 Schedule bundle。每个可选 bundle 都声明 `icon` 并导出带 `meta.title` 与 `meta.description` 的 `./locale/*.json`,官方分组因此能渲染本地化标题、描述和图片;`verify-default-product-isolation` 会拒绝缺少这些声明的可选 bundle。Inspector 的 `cordis.patch.yml` 直接写包名而非构建产物路径,所以同一文件既是 bundle patch,也是已构建 Web 启动的 `--patch` overlay。
|
||||
`OPTIONAL_BUNDLES` 列出 Agent Teams、语音输入与 Auto review。每个可选 bundle 都声明 `icon` 并导出带 `meta.title` 与 `meta.description` 的 `./locale/*.json`,官方分组因此能渲染本地化标题、描述和图片;`verify-default-product-isolation` 会拒绝缺少这些声明的可选 bundle。Inspector 的 `cordis.patch.yml` 直接写包名而非构建产物路径,所以同一文件既是 bundle patch,也是已构建 Web 启动的 `--patch` overlay。
|
||||
|
||||
可选 bundle 是安装的运行时依赖,其依赖图会随每次 `dsh` 安装一起下载。因此名单只接纳依赖图已在安装闭包内的包;Auto review 不增加任何依赖。Inspector 保留显式安装方式,不在默认插件列表中显示。浏览器操作与电脑操作提供方仍保持显式组合:Playwright MCP、Chrome DevTools MCP 与原生 Cua Driver 运行时二进制会让每次安装多出约 85 MB、21 个包,无论 bundle 是否启用;而随附的 Cua Driver MCP 开关会提供一个安装本身并不携带其可执行文件的能力。这些提供方包保留 locale 显示元数据,供组件行使用。另有两个包因其他原因不纳入:`ptc-runtime-python` 会替换 PTC 运行时,而 `workflow-ptc` 在加载时拒绝非 TypeScript 运行时,且 Web preset 内含 bundle patch 无法触及的 `workflow-ptc` 行;`browser-use-stagehand-native` 在 schema 校验时就要求原生模型名称与 API 密钥,而插件页没有对应的配置表单。
|
||||
|
||||
@@ -22,4 +22,4 @@ Web 插件页只提供两个可选 bundle:Agent Teams 与语音输入。Auto r
|
||||
|
||||
## 后果
|
||||
|
||||
官方分组包含四个可选 bundle 条目,每项都因实验包名而带实验性标签。安装的运行时依赖闭包保持不变。浏览器操作或电脑操作提供方仍需在 profile patch 或组合中同时挂载其 Service Definition 与提供方。
|
||||
官方分组包含三个可选 bundle 条目,每项都因实验包名而带实验性标签。安装的运行时依赖闭包保持不变。浏览器操作或电脑操作提供方仍需在 profile patch 或组合中同时挂载其 Service Definition 与提供方。
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
# Bilingual-pair consistency record for 2026-09-24-preset-scoped-schedule-tools.md (docs/i18n/README.md): per heading
|
||||
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
|
||||
# After editing either side, bring the other along and re-record with:
|
||||
# pnpm run verify-translation-pairing --write .agents/notes/implemented/architecture/2026-09-24-preset-scoped-schedule-tools.md
|
||||
/agent-note-preset-scoped-schedule-tools:
|
||||
en: c7dae89a43489b21
|
||||
zh: f85a88544d7e2726
|
||||
/agent-note-preset-scoped-schedule-tools/problem:
|
||||
en: 27b4d1d25cd1c178
|
||||
zh: 3ddc4d9a09b6182d
|
||||
/agent-note-preset-scoped-schedule-tools/decision:
|
||||
en: 3c4708981d34217d
|
||||
zh: cd0c07dc0888f3db
|
||||
/agent-note-preset-scoped-schedule-tools/alternatives-considered:
|
||||
en: 5cfe619038339caa
|
||||
zh: c2d2651d304d867c
|
||||
/agent-note-preset-scoped-schedule-tools/consequences:
|
||||
en: 546d83d28487d1c1
|
||||
zh: 438922cd4f3ff9ec
|
||||
/agent-note-preset-scoped-schedule-tools/testing:
|
||||
en: 1c5f34cf30a24fd7
|
||||
zh: 6f7a372de52d0ecd
|
||||
@@ -0,0 +1,34 @@
|
||||
# Agent Note: Preset-scoped Schedule tools
|
||||
|
||||
Status: implemented
|
||||
|
||||
English | [中文](2026-09-24-preset-scoped-schedule-tools.zh.md)
|
||||
|
||||
## Problem
|
||||
|
||||
`@deepseek-ai/dsh-schedule` registered `schedule_create`, `schedule_list`, `schedule_update`, and `schedule_delete` itself, attaching them to every live root Agent from an `agent/created` listener whose only filter was membership in `ctx.agents.roots()`. That predicate says nothing about the Agent preset, so `minimal` — composed for a capability-poor agent — carried all four schemas and paid their fixed request-context token cost. Storage, delivery, and the preset mechanism were each correct; the availability decision sat in the package that owns the storage service.
|
||||
|
||||
## Decision
|
||||
|
||||
`@deepseek-ai/dsh-tool-schedule` (`packages/schedule/tool-schedule`) contributes the four tools as a preset-level Consumer. It declares `inject = ['tools']` and registers the definitions on `ctx.tools` from inside `ctx.inject(['schedule'], …)`, so the mounting scope is the one that owns them and the registration waits for the Host Schedule service in that same scope. The shipped Web profile mounts the row in its `standard`, `cordis`, and `ptc` presets and omits it from `minimal`. Cordis effect ownership disposes the definitions with the mount, and a composition that never resolves `schedule` registers none of them. The [Web bundle](../../../../packages/bundle/web-app/README.md) owns the `schedule` and `ui-schedule` rows the shipped composition mounts; this record owns the reminder tools' preset placement.
|
||||
|
||||
`@deepseek-ai/dsh-schedule` keeps the version-1 storage domain, the Host timer and serialized queue, Host delivery through the Session controller, the Automation page's backing reads, and the `ctx.schedule` interface. `dsh-tool-schedule` is the model-facing consumer of that interface: it checks selector and identity constraints before the service call, reads `exec.agent` for the Session binding, and maps failures that are not `ScheduleInputError` to `internal_error` so storage details never reach the model.
|
||||
|
||||
## Alternatives considered
|
||||
|
||||
**Keep registration in the Host service behind a `Config` flag.** An `exposeTools` field would move a composition choice into the storage plugin, where no preset can state it, and every preset would still need an edit to change the outcome.
|
||||
|
||||
**Register the tools whenever `ctx.schedule` is present.** The shipped Web composition mounts the `schedule` Host service for the whole deployment, `minimal` included, so that condition restores the coupling between storage and model surface that this decision removes.
|
||||
|
||||
## Consequences
|
||||
|
||||
- `minimal` request headers and tool lists carry no reminder tool schema.
|
||||
- Each preset that mounts the row pays the four schemas' fixed token cost, and tool availability is read from the composition instead of inferred from the Host service's presence.
|
||||
- A deployment can mount `dsh-schedule` for storage and delivery without granting its agents model-driven reminder management.
|
||||
- `dsh-schedule` injects no `ctx.tools` and registers no model-facing tool.
|
||||
- A delegated child cannot use the four tools through either layer: the `tool-subagent` and `tool-subagent-fork` rows in `standard`, `cordis`, and `ptc` deny all four names through `toolFilter`, and the provider applies that filter in the child scope through `ctx.tools.restrict()`, so the tools leave the child's prompt; `subagentCallerRefusal` in `dsh-tool-schedule` independently returns `{ code: 'subagent_session', message: 'A delegated subagent cannot use reminders.' }` from every one of the four tools when the caller's delegation depth is above zero, so a call that reaches a tool anyway is refused.
|
||||
- A Session a delegated child owns can never receive a delivered reminder, so `ScheduleService.create` and `ScheduleService.update` refuse it with `subagent_session`. The refusal reads the delegation depth — the accounting the delegation cap itself enforces, carried by the persisted session header across a cold resume. The rule sits in the service, so other consumers reach it too — the Automation surface included.
|
||||
|
||||
## Testing
|
||||
|
||||
`packages/schedule/tool-schedule/tests/tool-schedule.spec.ts` pins the four definitions and their error mapping, including `refuses every tool for a delegated child caller`. `apps/cli/tests/web-agent-presets.e2e.ts` asserts the `minimal` preset's tool list, and `snapshots/web/minimal-preset/tool-schemas.expected.json` records its bash-only tool table. `packages/schedule/schedule/tests/subagent-ownership.spec.ts` pins the delegation-depth refusal, and `scripts/optional-bundles.spec.ts` asserts that both delegation rows in the three presets deny all four tool names.
|
||||
@@ -0,0 +1,34 @@
|
||||
# Agent Note: 按 preset 提供的 Schedule 工具
|
||||
|
||||
Status: implemented
|
||||
|
||||
[English](2026-09-24-preset-scoped-schedule-tools.md) | 中文
|
||||
|
||||
## Problem
|
||||
|
||||
`@deepseek-ai/dsh-schedule` 自己注册 `schedule_create`、`schedule_list`、`schedule_update` 和 `schedule_delete`,在 `agent/created` 监听器中把它们附加到每个 live 根 Agent,唯一的过滤条件是 `ctx.agents.roots()` 的成员资格。该判据不涉及 Agent preset,因此为能力克制而组合的 `minimal` 也携带全部四个 schema,并承担其固定的请求上下文 token 成本。存储、投递和 preset 机制各自都是正确的;可用性决策落在了拥有存储服务的包里。
|
||||
|
||||
## Decision
|
||||
|
||||
`@deepseek-ai/dsh-tool-schedule`(`packages/schedule/tool-schedule`)以 preset 级 Consumer 的身份贡献这四个工具。它声明 `inject = ['tools']`,并在 `ctx.inject(['schedule'], …)` 内通过 `ctx.tools` 注册这些定义,因此拥有它们的是挂载它的作用域,而注册会等待同一作用域中的宿主 Schedule 服务。发布版 Web profile 在其 `standard`、`cordis` 和 `ptc` preset 中挂载该行,`minimal` 不挂载。Cordis 的 effect 所有权随挂载卸载而释放这些定义,而始终未解析出 `schedule` 的组合不会注册其中任何一个。[Web bundle](../../../../packages/bundle/web-app/README.zh.md)负责随发行版交付的组合挂载的 `schedule` 与 `ui-schedule` 两行;本记录负责提醒工具的 preset 归属。
|
||||
|
||||
`@deepseek-ai/dsh-schedule` 保留版本 1 storage domain、宿主定时器与串行队列、经由 Session controller 的宿主投递、自动化任务页面的读取来源,以及 `ctx.schedule` 接口。`dsh-tool-schedule` 是该接口面向模型的消费者:它在调用服务前校验选择器与身份约束,从 `exec.agent` 读取 Session 绑定,并把非 `ScheduleInputError` 的失败映射为 `internal_error`,使存储细节不会到达模型。
|
||||
|
||||
## Alternatives considered
|
||||
|
||||
**继续在宿主服务中通过 `Config` 开关注册。** `exposeTools` 这类字段会把组合选择放进存储插件,而任何 preset 都无法在那里声明它,且每个 preset 仍要各自编辑才能改变结果。
|
||||
|
||||
**只要 `ctx.schedule` 存在就注册这些工具。** 随发行版交付的 Web 组合为整个部署挂载 `schedule` 宿主服务,包括 `minimal`,因此该条件会恢复本决策所移除的、存储与模型界面之间的耦合。
|
||||
|
||||
## Consequences
|
||||
|
||||
- `minimal` 的请求头与工具列表不含任何提醒工具 schema。
|
||||
- 挂载该行的每个 preset 承担四个 schema 的固定 token 成本,工具可用性取自组合,而不是由宿主服务是否存在推断。
|
||||
- 部署可以只为存储与投递挂载 `dsh-schedule`,而不授予其 Agent 由模型驱动的提醒管理能力。
|
||||
- `dsh-schedule` 不注入 `ctx.tools`,也不注册任何面向模型的工具。
|
||||
- 被委派的子 agent 无法通过两道中的任何一道使用这四个工具:`standard`、`cordis` 与 `ptc` 中的 `tool-subagent` 与 `tool-subagent-fork` 两行通过 `toolFilter` 拒绝全部四个名称,provider 会在子作用域内通过 `ctx.tools.restrict()` 应用该过滤,因此这些工具会从子 agent 的 prompt 中消失;`dsh-tool-schedule` 中的 `subagentCallerRefusal` 会在调用方委派深度大于零时,从四个工具中的每一个独立返回 `{ code: 'subagent_session', message: 'A delegated subagent cannot use reminders.' }`,因此即使某个调用仍能到达工具,也会被拒绝。
|
||||
- 被委派子 agent 拥有的 Session 永远收不到投递的提醒,因此 `ScheduleService.create` 与 `ScheduleService.update` 会以 `subagent_session` 拒绝它。该拒绝读取委派深度——委派封顶本身执行的记账,由持久化 session header 承载并跨冷恢复保留。这条规则在服务层,因此其它消费方(包括自动化任务页面)也会命中。
|
||||
|
||||
## Testing
|
||||
|
||||
`packages/schedule/tool-schedule/tests/tool-schedule.spec.ts` 固定这四个定义及其错误映射,包括 `refuses every tool for a delegated child caller`。`apps/cli/tests/web-agent-presets.e2e.ts` 断言 `minimal` preset 的工具列表,`snapshots/web/minimal-preset/tool-schemas.expected.json` 记录其只含 `bash` 的工具表。`packages/schedule/schedule/tests/subagent-ownership.spec.ts` 固定委派深度拒绝,`scripts/optional-bundles.spec.ts` 断言三个 preset 的两行委派行都拒绝全部四个工具名。
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
# Bilingual-pair consistency record for 2026-09-24-preset-scoped-time-context.md (docs/i18n/README.md): per heading
|
||||
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
|
||||
# After editing either side, bring the other along and re-record with:
|
||||
# pnpm run verify-translation-pairing --write .agents/notes/implemented/architecture/2026-09-24-preset-scoped-time-context.md
|
||||
/agent-note-preset-scoped-time-context:
|
||||
en: dabc6e224d2af71c
|
||||
zh: 81dafffcf9dcb0e2
|
||||
/agent-note-preset-scoped-time-context/problem:
|
||||
en: 6b0d2bf60e97809f
|
||||
zh: 8a32ad297b908ebb
|
||||
/agent-note-preset-scoped-time-context/decision:
|
||||
en: 650d78ef725cd741
|
||||
zh: 95dc34667246d2b5
|
||||
/agent-note-preset-scoped-time-context/alternatives-considered:
|
||||
en: 3db88ad95898e9ee
|
||||
zh: aa211bd55052331c
|
||||
/agent-note-preset-scoped-time-context/consequences:
|
||||
en: 3d92e8f922a8d812
|
||||
zh: 78078ba2c38f6727
|
||||
/agent-note-preset-scoped-time-context/testing:
|
||||
en: 16a4911143027f71
|
||||
zh: f945e85204aebf7e
|
||||
@@ -0,0 +1,37 @@
|
||||
# Agent Note: Preset-scoped time context
|
||||
|
||||
Status: implemented
|
||||
|
||||
English | [中文](2026-09-24-preset-scoped-time-context.zh.md)
|
||||
|
||||
## Problem
|
||||
|
||||
A row in `packages/bundle/web-app/cordis.patch.yml` serves every preset in the profile, so a `time-context` row placed there would append one user-role message per eligible step to every preset, `minimal` included. The `minimal` preset composes only a persona and a persistent shell: it declares no reminder tool, and nothing in it turns the reading into a scheduled target, so that message would have no consumer in its composition.
|
||||
|
||||
## Decision
|
||||
|
||||
`packages/bundle/web-app/presets/standard.patch.yml`, `ptc.patch.yml`, and `cordis.patch.yml` each declare `time-context` among their Agent-context rows; `minimal.patch.yml` does not. `packages/bundle/web-app/cordis.patch.yml` carries no `time-context` row; it inserts `schedule` and `ui-schedule`. `packages/bundle/web-app/package.json` keeps declaring `@deepseek-ai/dsh-time-context`, which `verify-cordis-config` requires for the bare plugin name `presets/cordis.patch.yml` contributes.
|
||||
|
||||
The boundary this states is that an injection carrying time belongs to the preset that consumes it. A preset decides whether its Agents receive a clock reading, so the reading travels with the reminder tools that consume it; the `schedule` Host service row and the `ui-schedule` client row are preset-independent surfaces, so the [Web bundle](../../../../packages/bundle/web-app/README.md) inserts them for the whole deployment. That composition owns which Host rows and client surfaces the `web` profile mounts; this record owns the reading's preset placement.
|
||||
|
||||
The plugin is unchanged: it still appends the sampled instant, the browser zone attached to the open request, and the elapsed time since the preceding model-visible message, at the configured minimum interval.
|
||||
|
||||
## Alternatives considered
|
||||
|
||||
**Keep the row in the Host row list.** `minimal` would keep receiving a model-visible message that nothing in its composition consumes, contradicting the rule that moved the reminder tools to preset declarations ([preset-scoped Schedule tools](2026-09-24-preset-scoped-schedule-tools.md)).
|
||||
|
||||
**Declare the row in `minimal` too.** That would make the placement uniform across presets, but it keeps the same unused durable message in the capability-poor composition, so it pays the cost the change removes.
|
||||
|
||||
**Give the Schedule Host service the clock instead.** The service validates an offset-bearing `at` value or an explicit `time_zone`; it reads no browser, Session, process, or model context, and the reading reaches the model only as prompt content. The Host service row therefore does not need the injection, and moving clock sampling into storage would couple two independently owned decisions.
|
||||
|
||||
## Consequences
|
||||
|
||||
- A `minimal` session appends no time-context message, so its model receives no clock reading and must ask for any date or time the user leaves unqualified.
|
||||
- `standard`, `cordis`, and `ptc` sessions keep the reading at the shipped 10-minute minimum interval, and the four reminder tools stay in the same three presets.
|
||||
- The reading is model-visible and durable, so it replays, compacts, and appears in exported Session logs; `snapshots/web/minimal-preset/session.v4.jsonl` no longer records one.
|
||||
- A profile patch layer cannot disable or reconfigure the row by id: `applyEntryPatches` reaches a loaded entry or a group's children, and a preset's declared plugins sit inside the preset row's `config.plugins`. Changing the row means restating that row, which is how the Web editor saves preset edits.
|
||||
- A preset mount reaches that preset's subagents, so a `standard`, `cordis`, or `ptc` child receives the reading its parent receives; the reminder tools in those presets stay denied to that child and refuse its calls.
|
||||
|
||||
## Testing
|
||||
|
||||
`apps/web/tests/schedule-after.e2e.ts` pins the shipped composition: the `schedule` and `ui-schedule` rows, `time-context` (`@deepseek-ai/dsh-time-context`) and `tool-schedule` (`@deepseek-ai/dsh-tool-schedule`) declared enabled once each in the `standard`, `ptc`, and `cordis` presets and absent from `minimal`, and no `time-context` row. Its every-step overlay restates `preset-standard`'s declared plugins instead of patching a row by id. `apps/cli/tests/profiles/web/tests/web-default-isolation.expected.e2e.ts` asserts the shipped composition carries the `schedule` and `ui-schedule` entries and no `time-context` entry.
|
||||
@@ -0,0 +1,37 @@
|
||||
# Agent Note: 按 preset 归属的时间上下文
|
||||
|
||||
Status: implemented
|
||||
|
||||
[English](2026-09-24-preset-scoped-time-context.md) | 中文
|
||||
|
||||
## Problem
|
||||
|
||||
`packages/bundle/web-app/cordis.patch.yml` 中的一行会服务于 profile 中的每个 preset,因此把 `time-context` 行放在那里,会为每个 preset(包括 `minimal`)的每个符合条件的步骤追加一条 user 角色消息。`minimal` preset 只组合 persona 与 persistent shell:它不声明提醒工具,其中也没有任何东西会把该读数变成定时目标,因此那条消息在它的组合中没有消费者。
|
||||
|
||||
## Decision
|
||||
|
||||
`packages/bundle/web-app/presets/standard.patch.yml`、`ptc.patch.yml` 与 `cordis.patch.yml` 各自在其 Agent 上下文行中声明 `time-context`;`minimal.patch.yml` 不声明。`packages/bundle/web-app/cordis.patch.yml` 不含 `time-context` 行;它插入 `schedule` 与 `ui-schedule`。`packages/bundle/web-app/package.json` 继续声明 `@deepseek-ai/dsh-time-context`,这是 `verify-cordis-config` 对 `presets/cordis.patch.yml` 贡献的裸包名的要求。
|
||||
|
||||
这里确立的边界是:携带时间的注入归属于消费它的 preset。由 preset 决定其 Agent 是否收到时钟读数,因此该读数与消费它的提醒工具同行;`schedule` 宿主服务行与 `ui-schedule` 客户端行是与 preset 无关的界面,因此由 [Web bundle](../../../../packages/bundle/web-app/README.zh.md)为整个部署插入它们。该组合负责 `web` profile 挂载哪些宿主行与客户端界面;本记录负责该读数的 preset 归属。
|
||||
|
||||
插件本身没有改动:它仍按配置的最小间隔追加采样瞬时、附加到当前开放请求的浏览器时区,以及自前一条模型可见消息以来的经过时长。
|
||||
|
||||
## Alternatives considered
|
||||
|
||||
**把该行留在宿主行列表。** 这样 `minimal` 会继续收到其组合中无任何消费者使用的模型可见消息,与把提醒工具改为 preset 声明所依据的规则相矛盾([按 preset 提供的 Schedule 工具](2026-09-24-preset-scoped-schedule-tools.zh.md))。
|
||||
|
||||
**在 `minimal` 中也声明该行。** 这会让各 preset 的归属看起来一致,但会在能力贫乏的组合中保留同一条无人使用的持久消息,因此它仍要付出本改动所消除的成本。
|
||||
|
||||
**把时钟交给 Schedule 宿主服务。** 该服务校验带偏移量的 `at` 值或显式 `time_zone`;它不读取浏览器、Session、进程或模型上下文,读数只作为提示词内容到达模型。因此宿主服务行不需要该注入,把时钟采样搬进存储也会把两个各自独立归属的决策耦合起来。
|
||||
|
||||
## Consequences
|
||||
|
||||
- `minimal` 会话不再追加 time-context 消息,其模型收不到时钟读数,因此用户未明确限定的任何日期或时间都必须询问。
|
||||
- `standard`、`cordis` 与 `ptc` 会话保持发布版的 10 分钟最小间隔读数,且四个提醒工具仍留在这三个 preset 中。
|
||||
- 读数对模型可见且持久,因此它参与回放、压缩并出现在导出的 Session 日志中;`snapshots/web/minimal-preset/session.v4.jsonl` 不再记录它。
|
||||
- profile patch 层无法按 id 禁用或改配该行:`applyEntryPatches` 只能触达已加载的条目或某个 group 的子项,而 preset 声明的插件位于 preset 行的 `config.plugins` 内。改动该行意味着重述该行,这也是 Web 编辑器保存 preset 编辑的机制。
|
||||
- preset 挂载会覆盖该 preset 的子 agent,因此 `standard`、`cordis` 或 `ptc` 的子 agent 会收到与其父级相同的读数;这些 preset 中的提醒工具仍对该子 agent 保持 deny,并拒绝其调用。
|
||||
|
||||
## Testing
|
||||
|
||||
`apps/web/tests/schedule-after.e2e.ts` 固化随发行版交付的组合:`schedule` 与 `ui-schedule` 两行,`time-context`(`@deepseek-ai/dsh-time-context`)与 `tool-schedule`(`@deepseek-ai/dsh-tool-schedule`)在 `standard`、`ptc` 与 `cordis` preset 中各声明一次且未禁用,也不在 `minimal` 中,且不含 `time-context` 行。其每步读数 overlay 通过重述 `preset-standard` 声明的插件实现,而不是按 id patch 该行。`apps/cli/tests/profiles/web/tests/web-default-isolation.expected.e2e.ts` 断言随发行版交付的组合含 `schedule` 与 `ui-schedule` 条目,且不含 `time-context` 条目。
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
# Bilingual-pair consistency record for 2026-09-24-schedule-opt-in-optional-bundle.md (docs/i18n/README.md): per heading
|
||||
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
|
||||
# After editing either side, bring the other along and re-record with:
|
||||
# pnpm run verify-translation-pairing --write .agents/notes/implemented/architecture/2026-09-24-schedule-opt-in-optional-bundle.md
|
||||
/agent-note-schedule-as-an-opt-in-optional-bundle:
|
||||
en: 8c2381fd778a9888
|
||||
zh: 8877255cb980eea1
|
||||
/agent-note-schedule-as-an-opt-in-optional-bundle/problem:
|
||||
en: bb23c2f7f93a462b
|
||||
zh: 9fb600fc8e203323
|
||||
/agent-note-schedule-as-an-opt-in-optional-bundle/decision:
|
||||
en: 483d1dd51b9cc073
|
||||
zh: b069e2e2385c8132
|
||||
/agent-note-schedule-as-an-opt-in-optional-bundle/alternatives-considered:
|
||||
en: 8e5f4d8fa8c2e78d
|
||||
zh: 3353c7042c6a1d6b
|
||||
/agent-note-schedule-as-an-opt-in-optional-bundle/consequences:
|
||||
en: 36cd0eb71abeedbe
|
||||
zh: 7c134095cc19fcfd
|
||||
@@ -1,35 +0,0 @@
|
||||
# Agent Note: Schedule as an opt-in optional bundle
|
||||
|
||||
Status: implemented
|
||||
|
||||
English | [中文](2026-09-24-schedule-opt-in-optional-bundle.zh.md)
|
||||
|
||||
## Problem
|
||||
|
||||
Schedule adds four tool schemas to every live root Agent request and one durable clock message per eligible step, so the shipped Web composition must not mount it by default. A person using the shipped Web profile still needs a product-surface switch to turn it on; a profile patch layer or a `--patch` overlay is a configuration file that person cannot reach.
|
||||
|
||||
## Decision
|
||||
|
||||
`packages/bundle/web-app/cordis.patch.yml` carries none of `time-context`, `schedule`, and `ui-schedule`, so the shipped Web composition exposes no Schedule surface: no `schedule_*` tools, no Session reminder catalog, no Automation tasks page, and no per-step clock reading.
|
||||
|
||||
`@deepseek-ai/dsh-experimental-schedule-bundle` (`packages/experimental/schedule-bundle/`) inserts the three rows in its `cordis.patch.yml` and depends on their packages, as every other optional bundle inserts the rows it ships. `OPTIONAL_BUNDLES` in `packages/boot/app-boot/src/profile.ts` names the package, and `apps/cli` declares it as a runtime dependency, so every installation ships it switched off. The [experimental-as-optional-bundles decision](2026-09-21-experimental-capabilities-as-optional-bundles.md) owns the `OPTIONAL_BUNDLES` conventions and the localized `icon` and `meta.title` / `meta.description` metadata the Web Plugins page renders in its Official group.
|
||||
|
||||
Enabling the bundle inserts `time-context` (a per-step clock reading with the sampled instant, the browser zone attached to the open request, and the elapsed time since the preceding model-visible message), `schedule` (durable reminders plus `schedule_create`, `schedule_list`, `schedule_update`, and `schedule_delete` on live root Agents), and `ui-schedule` (the Session reminder catalog and the Automation tasks page). The bundle carries `time-context` with `schedule` because a reminder request states a wall-clock target: the sampled instant is what lets the model turn a request such as "tomorrow at nine" into an offset-bearing `at` value. The [Schedule subsystem](../../../../docs/subsystems/schedule.md) owns the durable records, delivery, and management operations; the [Web bundle](../../../../packages/bundle/web-app/README.md) owns the composition the bundle adds the rows to. Disabling the bundle restores the shipped composition, and the Host stops scheduling while the `schedule` row is absent; stored task records remain in the Schedule domain.
|
||||
|
||||
## Alternatives considered
|
||||
|
||||
**Ship Schedule on by default.** Every Web session then pays four tool schemas in each request header and one durable user message per eligible step, and a conversation that never creates a reminder pays both costs. The arrangement also left the capability without an off switch on the product surface.
|
||||
|
||||
**Keep a `--patch` overlay file.** An overlay is a launch-time argument rather than a product-surface switch, so a person using the shipped Web profile cannot reach it. Re-declaring the rows through its `insert` list does not override them: `applyEntryPatches` appends that list without de-duplicating ids, and the Loader collapses the composed list to one entry per id with the last declaration winning, so the overlay replaces the Web bundle's rows instead of setting fields on them.
|
||||
|
||||
**Keep the rows in the Web composition with `disabled: true` and switch them on with id-targeted patches.** The bundle would then set fields on existing rows, but the plugin manager lists only the rows a bundle inserts, so the bundle's page reported no components and needed a second listing path for overridden rows, while every other optional bundle inserts its rows. A profile that also declares one of the ids resolves the same way as for any other bundle: the Loader keeps the last declaration.
|
||||
|
||||
**Lock the three rows to the bundle switch.** A bundle manifest field that makes the plugin manager refuse to switch the rows one by one adds a plugin-manager concept only this bundle would use. The bundle's page offers a switch per row, as for every other bundle, and the bundle README records that the three rows work only together.
|
||||
|
||||
## Consequences
|
||||
|
||||
- A default `dsh web` session carries no Schedule tool schemas, no Session reminder catalog, no Automation tasks page, and no per-step clock reading. An installation that wants them enables the optional bundle from the Plugins page or lists the package in a profile's `dsh.profile.bundles`.
|
||||
- An enabled installation adds four tool schemas to every live root Agent and one durable clock message per eligible step; the reading is model-visible and durable, so it replays, compacts, and appears in exported Session logs like any other user message.
|
||||
- The Plugins page lists the three rows under the bundle with the titles their packages' `locale/*.json` declare, their state, and, while the bundle is on, a switch per row; switching one of them off leaves Schedule without that part.
|
||||
- A profile patch or `--patch` overlay that targets one of the three ids matches no row while the bundle is not selected, and the loader warns `patch: entry <id> not found` for it; selecting the bundle replaces switching the rows on by id.
|
||||
- The switch is configuration-only: `src/index.ts` is an empty module, the patch carries the runtime content, and the package owns no mutable runtime state, so it publishes no invariant companion.
|
||||
-35
@@ -1,35 +0,0 @@
|
||||
# Agent Note: Schedule 作为按需开启的可选 bundle
|
||||
|
||||
Status: implemented
|
||||
|
||||
[English](2026-09-24-schedule-opt-in-optional-bundle.md) | 中文
|
||||
|
||||
## Problem
|
||||
|
||||
Schedule 会给每个活跃根 Agent 的请求增加四个工具 schema,并在每个符合条件的步骤追加一条持久时钟消息,因此随发行版交付的 Web 组合不能默认挂载它。使用随发行版 Web profile 的人仍需要产品界面上的开关来打开它;profile patch 层或 `--patch` overlay 都是这个人无法触及的配置文件。
|
||||
|
||||
## Decision
|
||||
|
||||
`packages/bundle/web-app/cordis.patch.yml` 不含 `time-context`、`schedule` 与 `ui-schedule` 中的任何一行,因此随发行版交付的 Web 组合不提供任何定时能力:没有 `schedule_*` 工具、没有 Session 提醒目录、没有自动化任务页面,也没有逐步时钟读数。
|
||||
|
||||
`@deepseek-ai/dsh-experimental-schedule-bundle`(`packages/experimental/schedule-bundle/`)在其 `cordis.patch.yml` 中插入这三行并依赖它们的包,与其他可选 bundle 插入各自随附的行相同。`packages/boot/app-boot/src/profile.ts` 的 `OPTIONAL_BUNDLES` 列出该包,`apps/cli` 将其声明为运行时依赖,因此每次安装都随包携带且默认关闭。[实验性能力作为可选 bundle 的决策](2026-09-21-experimental-capabilities-as-optional-bundles.zh.md)负责 `OPTIONAL_BUNDLES` 的约定,以及 Web 插件管理页在“官方”分组中渲染的本地化 `icon` 与 `meta.title` / `meta.description` 元数据。
|
||||
|
||||
启用该 bundle 会插入 `time-context`(每个步骤的时钟读数,包含采样瞬时、附加到当前开放请求的浏览器时区,以及自前一条模型可见消息以来的经过时长)、`schedule`(持久提醒,以及每个活跃根 Agent 上的 `schedule_create`、`schedule_list`、`schedule_update` 与 `schedule_delete`)与 `ui-schedule`(Session 提醒目录与自动化任务页面)。该 bundle 把 `time-context` 与 `schedule` 一起携带,因为提醒请求给出的是挂钟时间目标:采样瞬时正是让模型把“明天九点”这类请求转换成带偏移量的 `at` 值的依据。持久记录、投递与管理操作由 [Schedule 子系统](../../../../docs/subsystems/schedule.zh.md)负责;该 bundle 向其加入这些行的组合由 [Web bundle](../../../../packages/bundle/web-app/README.zh.md) 负责。禁用该 bundle 会恢复随发行版交付的组合,`schedule` 行不存在期间 Host 不再调度;已存储的任务记录保留在 Schedule domain 中。
|
||||
|
||||
## Alternatives considered
|
||||
|
||||
**默认发布 Schedule。** 那样每个 Web 会话都要在每个请求头中带上四个工具 schema,并在每个符合条件的步骤追加一条持久 user 消息,从不创建提醒的对话也要承担这两项成本。这种安排还让该能力在产品界面上没有关闭开关。
|
||||
|
||||
**保留一个 `--patch` overlay 文件。** overlay 是启动时的参数,而不是产品界面上的开关,因此使用随发行版 `web` profile 的人无法触及它。通过它的 `insert` 列表重新声明这些条目并不能覆盖它们:`applyEntryPatches` 追加该列表时不对 id 去重,而 Loader 会把组合出的列表按 id 收敛为一个条目、最后一个声明生效,因此该 overlay 会替换 Web Bundle 的条目,而不是给它们设值。
|
||||
|
||||
**把这三行以 `disabled: true` 留在 Web 组合中,用按 id 定位的 patch 打开。** 这样 bundle 只是给已有的行设值,但插件管理器只列出 bundle 插入的行,因此该 bundle 的页面显示不含任何组件,需要为被覆盖的行另建一条列出路径;而其他可选 bundle 都插入各自的行。某个 profile 若也声明了其中某个 id,处理方式与任何其他 bundle 相同:Loader 保留最后一份声明。
|
||||
|
||||
**把这三行锁定在 bundle 开关上。** 让插件管理器拒绝逐行开关的 bundle 清单字段,会给插件管理器增加一个只有这个 bundle 使用的概念。该 bundle 的页面像其他所有 bundle 一样为每行提供开关,由 bundle README 说明这三行只能一起工作。
|
||||
|
||||
## Consequences
|
||||
|
||||
- 默认的 `dsh web` 会话不带 Schedule 工具 schema、Session 提醒目录、自动化任务页面与逐步时钟读数。需要它们的安装可从插件管理页启用该可选 bundle,或把该包列进 profile 的 `dsh.profile.bundles`。
|
||||
- 启用后的安装会给每个活跃根 Agent 增加四个工具 schema,并在每个符合条件的步骤追加一条持久时钟消息;该读数对模型可见且持久,因此它与其他 user 消息一样参与回放、压缩,并出现在导出的 Session 日志中。
|
||||
- 插件管理页在该 bundle 下列出这三行,显示各自包的 `locale/*.json` 声明的标题、它们的状态,并在 bundle 打开时为每行提供开关;关掉其中一行会让 Schedule 缺少这一部分。
|
||||
- 未选中该 bundle 时,按 id 定位这三行之一的 profile 补丁或 `--patch` overlay 匹配不到任何条目,加载器会为它报告 `patch: entry <id> not found` 警告;选中该 bundle 即可取代按 id 打开这些行。
|
||||
- 该开关只涉及配置:`src/index.ts` 是空模块,运行时内容由 patch 承载,包本身不拥有可变的运行时状态,因此不发布不变量伴随模块。
|
||||
@@ -39,7 +39,6 @@
|
||||
"@deepseek-ai/dsh-compaction-tool-result-pruner": "workspace:*",
|
||||
"@deepseek-ai/dsh-cordis-client-runner": "workspace:*",
|
||||
"@deepseek-ai/dsh-experimental-agent-team-profile": "workspace:*",
|
||||
"@deepseek-ai/dsh-experimental-schedule-bundle": "workspace:*",
|
||||
"@deepseek-ai/dsh-fs-local": "workspace:*",
|
||||
"@deepseek-ai/dsh-goal": "workspace:*",
|
||||
"@deepseek-ai/dsh-goal-round-driver": "workspace:*",
|
||||
@@ -80,6 +79,7 @@
|
||||
"@deepseek-ai/dsh-tool-pwsh": "workspace:*",
|
||||
"@deepseek-ai/dsh-tool-pwsh-persistent": "workspace:*",
|
||||
"@deepseek-ai/dsh-tool-ralph": "workspace:*",
|
||||
"@deepseek-ai/dsh-tool-schedule": "workspace:*",
|
||||
"@deepseek-ai/dsh-tool-skill": "workspace:*",
|
||||
"@deepseek-ai/dsh-tool-str-replace-editor": "workspace:*",
|
||||
"@deepseek-ai/dsh-tool-subagent": "workspace:*",
|
||||
|
||||
@@ -3,14 +3,10 @@
|
||||
import { randomUUID } from 'node:crypto'
|
||||
import { mkdir, readFile, writeFile } from 'node:fs/promises'
|
||||
import { join } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import type { DailyScheduleRecord, ScheduleCatalogEntry } from '@deepseek-ai/dsh-schedule'
|
||||
import { expect, it } from 'vitest'
|
||||
import { withDefaultWeb, webGet, webRequest } from './default-web-process.ts'
|
||||
|
||||
/** The optional Schedule bundle is the switch this built-Web scenario turns on. */
|
||||
const patches = [fileURLToPath(new URL('../../../../../../packages/experimental/schedule-bundle/cordis.patch.yml', import.meta.url))]
|
||||
|
||||
const id = 'retained-remote-task' as DailyScheduleRecord['id']
|
||||
const sessionId = 'unloaded-owner' as ScheduleCatalogEntry['sessionId']
|
||||
const record: DailyScheduleRecord = {
|
||||
@@ -86,7 +82,7 @@ it('edits a retained task through built Remote bindings and preserves its identi
|
||||
expect(await rpc('schedule/update', { request: { sessionId: 'other-owner', id, expected: updated, change } }))
|
||||
.toEqual({ ok: true, value: { id, updated: false, code: 'schedule_not_found' } })
|
||||
expect(await readFile(taskPath(root), 'utf8')).toBe(persisted)
|
||||
}, { patches, prepare: root => seed(root, persisted) })
|
||||
}, { prepare: root => seed(root, persisted) })
|
||||
|
||||
await withDefaultWeb(test, async ({ root, url }) => {
|
||||
const rpc = await connect(url, test.signal)
|
||||
@@ -96,7 +92,7 @@ it('edits a retained task through built Remote bindings and preserves its identi
|
||||
sessionId, id, expected: updated, change: { kind: 'daily', daily: { time: updated.time, time_zone: 'Etc/UTC' } },
|
||||
} })).toEqual({ ok: true, value: { id, updated: false, record: updated } })
|
||||
expect(await readFile(taskPath(root), 'utf8')).toBe(persisted)
|
||||
}, { patches, prepare: root => seed(root, persisted) })
|
||||
}, { prepare: root => seed(root, persisted) })
|
||||
})
|
||||
|
||||
it('creates and idempotently adopts the explicit Session id bound to seeded task data without touching its task file', async (test) => {
|
||||
@@ -118,5 +114,5 @@ it('creates and idempotently adopts the explicit Session id bound to seeded task
|
||||
expect(await rpc('schedule/list', { request: { sessionId } })).toEqual(expectedList)
|
||||
expect(await rpc('schedule/history', { request: { sessionId, id, limit: 20 } })).toEqual(expectedHistory)
|
||||
expect(await readFile(taskPath(root), 'utf8')).toBe(persisted)
|
||||
}, { patches, prepare: root => seed(root, persisted) })
|
||||
}, { prepare: root => seed(root, persisted) })
|
||||
})
|
||||
@@ -8,7 +8,7 @@ import { withDefaultWeb, webGet } from './default-web-process.ts'
|
||||
|
||||
const experimentalName = '@deepseek-ai/dsh-experimental-client-ui-agent-team'
|
||||
|
||||
it('boots default Web without experimental modules, scheduling, time context, or an active built-in Browser', async (test) => {
|
||||
it('boots default Web with the shipped Schedule rows, without experimental modules, time context, or an active built-in Browser', async (test) => {
|
||||
await withDefaultWeb(test, async ({ url, request }) => {
|
||||
const auth = await webGet(url, test.signal)
|
||||
const cookie = auth.headers['set-cookie']?.[0]?.split(';', 1)[0]
|
||||
@@ -33,11 +33,15 @@ it('boots default Web without experimental modules, scheduling, time context, or
|
||||
expect(browser).toBeDefined()
|
||||
expect(browser!.state).toBeUndefined()
|
||||
expect(delivered.entries.some(entry => entry.id === '@deepseek-ai/dsh-client-ui-sidebar-browser')).toBe(false)
|
||||
// The optional Schedule bundle inserts these rows; the shipped composition carries none of them.
|
||||
for (const name of ['@deepseek-ai/dsh-time-context', '@deepseek-ai/dsh-schedule', '@deepseek-ai/dsh-client-ui-schedule']) {
|
||||
expect(roster.entries.some(entry => entry.name === name), name).toBe(false)
|
||||
expect(delivered.entries.some(entry => entry.id === name), name).toBe(false)
|
||||
}
|
||||
// The shipped composition mounts the Host Schedule service and its task
|
||||
// page; the clock stays preset-level, so neither plane carries a row for it.
|
||||
expect(roster.entries).toEqual(expect.arrayContaining([
|
||||
expect.objectContaining({ name: '@deepseek-ai/dsh-schedule', state: FiberState.ACTIVE }),
|
||||
expect.objectContaining({ name: '@deepseek-ai/dsh-client-ui-schedule', state: FiberState.ACTIVE }),
|
||||
]))
|
||||
expect(delivered.entries.some(entry => entry.id === '@deepseek-ai/dsh-client-ui-schedule')).toBe(true)
|
||||
expect(roster.entries.some(entry => entry.name === '@deepseek-ai/dsh-time-context')).toBe(false)
|
||||
expect(delivered.entries.some(entry => entry.id === '@deepseek-ai/dsh-time-context')).toBe(false)
|
||||
expect(experimentalRuntimeReferences(roster)).toEqual([])
|
||||
|
||||
const contaminated = await request('mount-experimental')
|
||||
|
||||
@@ -264,6 +264,7 @@ describe('the shipped Web composition', () => {
|
||||
expect(toolNames(ctx, handle.agent).filter(name => name !== 'glob' && name !== 'grep')).toEqual([
|
||||
'ask_user_question', 'bash', 'create_goal', 'edit', 'exit_plan_mode',
|
||||
'get_goal', 'interrupt_agent', 'job_kill', 'job_list', 'job_output', 'list_agents', 'present', 'read', 'read_image',
|
||||
'schedule_create', 'schedule_delete', 'schedule_list', 'schedule_update',
|
||||
'send_message', 'skill',
|
||||
'subagent', 'subagent_fork', 'todo_write', 'update_goal', 'web_fetch', 'web_search',
|
||||
'workflow', 'write',
|
||||
|
||||
@@ -223,10 +223,8 @@ export function createAssembledRemote(options: AssembledRemoteOptions = {}): Ass
|
||||
return ok(undefined)
|
||||
})
|
||||
mock.unary('session/list', () => ok({ items: structuredClone(sessions) }))
|
||||
// The shipped bundle layers this graph composes carry the `ui-schedule` row
|
||||
// disabled, so the Schedule client does not mount and no case here reads the
|
||||
// catalog or the per-Session list. Both stay declared so an enabled
|
||||
// composition reads empty lists instead of a missing-rule failure.
|
||||
// The shipped composition mounts the `ui-schedule` row, so the Schedule
|
||||
// client reads the catalog and the per-Session list over this mock.
|
||||
mock.unary('schedule/catalog', () => ok([]))
|
||||
mock.unary('schedule/list', () => ok([]))
|
||||
mock.unary('session/projections', (request: unknown) => {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
- button "添加插件"
|
||||
- button "选择添加插件方式"
|
||||
- heading "官方" [level=3]
|
||||
- text: "8"
|
||||
- text: "7"
|
||||
- list:
|
||||
- listitem:
|
||||
- button "查看 智能体团队": 智能体团队
|
||||
@@ -16,10 +16,6 @@
|
||||
- button "查看 自动授权审查": 自动授权审查
|
||||
- text: 实验性 提供自动审查权限模式,由模型在每次工具调用前判断是否授权。
|
||||
- switch "启用 自动授权审查"
|
||||
- listitem:
|
||||
- button "查看 自动化任务": 自动化任务
|
||||
- text: 实验性 按设定的时间或周期,在会话中自动执行任务。
|
||||
- switch "启用 自动化任务"
|
||||
- listitem:
|
||||
- button "查看 语音输入": 语音输入
|
||||
- text: 实验性 在本机使用 SenseVoice 转写录音,首次使用需安装依赖。
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
- button "添加插件"
|
||||
- button "选择添加插件方式"
|
||||
- heading "官方" [level=3]
|
||||
- text: "8"
|
||||
- text: "7"
|
||||
- list:
|
||||
- listitem:
|
||||
- button "查看 智能体团队": 智能体团队
|
||||
@@ -16,10 +16,6 @@
|
||||
- button "查看 自动授权审查": 自动授权审查
|
||||
- text: 实验性 提供自动审查权限模式,由模型在每次工具调用前判断是否授权。
|
||||
- switch "启用 自动授权审查"
|
||||
- listitem:
|
||||
- button "查看 自动化任务": 自动化任务
|
||||
- text: 实验性 按设定的时间或周期,在会话中自动执行任务。
|
||||
- switch "启用 自动化任务"
|
||||
- listitem:
|
||||
- button "查看 语音输入": 语音输入
|
||||
- text: 实验性 在本机使用 SenseVoice 转写录音,首次使用需安装依赖。
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
- button "选择添加插件方式" [disabled]
|
||||
- status "正在读取插件…"
|
||||
|
||||
1680px: 4 rows; page/group headers, rows, icons, text lines and blank action spaces align within 0.1px
|
||||
1000px: 4 rows; page/group headers, rows, icons, text lines and blank action spaces align within 0.1px
|
||||
1680px: 3 rows; page/group headers, rows, icons, text lines and blank action spaces align within 0.1px
|
||||
1000px: 3 rows; page/group headers, rows, icons, text lines and blank action spaces align within 0.1px
|
||||
Loading: header actions disabled; action spaces are empty 36×20 areas, with no switch placeholders
|
||||
Loaded: skeleton removed; header actions enabled
|
||||
Motion: 13 opacity-only pulses, 2000ms; reduced motion stops all pulses
|
||||
@@ -6,7 +6,7 @@
|
||||
- button "添加插件"
|
||||
- button "选择添加插件方式"
|
||||
- heading "官方" [level=3]
|
||||
- text: "8"
|
||||
- text: "7"
|
||||
- list:
|
||||
- listitem:
|
||||
- button "查看 智能体团队": 智能体团队
|
||||
@@ -16,10 +16,6 @@
|
||||
- button "查看 自动授权审查": 自动授权审查
|
||||
- text: 实验性 提供自动审查权限模式,由模型在每次工具调用前判断是否授权。
|
||||
- switch "启用 自动授权审查"
|
||||
- listitem:
|
||||
- button "查看 自动化任务": 自动化任务
|
||||
- text: 实验性 按设定的时间或周期,在会话中自动执行任务。
|
||||
- switch "启用 自动化任务"
|
||||
- listitem:
|
||||
- button "查看 语音输入": 语音输入
|
||||
- text: 实验性 在本机使用 SenseVoice 转写录音,首次使用需安装依赖。
|
||||
|
||||
@@ -6,7 +6,7 @@ Focus at 500ms:
|
||||
- tooltip "刷新"
|
||||
failure: pending
|
||||
- button "刷新" [disabled]
|
||||
{"busy":"true","spinners":1,"cards":11,"skeletons":0,"alerts":[],"retry":0,"toasts":[]}
|
||||
{"busy":"true","spinners":1,"cards":10,"skeletons":0,"alerts":[],"retry":0,"toasts":[]}
|
||||
failure: settled
|
||||
- button "刷新"
|
||||
{"busy":"false","spinners":0,"cards":11,"skeletons":0,"alerts":[],"retry":0,"toasts":["刷新失败,请重试"]}
|
||||
{"busy":"false","spinners":0,"cards":10,"skeletons":0,"alerts":[],"retry":0,"toasts":["刷新失败,请重试"]}
|
||||
@@ -1,6 +0,0 @@
|
||||
# Browser-zone assertions need a fresh reading after the non-browser preparation turn.
|
||||
# The Schedule rows stay disabled in the shipped composition; the scenario enables them
|
||||
# with the shipped `@deepseek-ai/dsh-experimental-schedule-bundle` patch.
|
||||
- id: time-context
|
||||
config:
|
||||
refreshIntervalMs: 0
|
||||
@@ -131,7 +131,7 @@ describe('web e2e: plugin manager', () => {
|
||||
if (aria === '') aria = loadingAria
|
||||
else expect(loadingAria).toBe(aria)
|
||||
|
||||
const measure = (group: Locator) => group.evaluate((element) => {
|
||||
const measure = (group: Locator, rowSelector = ':scope > ul > li') => group.evaluate((element, selector) => {
|
||||
const rect = (node: Element | null | undefined) => {
|
||||
if (node === null || node === undefined) throw new Error('Missing plugin layout element')
|
||||
const { x, y, width, height } = node.getBoundingClientRect()
|
||||
@@ -140,7 +140,7 @@ describe('web e2e: plugin manager', () => {
|
||||
return {
|
||||
pageHeader: rect(element.closest('[data-plugin-panel]')?.querySelector(':scope > header')),
|
||||
groupHeader: rect(element.firstElementChild),
|
||||
rows: Array.from(element.querySelectorAll(':scope > ul > li')).slice(0, 4).map((row) => {
|
||||
rows: Array.from(element.querySelectorAll(selector)).slice(0, 4).map((row) => {
|
||||
const head = row.firstElementChild
|
||||
const main = head?.children[1]
|
||||
return {
|
||||
@@ -150,7 +150,7 @@ describe('web e2e: plugin manager', () => {
|
||||
}
|
||||
}),
|
||||
}
|
||||
})
|
||||
}, rowSelector)
|
||||
const loading = await measure(skeleton)
|
||||
const blankActions = await skeleton.locator(':scope > ul > li > div > div:last-child').evaluateAll(nodes => nodes.map(node => ({
|
||||
children: node.childElementCount,
|
||||
@@ -184,8 +184,11 @@ describe('web e2e: plugin manager', () => {
|
||||
for (const action of await actions.all()) expect(await action.isDisabled()).toBe(false)
|
||||
const official = panel.locator('[data-plugin-group="official"]')
|
||||
await official.locator('[data-plugin-package]').first().waitFor()
|
||||
const loaded = await measure(official)
|
||||
expect(loaded.rows).toHaveLength(4)
|
||||
// The Official group lists the shipped bundles and then the
|
||||
// configuration-only items; an item card carries no action cell, so the
|
||||
// placeholder rows model the bundle cards alone.
|
||||
const loaded = await measure(official, ':scope > ul > li[data-plugin-package]')
|
||||
expect(loaded.rows).toHaveLength(OPTIONAL_BUNDLES.length)
|
||||
const compare = (name: string, a: typeof loading.pageHeader, b: typeof loaded.pageHeader, axes: readonly (keyof typeof a)[] = ['x', 'y', 'width', 'height']) => {
|
||||
for (const axis of axes) {
|
||||
expect(Math.abs(a[axis] - b[axis]), `${width}px ${name}.${axis}: loading=${a[axis]}, loaded=${b[axis]}`).toBeLessThanOrEqual(0.1)
|
||||
@@ -194,12 +197,13 @@ describe('web e2e: plugin manager', () => {
|
||||
compare('pageHeader', loading.pageHeader, loaded.pageHeader)
|
||||
compare('groupHeader', loading.groupHeader, loaded.groupHeader)
|
||||
for (const [index, row] of loading.rows.entries()) {
|
||||
const real = loaded.rows[index]!
|
||||
const real = loaded.rows[index]
|
||||
if (real === undefined) break
|
||||
for (const part of ['row', 'head', 'icon', 'main', 'titleRow', 'actions'] as const) compare(`row ${index + 1} ${part}`, row[part], real[part])
|
||||
// Painted text bars are deliberately shorter than real copy; their line origins and heights align.
|
||||
for (const part of ['title', 'description'] as const) compare(`row ${index + 1} ${part}`, row[part], real[part], ['x', 'y', 'height'])
|
||||
}
|
||||
facts.push(`${width}px: 4 rows; page/group headers, rows, icons, text lines and blank action spaces align within 0.1px`)
|
||||
facts.push(`${width}px: ${loaded.rows.length} rows; page/group headers, rows, icons, text lines and blank action spaces align within 0.1px`)
|
||||
expect(consoleWatch.pageErrors).toEqual([])
|
||||
} finally {
|
||||
release.resolve(undefined)
|
||||
@@ -588,8 +592,8 @@ describe('web e2e: plugin manager', () => {
|
||||
await panel.getByRole('button', { name: 'Back to plugins' }).click()
|
||||
await panel.getByRole('button', { name: 'View Agent Teams', exact: true }).waitFor()
|
||||
expect(await panel.getByRole('switch', { name: 'Enable Agent Teams', exact: true }).count()).toBe(1)
|
||||
await panel.getByRole('button', { name: 'View Automation tasks', exact: true }).waitFor()
|
||||
expect(await panel.getByText('Run tasks in your sessions at a set time or on a repeating schedule.', { exact: true }).count()).toBe(1)
|
||||
// Schedule ships in the delivered composition, so no bundle card carries it in either language.
|
||||
expect(await panel.getByRole('button', { name: 'View Automation tasks', exact: true }).count()).toBe(0)
|
||||
// The official configuration pages follow the language too, from their own dictionary.
|
||||
for (const title of ['Shell', 'Agent loop', 'Subagent', 'Web search']) {
|
||||
await panel.getByRole('button', { name: `View ${title}`, exact: true }).waitFor()
|
||||
@@ -663,34 +667,18 @@ describe('web e2e: plugin manager', () => {
|
||||
expect(tripwire.pageErrors).toEqual([])
|
||||
}, 60_000)
|
||||
|
||||
it('lists the Automation tasks rows and mounts them with the bundle switch', async () => {
|
||||
it('mounts the delivered Automation tasks rows without a bundle switch', async () => {
|
||||
onTestFailed(() => saveFailureShot(page, 'web-e2e-plugin-manager-schedule'))
|
||||
const panel = await openPluginsPanel()
|
||||
const scheduleRows = () => [...scaffold.ctx.loader.entries()]
|
||||
.filter(entry => ['time-context', 'schedule', 'ui-schedule'].includes(entry.options.id))
|
||||
const running = () => scheduleRows().filter(entry => entry.fiber?.state === FiberState.ACTIVE).length
|
||||
expect(running()).toBe(0)
|
||||
await panel.getByRole('button', { name: '查看 自动化任务', exact: true }).click()
|
||||
const rows = panel.locator('[data-plugin-rows]')
|
||||
for (const title of ['时间感知', '任务调度', '任务界面']) {
|
||||
await rows.locator('[data-plugin-row]', { hasText: title }).waitFor()
|
||||
}
|
||||
// A bundle that is off offers no row switches.
|
||||
expect(await rows.getByRole('switch').count()).toBe(0)
|
||||
const toggle = panel.getByRole('switch', { name: '启用 自动化任务', exact: true })
|
||||
await toggle.click()
|
||||
try {
|
||||
await expect.poll(running, { timeout: 20_000 }).toBe(3)
|
||||
await expect.poll(() => rows.locator('[data-plugin-row]', { hasText: '运行中' }).count(), { timeout: 20_000 }).toBe(3)
|
||||
for (const title of ['时间感知', '任务调度', '任务界面']) {
|
||||
await rows.getByRole('switch', { name: `启用组件 ${title}`, exact: true }).waitFor()
|
||||
}
|
||||
await page.getByRole('navigation', { name: '全局面板' }).getByRole('button', { name: '自动化任务', exact: true }).waitFor()
|
||||
} finally {
|
||||
if (await toggle.getAttribute('aria-checked') === 'true') await toggle.click()
|
||||
await expect.poll(running, { timeout: 20_000 }).toBe(0)
|
||||
await panel.getByRole('button', { name: '返回插件列表' }).click()
|
||||
}
|
||||
.filter(entry => ['schedule', 'ui-schedule'].includes(entry.options.id))
|
||||
// The delivered Web composition ships both rows enabled, so no bundle card
|
||||
// offers a switch for them.
|
||||
expect(scheduleRows()).toHaveLength(2)
|
||||
expect(scheduleRows().every(entry => entry.fiber?.state === FiberState.ACTIVE)).toBe(true)
|
||||
expect(await panel.getByRole('button', { name: '查看 自动化任务', exact: true }).count()).toBe(0)
|
||||
expect(await panel.getByRole('switch', { name: '启用 自动化任务', exact: true }).count()).toBe(0)
|
||||
await page.getByRole('navigation', { name: '全局面板' }).getByRole('button', { name: '自动化任务', exact: true }).waitFor()
|
||||
expect(tripwire.pageErrors).toEqual([])
|
||||
}, 60_000)
|
||||
|
||||
|
||||
@@ -437,10 +437,12 @@ async function bootPreview(origin: string, browser: Browser): Promise<void> {
|
||||
const sessions = page.getByRole('tree', { name: 'Sessions' })
|
||||
const showcase = sessions.getByRole('treeitem').filter({ hasText: SHOWCASE_TITLE })
|
||||
await expect.poll(() => showcase.count(), { timeout: 15_000 }).toBe(1)
|
||||
expect(await showcase.locator('[data-session-schedule-mark]').count()).toBe(0)
|
||||
// The packed deployment ships the Schedule rows, and the preview storage
|
||||
// seeds the showcase Session with active tasks.
|
||||
expect(await showcase.locator('[data-session-schedule-mark]').count()).toBe(1)
|
||||
await showcase.click()
|
||||
await page.getByText(SHOWCASE_TAIL, { exact: true }).waitFor({ timeout: 30_000 })
|
||||
expect(await page.locator('[data-schedule-reminder-entry]').count()).toBe(0)
|
||||
expect(await page.locator('[data-schedule-reminder-entry]').count()).toBe(1)
|
||||
|
||||
expect(await page.getByText(SHOWCASE_OLDEST, { exact: true }).count()).toBe(0)
|
||||
// Complete Turns can fold while earlier history is still unloaded.
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
/** Keyless assembled-Web evidence for conversational Schedule delivery. */
|
||||
|
||||
import { mkdir, readFile, writeFile } from 'node:fs/promises'
|
||||
import { mkdir, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises'
|
||||
import { join } from 'node:path'
|
||||
import { readFileSync } from 'node:fs'
|
||||
import { tmpdir } from 'node:os'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import type { Browser, Page } from 'playwright'
|
||||
import { chromium } from 'playwright'
|
||||
import { dump } from 'js-yaml'
|
||||
import { afterAll, beforeAll, describe, expect, it, onTestFailed } from 'vitest'
|
||||
import type { Agent, AgentHandle } from '@deepseek-ai/dsh-agent'
|
||||
import { entryListSchema } from '@deepseek-ai/cordis-plugin-include'
|
||||
import { bundlePatchPaths, composeEntries, loadOverlayPatches } from '@deepseek-ai/dsh-app-boot'
|
||||
import { MessageId, ToolCallId, createUserMessage, LlmAdapter } from '@deepseek-ai/dsh-llm'
|
||||
import { appendDelivery } from '../../../packages/schedule/schedule/src/delivery-history.ts'
|
||||
@@ -44,9 +47,6 @@ declare module '@deepseek-ai/dsh-llm' {
|
||||
}
|
||||
|
||||
const MODE = webSnapshotMode()
|
||||
/** The optional Schedule bundle is the switch these scenarios turn on. */
|
||||
const SCHEDULE_BUNDLE = fileURLToPath(new URL('../../../packages/experimental/schedule-bundle/cordis.patch.yml', import.meta.url))
|
||||
const TIME_CONTEXT_EVERY_STEP = fileURLToPath(new URL('./fixtures/time-context-every-step.patch.yml', import.meta.url))
|
||||
const SNAPSHOT_DIR = fileURLToPath(new URL('./expected/schedule-after', import.meta.url))
|
||||
const AFTER_EXPECTED = join(SNAPSHOT_DIR, 'conversation.expected.md')
|
||||
const AT_EXPECTED = join(SNAPSHOT_DIR, 'at-conversation.expected.md')
|
||||
@@ -73,6 +73,35 @@ const CATALOG_EXPECTED = join(CATALOG_SNAPSHOT_DIR, 'catalog.expected.md')
|
||||
const BASE_PATCH = fileURLToPath(new URL('../../../packages/bundle/base/cordis.patch.yml', import.meta.url))
|
||||
const WEB_BUNDLE = fileURLToPath(new URL('../../../packages/bundle/web-app/', import.meta.url))
|
||||
const WEB_PATCHES = bundlePatchPaths(WEB_BUNDLE, (JSON.parse(readFileSync(join(WEB_BUNDLE, 'package.json'), 'utf8')) as { dsh: { bundle: { patch: string[] } } }).dsh.bundle)
|
||||
|
||||
/**
|
||||
* Write the overlay that makes every step carry a fresh clock reading.
|
||||
*
|
||||
* The shipped Web composition carries no `time-context` row and the `standard`
|
||||
* preset owns the clock, so an overlay naming a Host row reaches nothing. The
|
||||
* overlay therefore restates the shipped `preset-standard` row with its
|
||||
* `time-context` plugin configured to re-read on every step.
|
||||
* @param dir - Directory that receives the overlay file.
|
||||
* @returns Absolute path of the written overlay.
|
||||
*/
|
||||
async function writeEveryStepOverlay(dir: string): Promise<string> {
|
||||
const layers = [
|
||||
loadOverlayPatches('Schedule Web every-step overlay', BASE_PATCH),
|
||||
...WEB_PATCHES.map(file => loadOverlayPatches('Schedule Web every-step overlay', file)),
|
||||
]
|
||||
const row = composeEntries(layers).find(entry => entry.id === 'preset-standard')
|
||||
if (row === undefined) throw new Error('the shipped Web surface declares no preset-standard row')
|
||||
const config = row.config as { plugins: Array<{ id?: string; config?: unknown }> }
|
||||
const plugins = config.plugins.map(plugin => plugin.id === 'time-context'
|
||||
? { ...plugin, config: { refreshIntervalMs: 0 } }
|
||||
: plugin)
|
||||
const path = join(dir, 'time-context-every-step.patch.yml')
|
||||
await writeFile(path, dump([
|
||||
{ id: 'preset-standard', config: { ...config, plugins } },
|
||||
], { schema: entryListSchema, noRefs: true, lineWidth: -1 }))
|
||||
return path
|
||||
}
|
||||
|
||||
const CATALOG_NOW = Date.parse('2099-08-25T12:00:00.000Z')
|
||||
const CATALOG_SESSION_ID = SessionId('schedule-catalog-web-e2e')
|
||||
const CATALOG_TITLE = 'Active schedule catalog'
|
||||
@@ -269,13 +298,16 @@ describe.skipIf(MODE === 'record')('web e2e: conversational reminders', () => {
|
||||
let everyAssistantReply: SessionEvent<'assistant/message'> | undefined
|
||||
let everyRecords: readonly [EveryScheduleRecord, EveryScheduleRecord]
|
||||
let tripwire: ReturnType<typeof watchConsole>
|
||||
let overlayRoot: string | undefined
|
||||
const afterAdapter = new ReminderAdapter()
|
||||
const atAdapter = new BrowserZoneAtAdapter()
|
||||
const everyAdapter = new EveryReminderAdapter()
|
||||
|
||||
beforeAll(async () => {
|
||||
const root = await mkdtemp(join(tmpdir(), 'dsh-schedule-every-step-'))
|
||||
overlayRoot = root
|
||||
scaffold = await launchWebScaffold({
|
||||
extraOverlayPath: [SCHEDULE_BUNDLE, TIME_CONTEXT_EVERY_STEP],
|
||||
extraOverlayPath: [await writeEveryStepOverlay(root)],
|
||||
})
|
||||
scaffold.ctx.effect(
|
||||
() => scaffold.ctx.llm.registerAdapter([AFTER_PROVIDER], afterAdapter),
|
||||
@@ -312,6 +344,9 @@ describe.skipIf(MODE === 'record')('web e2e: conversational reminders', () => {
|
||||
sessionId: SessionId('schedule-after-web-e2e'),
|
||||
meta: { cwd },
|
||||
agentOptions: { provider: AFTER_PROVIDER, model: MODEL },
|
||||
// The reminder tools are preset-level Consumers, so a directly created Agent
|
||||
// needs the default preset the product mounts.
|
||||
setup: agentCtx => scaffold.ctx.agentPresets.mount(agentCtx).then(() => undefined),
|
||||
})
|
||||
afterHandle.agent.session.append('session/title', {
|
||||
title: 'Scheduled After follow-up',
|
||||
@@ -349,6 +384,9 @@ describe.skipIf(MODE === 'record')('web e2e: conversational reminders', () => {
|
||||
sessionId: SessionId('schedule-every-web-e2e'),
|
||||
meta: { cwd },
|
||||
agentOptions: { provider: EVERY_PROVIDER, model: MODEL },
|
||||
// The reminder tools are preset-level Consumers, so a directly created Agent
|
||||
// needs the default preset the product mounts.
|
||||
setup: agentCtx => scaffold.ctx.agentPresets.mount(agentCtx).then(() => undefined),
|
||||
})
|
||||
everyHandle.agent.session.append('session/title', {
|
||||
title: 'Fixed-rate reminder batch',
|
||||
@@ -398,6 +436,9 @@ describe.skipIf(MODE === 'record')('web e2e: conversational reminders', () => {
|
||||
sessionId: SessionId('schedule-at-web-e2e'),
|
||||
meta: { cwd },
|
||||
agentOptions: { provider: AT_PROVIDER, model: MODEL },
|
||||
// The reminder tools are preset-level Consumers, so a directly created Agent
|
||||
// needs the default preset the product mounts.
|
||||
setup: agentCtx => scaffold.ctx.agentPresets.mount(agentCtx).then(() => undefined),
|
||||
})
|
||||
atHandle.agent.session.append('session/title', {
|
||||
title: 'Explicit local-time reminder',
|
||||
@@ -445,6 +486,9 @@ describe.skipIf(MODE === 'record')('web e2e: conversational reminders', () => {
|
||||
await everyHandle?.dispose().catch((error: unknown) => failures.push(error))
|
||||
await afterHandle?.dispose().catch((error: unknown) => failures.push(error))
|
||||
await scaffold?.close().catch((error: unknown) => failures.push(error))
|
||||
if (overlayRoot !== undefined) {
|
||||
await rm(overlayRoot, { recursive: true, force: true }).catch((error: unknown) => failures.push(error))
|
||||
}
|
||||
if (failures.length === 1) throw failures[0]
|
||||
if (failures.length > 1) throw new AggregateError(failures, 'Schedule Web evidence teardown failed')
|
||||
})
|
||||
@@ -712,11 +756,14 @@ describe.skipIf(MODE === 'record')('web e2e: active Schedule catalog', () => {
|
||||
let browser: Browser
|
||||
let page: Page
|
||||
let tripwire: ReturnType<typeof watchConsole>
|
||||
let overlayRoot: string | undefined
|
||||
|
||||
beforeAll(async () => {
|
||||
const fixture = await readFile(CATALOG_FIXTURE, 'utf8')
|
||||
const root = await mkdtemp(join(tmpdir(), 'dsh-schedule-catalog-'))
|
||||
overlayRoot = root
|
||||
scaffold = await launchWebScaffold({
|
||||
extraOverlayPath: [SCHEDULE_BUNDLE, TIME_CONTEXT_EVERY_STEP],
|
||||
extraOverlayPath: [await writeEveryStepOverlay(root)],
|
||||
})
|
||||
await seedSession(scaffold, fixture, CATALOG_SESSION_ID, 'standard')
|
||||
const records = foldScheduleEvents(fixture.trim().split('\n').slice(1).map(line => JSON.parse(line) as SessionEvent)).active
|
||||
@@ -757,6 +804,9 @@ describe.skipIf(MODE === 'record')('web e2e: active Schedule catalog', () => {
|
||||
const failures: unknown[] = []
|
||||
await browser?.close().catch((error: unknown) => failures.push(error))
|
||||
await scaffold?.close().catch((error: unknown) => failures.push(error))
|
||||
if (overlayRoot !== undefined) {
|
||||
await rm(overlayRoot, { recursive: true, force: true }).catch((error: unknown) => failures.push(error))
|
||||
}
|
||||
if (failures.length === 1) throw failures[0]
|
||||
if (failures.length > 1) throw new AggregateError(failures, 'Schedule catalog teardown failed')
|
||||
})
|
||||
@@ -847,16 +897,37 @@ describe.skipIf(MODE === 'record')('web e2e: active Schedule catalog', () => {
|
||||
...WEB_PATCHES.map(file => loadOverlayPatches('Schedule catalog shipped roster', file)),
|
||||
]
|
||||
const shipped = composeEntries(layers)
|
||||
const withBundle = composeEntries([...layers, loadOverlayPatches('Schedule catalog bundle', SCHEDULE_BUNDLE)])
|
||||
// The delivered composition carries the Schedule service and its task page;
|
||||
// the clock stays preset-level, so no Host row declares it.
|
||||
for (const row of [
|
||||
{ id: 'time-context', name: '@deepseek-ai/dsh-time-context' },
|
||||
{ id: 'schedule', name: '@deepseek-ai/dsh-schedule' },
|
||||
{ id: 'ui-schedule', name: '@deepseek-ai/dsh-client-ui-schedule' },
|
||||
]) {
|
||||
// The shipped Web composition carries none of the rows; the bundle inserts each once, switched on.
|
||||
expect(shipped.some(entry => entry.id === row.id)).toBe(false)
|
||||
expect(withBundle.filter(entry => entry.id === row.id && entry.name === row.name && entry.disabled !== true)).toHaveLength(1)
|
||||
expect(shipped.filter(entry => entry.id === row.id && entry.name === row.name && entry.disabled !== true))
|
||||
.toHaveLength(1)
|
||||
}
|
||||
expect(shipped.some(entry => entry.id === 'time-context')).toBe(false)
|
||||
// Each preset that offers reminders declares the clock and the tool package
|
||||
// in its own scope and ships them enabled; `minimal` declares neither.
|
||||
const presetPlugins = (id: string): Array<{ id?: string; name?: string; disabled?: boolean }> => {
|
||||
const row = shipped.find(entry => entry.id === id)
|
||||
if (row === undefined) throw new Error(`missing shipped preset row ${id}`)
|
||||
return (row.config as { plugins: Array<{ id?: string; name?: string; disabled?: boolean }> }).plugins
|
||||
}
|
||||
for (const id of ['preset-standard', 'preset-ptc', 'preset-cordis']) {
|
||||
const plugins = presetPlugins(id)
|
||||
expect(plugins.filter(row => row.id === 'time-context'
|
||||
&& row.name === '@deepseek-ai/dsh-time-context')).toHaveLength(1)
|
||||
expect(plugins.filter(row => row.id === 'tool-schedule'
|
||||
&& row.name === '@deepseek-ai/dsh-tool-schedule')).toHaveLength(1)
|
||||
for (const name of ['@deepseek-ai/dsh-time-context', '@deepseek-ai/dsh-tool-schedule']) {
|
||||
const matches = plugins.filter(row => row.name === name)
|
||||
expect(matches).toHaveLength(1)
|
||||
expect(matches[0]?.disabled).not.toBe(true)
|
||||
}
|
||||
}
|
||||
expect(presetPlugins('preset-minimal').some(row => row.name === '@deepseek-ai/dsh-time-context'
|
||||
|| row.name === '@deepseek-ai/dsh-tool-schedule')).toBe(false)
|
||||
|
||||
await page.getByRole('button', { name: 'Automation tasks', exact: true }).click()
|
||||
const manager = page.getByTestId('task-manager-page')
|
||||
|
||||
@@ -489,6 +489,10 @@ const EXPECTED_TOOLS = [
|
||||
'present',
|
||||
'read',
|
||||
'read_image',
|
||||
'schedule_create',
|
||||
'schedule_delete',
|
||||
'schedule_list',
|
||||
'schedule_update',
|
||||
'send_message',
|
||||
'skill',
|
||||
'subagent',
|
||||
|
||||
@@ -2492,8 +2492,8 @@ export interface Config {
|
||||
|
||||
## `@deepseek-ai/dsh-schedule`
|
||||
|
||||
- `inject`: `agents` · `sessions` · `tools` · `storageDomain` · `sessionController` · `sessionPersistence`
|
||||
- `source`: [`packages/schedule/schedule/src/index.ts:73`](../packages/schedule/schedule/src/index.ts)
|
||||
- `inject`: `agents` · `sessions` · `storageDomain` · `sessionController` · `sessionPersistence`
|
||||
- `source`: [`packages/schedule/schedule/src/index.ts:72`](../packages/schedule/schedule/src/index.ts)
|
||||
|
||||
```ts config-catalog
|
||||
/** Configuration for the Host Schedule domain. */
|
||||
@@ -4422,6 +4422,7 @@ These load from a `cordis.yml` entry with no `config:` block; they declare no co
|
||||
| `@deepseek-ai/dsh-terminal` | — | [`packages/terminal/terminal/src/index.ts`](../packages/terminal/terminal/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-tool-call-timeout-policy` | `tools` | [`packages/guard/timeout-policy/src/index.ts`](../packages/guard/timeout-policy/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-tool-cordis` | `tools` · `cordisInspect` | [`packages/extensions/tool-cordis/src/index.ts`](../packages/extensions/tool-cordis/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-tool-schedule` | `tools` | [`packages/schedule/tool-schedule/src/index.ts`](../packages/schedule/tool-schedule/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-tool-subagent-control` | `tools` · `subagents` | [`packages/subagent/tool-subagent-control/src/index.ts`](../packages/subagent/tool-subagent-control/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-user-questions` | — | [`packages/interaction/user-questions/src/index.ts`](../packages/interaction/user-questions/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-webhook` | `agents` · `agentDefaultModel` · `agentPresets` · `permissionPresets` · `sessionTitle` · `workspaceRegistry` | [`packages/webhook/webhook/src/index.ts`](../packages/webhook/webhook/src/index.ts) |
|
||||
@@ -4477,7 +4478,6 @@ Imported as libraries by other packages; a `cordis.yml` cannot load them.
|
||||
| `@deepseek-ai/dsh-deque` | — | [`packages/util/deque/src/index.ts`](../packages/util/deque/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-experimental-agent-team-profile` | — | [`packages/experimental/agent-team-profile/src/index.ts`](../packages/experimental/agent-team-profile/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-experimental-browser-use-runtime` | — | [`packages/experimental/browser-use-runtime/src/index.ts`](../packages/experimental/browser-use-runtime/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-experimental-schedule-bundle` | — | [`packages/experimental/schedule-bundle/src/index.ts`](../packages/experimental/schedule-bundle/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-experimental-voice-input-bundle` | — | [`packages/experimental/voice-input-bundle/src/index.ts`](../packages/experimental/voice-input-bundle/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-experimental-webworker-packer` | — | [`packages/experimental/webworker-packer/src/index.ts`](../packages/experimental/webworker-packer/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-experimental-webworker-runtime` | — | [`packages/experimental/webworker-runtime/src/index.ts`](../packages/experimental/webworker-runtime/src/index.ts) |
|
||||
|
||||
@@ -2494,8 +2494,8 @@ export interface Config {
|
||||
|
||||
## `@deepseek-ai/dsh-schedule`
|
||||
|
||||
- `inject`: `agents` · `sessions` · `tools` · `storageDomain` · `sessionController` · `sessionPersistence`
|
||||
- `source`: [`packages/schedule/schedule/src/index.ts:73`](../packages/schedule/schedule/src/index.ts)
|
||||
- `inject`: `agents` · `sessions` · `storageDomain` · `sessionController` · `sessionPersistence`
|
||||
- `source`: [`packages/schedule/schedule/src/index.ts:72`](../packages/schedule/schedule/src/index.ts)
|
||||
|
||||
```ts config-catalog
|
||||
/** Configuration for the Host Schedule domain. */
|
||||
@@ -4424,6 +4424,7 @@ export interface Config {
|
||||
| `@deepseek-ai/dsh-terminal` | — | [`packages/terminal/terminal/src/index.ts`](../packages/terminal/terminal/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-tool-call-timeout-policy` | `tools` | [`packages/guard/timeout-policy/src/index.ts`](../packages/guard/timeout-policy/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-tool-cordis` | `tools` · `cordisInspect` | [`packages/extensions/tool-cordis/src/index.ts`](../packages/extensions/tool-cordis/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-tool-schedule` | `tools` | [`packages/schedule/tool-schedule/src/index.ts`](../packages/schedule/tool-schedule/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-tool-subagent-control` | `tools` · `subagents` | [`packages/subagent/tool-subagent-control/src/index.ts`](../packages/subagent/tool-subagent-control/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-user-questions` | — | [`packages/interaction/user-questions/src/index.ts`](../packages/interaction/user-questions/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-webhook` | `agents` · `agentDefaultModel` · `agentPresets` · `permissionPresets` · `sessionTitle` · `workspaceRegistry` | [`packages/webhook/webhook/src/index.ts`](../packages/webhook/webhook/src/index.ts) |
|
||||
@@ -4479,7 +4480,6 @@ export interface Config {
|
||||
| `@deepseek-ai/dsh-deque` | — | [`packages/util/deque/src/index.ts`](../packages/util/deque/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-experimental-agent-team-profile` | — | [`packages/experimental/agent-team-profile/src/index.ts`](../packages/experimental/agent-team-profile/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-experimental-browser-use-runtime` | — | [`packages/experimental/browser-use-runtime/src/index.ts`](../packages/experimental/browser-use-runtime/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-experimental-schedule-bundle` | — | [`packages/experimental/schedule-bundle/src/index.ts`](../packages/experimental/schedule-bundle/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-experimental-voice-input-bundle` | — | [`packages/experimental/voice-input-bundle/src/index.ts`](../packages/experimental/voice-input-bundle/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-experimental-webworker-packer` | — | [`packages/experimental/webworker-packer/src/index.ts`](../packages/experimental/webworker-packer/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-experimental-webworker-runtime` | — | [`packages/experimental/webworker-runtime/src/index.ts`](../packages/experimental/webworker-runtime/src/index.ts) |
|
||||
|
||||
@@ -11,8 +11,8 @@ This matrix shows which packages dispatch each harness-owned event and which pac
|
||||
| `agent-loop/config-start-failed` | `emit` | [`packages/core/agent-loop/src/index.ts:238`](../packages/core/agent-loop/src/index.ts) | [`agent-loop`](../packages/core/agent-loop) (`events.dispatch`) | - |
|
||||
| `agent-preset/selected` | `emit` | [`packages/preset/agent-preset-registry/src/types.ts:69`](../packages/preset/agent-preset-registry/src/types.ts) | [`agent-preset-registry`](../packages/preset/agent-preset-registry) (`emit`) | `remotes` |
|
||||
| `agent/assistant-stream` | `emit` | [`packages/core/agent/src/runtime-types.ts:363`](../packages/core/agent/src/runtime-types.ts) | [`agent-loop`](../packages/core/agent-loop) (`emit`) | [`headless`](../packages/bundle/headless), `session-controller` |
|
||||
| `agent/created` | `serial` | [`packages/core/agent/src/runtime-types.ts:261`](../packages/core/agent/src/runtime-types.ts) | [`agent`](../packages/core/agent) (`serial`) | `agent-team`, `browser-use-runtime`, [`file-reference-local`](../packages/context/file-reference-local), [`goal`](../packages/goal/goal), [`goal-round-driver`](../packages/goal/goal-round-driver), [`hooks-claude-code`](../packages/hooks/hooks-claude-code), [`hooks-codex`](../packages/hooks/hooks-codex), [`loader-smoke`](../packages/test-support/loader-smoke), [`schedule`](../packages/schedule/schedule), `session-controller`, `tool-agent-team`, [`tool-subagent`](../packages/subagent/tool-subagent) |
|
||||
| `agent/disposed` | `emit` | [`packages/core/agent/src/runtime-types.ts:270`](../packages/core/agent/src/runtime-types.ts) | [`agent`](../packages/core/agent) (`events.dispatch`) | [`agent-loop`](../packages/core/agent-loop), [`file-reference-local`](../packages/context/file-reference-local), [`goal-round-driver`](../packages/goal/goal-round-driver), [`schedule`](../packages/schedule/schedule), `session-controller`, [`subagent`](../packages/subagent/subagent), `tool-agent-team`, [`tool-subagent`](../packages/subagent/tool-subagent) |
|
||||
| `agent/created` | `serial` | [`packages/core/agent/src/runtime-types.ts:261`](../packages/core/agent/src/runtime-types.ts) | [`agent`](../packages/core/agent) (`serial`) | `agent-team`, `browser-use-runtime`, [`file-reference-local`](../packages/context/file-reference-local), [`goal`](../packages/goal/goal), [`goal-round-driver`](../packages/goal/goal-round-driver), [`hooks-claude-code`](../packages/hooks/hooks-claude-code), [`hooks-codex`](../packages/hooks/hooks-codex), [`loader-smoke`](../packages/test-support/loader-smoke), `session-controller`, `tool-agent-team`, [`tool-subagent`](../packages/subagent/tool-subagent) |
|
||||
| `agent/disposed` | `emit` | [`packages/core/agent/src/runtime-types.ts:270`](../packages/core/agent/src/runtime-types.ts) | [`agent`](../packages/core/agent) (`events.dispatch`) | [`agent-loop`](../packages/core/agent-loop), [`file-reference-local`](../packages/context/file-reference-local), [`goal-round-driver`](../packages/goal/goal-round-driver), `session-controller`, [`subagent`](../packages/subagent/subagent), `tool-agent-team`, [`tool-subagent`](../packages/subagent/tool-subagent) |
|
||||
| `agent/error` | `emit` | [`packages/core/agent/src/runtime-types.ts:393`](../packages/core/agent/src/runtime-types.ts) | [`agent-loop`](../packages/core/agent-loop) (`emit`) | [`acp`](../packages/acp/acp), [`deepseek-account`](../packages/credentials/deepseek-account), [`goal-round-driver`](../packages/goal/goal-round-driver), `session-controller`, [`session-telemetry`](../packages/session/session-telemetry) |
|
||||
| `agent/inbox/claimed` | `emit` | [`packages/core/agent/src/runtime-types.ts:299`](../packages/core/agent/src/runtime-types.ts) | [`agent-loop`](../packages/core/agent-loop) (`emit`) | [`acp`](../packages/acp/acp), [`goal-round-driver`](../packages/goal/goal-round-driver), [`subagent`](../packages/subagent/subagent), [`tool-jobs`](../packages/jobs/tool-jobs), [`user-questions`](../packages/interaction/user-questions) |
|
||||
| `agent/inbox/discarded` | `emit` | [`packages/core/agent/src/runtime-types.ts:307`](../packages/core/agent/src/runtime-types.ts) | [`agent-loop`](../packages/core/agent-loop) (`emit`) | [`goal-round-driver`](../packages/goal/goal-round-driver), [`subagent`](../packages/subagent/subagent), [`user-questions`](../packages/interaction/user-questions) |
|
||||
@@ -59,7 +59,7 @@ This matrix shows which packages dispatch each harness-owned event and which pac
|
||||
| `plugin-manager/changed` | `emit` | [`packages/boot/plugin-manager/src/types.ts:248`](../packages/boot/plugin-manager/src/types.ts) | [`plugin-manager`](../packages/boot/plugin-manager) (`emit`) | `remotes` |
|
||||
| `plugin-manager/install-log` | `emit` | [`packages/boot/plugin-manager/src/types.ts:254`](../packages/boot/plugin-manager/src/types.ts) | [`plugin-manager`](../packages/boot/plugin-manager) (`emit`) | `remotes` |
|
||||
| `plugin-manager/install-state` | `emit` | [`packages/boot/plugin-manager/src/types.ts:261`](../packages/boot/plugin-manager/src/types.ts) | [`plugin-manager`](../packages/boot/plugin-manager) (`emit`) | `remotes` |
|
||||
| `schedule/changed` | `emit` | [`packages/schedule/schedule/src/types.ts:471`](../packages/schedule/schedule/src/types.ts) | [`schedule`](../packages/schedule/schedule) (`emit`) | `remotes` |
|
||||
| `schedule/changed` | `emit` | [`packages/schedule/schedule/src/types.ts:478`](../packages/schedule/schedule/src/types.ts) | [`schedule`](../packages/schedule/schedule) (`emit`) | `remotes` |
|
||||
| `session-telemetry/record` | `waterfall` | [`packages/session/session-telemetry/src/index.ts:44`](../packages/session/session-telemetry/src/index.ts) | [`session-telemetry`](../packages/session/session-telemetry) (`waterfall`) | - |
|
||||
| `session/created` | `emit` | [`packages/core/session/src/index.ts:55`](../packages/core/session/src/index.ts) | [`session`](../packages/core/session) (`events.dispatch`) | [`compaction`](../packages/compaction/compaction), [`goal`](../packages/goal/goal), [`hook-protocol`](../packages/hooks/hook-protocol), [`llm-retry`](../packages/llm/llm-retry), [`permission-presets`](../packages/interaction/permission-presets), [`plan-mode`](../packages/plan/plan-mode), [`schedule`](../packages/schedule/schedule), `server`, [`session`](../packages/core/session), `session-controller`, [`session-log-deepseek`](../packages/session/session-log-deepseek), [`session-projection`](../packages/session/session-projection), [`session-projection-cache`](../packages/session/session-projection-cache), [`session-telemetry`](../packages/session/session-telemetry), [`session-title`](../packages/session/session-title), [`time-context`](../packages/context/time-context), [`tool-todo`](../packages/todo/tool-todo), [`tool-workflow`](../packages/workflow/tool-workflow), [`tools`](../packages/core/tools), [`user-approval`](../packages/interaction/user-approval) |
|
||||
| `session/disposed` | `emit` | [`packages/core/session/src/index.ts:65`](../packages/core/session/src/index.ts) | [`session`](../packages/core/session) (`events.dispatch`) | [`agent-loop`](../packages/core/agent-loop), `agent-team`, `file-upload`, `session-controller`, [`session-persistence-jsonl`](../packages/session/session-persistence-jsonl), [`session-projection-cache`](../packages/session/session-projection-cache), [`session-telemetry`](../packages/session/session-telemetry), [`session-title`](../packages/session/session-title), [`workspace-changes`](../packages/deliverables/workspace-changes) |
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
| `agent-loop/config-start-failed` | `emit` | [`packages/core/agent-loop/src/index.ts:238`](../packages/core/agent-loop/src/index.ts) | [`agent-loop`](../packages/core/agent-loop) (`events.dispatch`) | - |
|
||||
| `agent-preset/selected` | `emit` | [`packages/preset/agent-preset-registry/src/types.ts:69`](../packages/preset/agent-preset-registry/src/types.ts) | [`agent-preset-registry`](../packages/preset/agent-preset-registry) (`emit`) | `remotes` |
|
||||
| `agent/assistant-stream` | `emit` | [`packages/core/agent/src/runtime-types.ts:363`](../packages/core/agent/src/runtime-types.ts) | [`agent-loop`](../packages/core/agent-loop) (`emit`) | [`headless`](../packages/bundle/headless), `session-controller` |
|
||||
| `agent/created` | `serial` | [`packages/core/agent/src/runtime-types.ts:261`](../packages/core/agent/src/runtime-types.ts) | [`agent`](../packages/core/agent) (`serial`) | `agent-team`, `browser-use-runtime`, [`file-reference-local`](../packages/context/file-reference-local), [`goal`](../packages/goal/goal), [`goal-round-driver`](../packages/goal/goal-round-driver), [`hooks-claude-code`](../packages/hooks/hooks-claude-code), [`hooks-codex`](../packages/hooks/hooks-codex), [`loader-smoke`](../packages/test-support/loader-smoke), [`schedule`](../packages/schedule/schedule), `session-controller`, `tool-agent-team`, [`tool-subagent`](../packages/subagent/tool-subagent) |
|
||||
| `agent/disposed` | `emit` | [`packages/core/agent/src/runtime-types.ts:270`](../packages/core/agent/src/runtime-types.ts) | [`agent`](../packages/core/agent) (`events.dispatch`) | [`agent-loop`](../packages/core/agent-loop), [`file-reference-local`](../packages/context/file-reference-local), [`goal-round-driver`](../packages/goal/goal-round-driver), [`schedule`](../packages/schedule/schedule), `session-controller`, [`subagent`](../packages/subagent/subagent), `tool-agent-team`, [`tool-subagent`](../packages/subagent/tool-subagent) |
|
||||
| `agent/created` | `serial` | [`packages/core/agent/src/runtime-types.ts:261`](../packages/core/agent/src/runtime-types.ts) | [`agent`](../packages/core/agent) (`serial`) | `agent-team`, `browser-use-runtime`, [`file-reference-local`](../packages/context/file-reference-local), [`goal`](../packages/goal/goal), [`goal-round-driver`](../packages/goal/goal-round-driver), [`hooks-claude-code`](../packages/hooks/hooks-claude-code), [`hooks-codex`](../packages/hooks/hooks-codex), [`loader-smoke`](../packages/test-support/loader-smoke), `session-controller`, `tool-agent-team`, [`tool-subagent`](../packages/subagent/tool-subagent) |
|
||||
| `agent/disposed` | `emit` | [`packages/core/agent/src/runtime-types.ts:270`](../packages/core/agent/src/runtime-types.ts) | [`agent`](../packages/core/agent) (`events.dispatch`) | [`agent-loop`](../packages/core/agent-loop), [`file-reference-local`](../packages/context/file-reference-local), [`goal-round-driver`](../packages/goal/goal-round-driver), `session-controller`, [`subagent`](../packages/subagent/subagent), `tool-agent-team`, [`tool-subagent`](../packages/subagent/tool-subagent) |
|
||||
| `agent/error` | `emit` | [`packages/core/agent/src/runtime-types.ts:393`](../packages/core/agent/src/runtime-types.ts) | [`agent-loop`](../packages/core/agent-loop) (`emit`) | [`acp`](../packages/acp/acp), [`deepseek-account`](../packages/credentials/deepseek-account), [`goal-round-driver`](../packages/goal/goal-round-driver), `session-controller`, [`session-telemetry`](../packages/session/session-telemetry) |
|
||||
| `agent/inbox/claimed` | `emit` | [`packages/core/agent/src/runtime-types.ts:299`](../packages/core/agent/src/runtime-types.ts) | [`agent-loop`](../packages/core/agent-loop) (`emit`) | [`acp`](../packages/acp/acp), [`goal-round-driver`](../packages/goal/goal-round-driver), [`subagent`](../packages/subagent/subagent), [`tool-jobs`](../packages/jobs/tool-jobs), [`user-questions`](../packages/interaction/user-questions) |
|
||||
| `agent/inbox/discarded` | `emit` | [`packages/core/agent/src/runtime-types.ts:307`](../packages/core/agent/src/runtime-types.ts) | [`agent-loop`](../packages/core/agent-loop) (`emit`) | [`goal-round-driver`](../packages/goal/goal-round-driver), [`subagent`](../packages/subagent/subagent), [`user-questions`](../packages/interaction/user-questions) |
|
||||
@@ -61,7 +61,7 @@
|
||||
| `plugin-manager/changed` | `emit` | [`packages/boot/plugin-manager/src/types.ts:248`](../packages/boot/plugin-manager/src/types.ts) | [`plugin-manager`](../packages/boot/plugin-manager) (`emit`) | `remotes` |
|
||||
| `plugin-manager/install-log` | `emit` | [`packages/boot/plugin-manager/src/types.ts:254`](../packages/boot/plugin-manager/src/types.ts) | [`plugin-manager`](../packages/boot/plugin-manager) (`emit`) | `remotes` |
|
||||
| `plugin-manager/install-state` | `emit` | [`packages/boot/plugin-manager/src/types.ts:261`](../packages/boot/plugin-manager/src/types.ts) | [`plugin-manager`](../packages/boot/plugin-manager) (`emit`) | `remotes` |
|
||||
| `schedule/changed` | `emit` | [`packages/schedule/schedule/src/types.ts:471`](../packages/schedule/schedule/src/types.ts) | [`schedule`](../packages/schedule/schedule) (`emit`) | `remotes` |
|
||||
| `schedule/changed` | `emit` | [`packages/schedule/schedule/src/types.ts:478`](../packages/schedule/schedule/src/types.ts) | [`schedule`](../packages/schedule/schedule) (`emit`) | `remotes` |
|
||||
| `session-telemetry/record` | `waterfall` | [`packages/session/session-telemetry/src/index.ts:44`](../packages/session/session-telemetry/src/index.ts) | [`session-telemetry`](../packages/session/session-telemetry) (`waterfall`) | - |
|
||||
| `session/created` | `emit` | [`packages/core/session/src/index.ts:55`](../packages/core/session/src/index.ts) | [`session`](../packages/core/session) (`events.dispatch`) | [`compaction`](../packages/compaction/compaction), [`goal`](../packages/goal/goal), [`hook-protocol`](../packages/hooks/hook-protocol), [`llm-retry`](../packages/llm/llm-retry), [`permission-presets`](../packages/interaction/permission-presets), [`plan-mode`](../packages/plan/plan-mode), [`schedule`](../packages/schedule/schedule), `server`, [`session`](../packages/core/session), `session-controller`, [`session-log-deepseek`](../packages/session/session-log-deepseek), [`session-projection`](../packages/session/session-projection), [`session-projection-cache`](../packages/session/session-projection-cache), [`session-telemetry`](../packages/session/session-telemetry), [`session-title`](../packages/session/session-title), [`time-context`](../packages/context/time-context), [`tool-todo`](../packages/todo/tool-todo), [`tool-workflow`](../packages/workflow/tool-workflow), [`tools`](../packages/core/tools), [`user-approval`](../packages/interaction/user-approval) |
|
||||
| `session/disposed` | `emit` | [`packages/core/session/src/index.ts:65`](../packages/core/session/src/index.ts) | [`session`](../packages/core/session) (`events.dispatch`) | [`agent-loop`](../packages/core/agent-loop), `agent-team`, `file-upload`, `session-controller`, [`session-persistence-jsonl`](../packages/session/session-persistence-jsonl), [`session-projection-cache`](../packages/session/session-projection-cache), [`session-telemetry`](../packages/session/session-telemetry), [`session-title`](../packages/session/session-title), [`workspace-changes`](../packages/deliverables/workspace-changes) |
|
||||
|
||||
@@ -260,7 +260,6 @@ flowchart TD
|
||||
pkg_experimental_computer_use_cua_driver_native["experimental-computer-use-cua-driver-native"]
|
||||
pkg_experimental_inspector["experimental-inspector"]
|
||||
pkg_experimental_ptc_runtime_python["experimental-ptc-runtime-python"]
|
||||
pkg_experimental_schedule_bundle["experimental-schedule-bundle"]
|
||||
pkg_experimental_speech_to_text["experimental-speech-to-text"]
|
||||
pkg_experimental_speech_to_text_sensevoice["experimental-speech-to-text-sensevoice"]
|
||||
pkg_experimental_tool_agent_team["experimental-tool-agent-team"]
|
||||
@@ -337,6 +336,7 @@ flowchart TD
|
||||
end
|
||||
subgraph group_schedule["packages/schedule"]
|
||||
pkg_schedule["schedule"]
|
||||
pkg_tool_schedule["tool-schedule"]
|
||||
end
|
||||
subgraph group_sdk["packages/sdk"]
|
||||
pkg_sdk_client["sdk-client"]
|
||||
@@ -1335,6 +1335,7 @@ flowchart TD
|
||||
pkg_schedule --> pkg_session_persistence
|
||||
pkg_schedule --> pkg_session_projection
|
||||
pkg_schedule --> pkg_storage_domain
|
||||
pkg_schedule --> pkg_subagent
|
||||
pkg_schedule --> pkg_tools
|
||||
pkg_schedule --> pkg_typert_protocol
|
||||
pkg_schedule --> pkg_workspace
|
||||
@@ -1374,6 +1375,10 @@ flowchart TD
|
||||
pkg_subagent_dsh_sdk --> pkg_session
|
||||
pkg_subagent_dsh_sdk --> pkg_subagent
|
||||
pkg_subagent_dsh_sdk --> pkg_subprocess
|
||||
pkg_tool_schedule --> pkg_llm
|
||||
pkg_tool_schedule --> pkg_schedule
|
||||
pkg_tool_schedule --> pkg_subagent
|
||||
pkg_tool_schedule --> pkg_tools
|
||||
```
|
||||
|
||||
<!-- BEGIN GENERATED module-graph:packages -->
|
||||
@@ -1468,7 +1473,6 @@ flowchart TD
|
||||
| [`client-web`](../packages/client/web) | `client` | — |
|
||||
| [`office-to-pdf`](../packages/document/office-to-pdf) | `document` | — |
|
||||
| [`experimental-agent-team-profile`](../packages/experimental/agent-team-profile) | `experimental` | — |
|
||||
| [`experimental-schedule-bundle`](../packages/experimental/schedule-bundle) | `experimental` | — |
|
||||
| [`experimental-voice-input-bundle`](../packages/experimental/voice-input-bundle) | `experimental` | — |
|
||||
| [`experimental-webworker-packer`](../packages/experimental/webworker-packer) | `experimental` | — |
|
||||
| [`client-ui-cordis`](../packages/extensions/ui-cordis) | `extensions` | — |
|
||||
@@ -1690,9 +1694,10 @@ flowchart TD
|
||||
| [`experimental-client-ui-agent-team`](../packages/experimental/client-ui-agent-team) | `experimental` | [`api-session-controller`](../packages/api/session-controller), [`client-locale`](../packages/client/locale), [`client-ui-conversation`](../packages/client/ui-conversation), [`client-ui-primitives`](../packages/client/ui-primitives), [`client-ui-renderer`](../packages/client/ui-renderer), [`client-ui-session`](../packages/client/ui-session), [`client-ui-slots`](../packages/client/ui-slots), [`client-ui-workspace`](../packages/client/ui-workspace), [`experimental-agent-team`](../packages/experimental/agent-team), [`session`](../packages/core/session) |
|
||||
| [`experimental-client-ui-voice-input`](../packages/experimental/client-ui-voice-input) | `experimental` | [`api-gateway`](../packages/api/gateway), [`api-remotes`](../packages/api/remotes), [`api-session-controller`](../packages/api/session-controller), [`client-locale`](../packages/client/locale), [`client-store`](../packages/client/store), [`client-ui-conversation`](../packages/client/ui-conversation), [`client-ui-plugin-manager`](../packages/client/ui-plugin-manager), [`client-ui-primitives`](../packages/client/ui-primitives), [`client-ui-renderer`](../packages/client/ui-renderer), [`client-ui-session`](../packages/client/ui-session), [`client-ui-slots`](../packages/client/ui-slots), [`experimental-api-speech-to-text`](../packages/experimental/api-speech-to-text), [`experimental-speech-to-text`](../packages/experimental/speech-to-text), [`session`](../packages/core/session), [`typert-protocol`](../packages/typert/protocol) |
|
||||
| [`experimental-tool-agent-team`](../packages/experimental/tool-agent-team) | `experimental` | [`agent`](../packages/core/agent), [`experimental-agent-team`](../packages/experimental/agent-team), [`session`](../packages/core/session), [`system-prompt`](../packages/core/system-prompt), [`tools`](../packages/core/tools) |
|
||||
| [`schedule`](../packages/schedule/schedule) | `schedule` | [`agent`](../packages/core/agent), [`api-session-controller`](../packages/api/session-controller), [`brand`](../packages/util/brand), [`invariants`](../packages/runtime-diagnostics/invariants), [`llm`](../packages/llm/llm), [`session`](../packages/core/session), [`session-persistence`](../packages/session/session-persistence), [`session-projection`](../packages/session/session-projection), [`storage-domain`](../packages/storage/storage-domain), [`tools`](../packages/core/tools), [`typert-protocol`](../packages/typert/protocol), [`workspace`](../packages/workspace/workspace) |
|
||||
| [`schedule`](../packages/schedule/schedule) | `schedule` | [`agent`](../packages/core/agent), [`api-session-controller`](../packages/api/session-controller), [`brand`](../packages/util/brand), [`invariants`](../packages/runtime-diagnostics/invariants), [`llm`](../packages/llm/llm), [`session`](../packages/core/session), [`session-persistence`](../packages/session/session-persistence), [`session-projection`](../packages/session/session-projection), [`storage-domain`](../packages/storage/storage-domain), [`subagent`](../packages/subagent/subagent), [`tools`](../packages/core/tools), [`typert-protocol`](../packages/typert/protocol), [`workspace`](../packages/workspace/workspace) |
|
||||
| [`sdk-client`](../packages/sdk/client) | `sdk` | [`llm`](../packages/llm/llm), [`sdk-protocol`](../packages/sdk/protocol), [`session`](../packages/core/session) |
|
||||
| [`sdk-jsonrpc-server`](../packages/sdk/server) | `sdk` | [`agent`](../packages/core/agent), [`attachment`](../packages/attachment/attachment), [`llm`](../packages/llm/llm), [`llm-deepseek-api-key`](../packages/llm/llm-deepseek-api-key), [`scope`](../packages/core/scope), [`sdk-protocol`](../packages/sdk/protocol), [`session`](../packages/core/session), [`subagent`](../packages/subagent/subagent) |
|
||||
| [`client-test-runtime`](../packages/test-support/client-runtime) | `test-support` | [`api-gateway`](../packages/api/gateway), [`api-session-controller`](../packages/api/session-controller), [`api-workspace-controller`](../packages/api/workspace-controller), [`attachment`](../packages/attachment/attachment), [`client-connection`](../packages/client/connection), [`client-hmr`](../packages/client/hmr), [`client-modules`](../packages/client/modules), [`client-store`](../packages/client/store), [`client-ui-chat`](../packages/client/ui-chat), [`client-ui-conversation`](../packages/client/ui-conversation), [`client-ui-renderer`](../packages/client/ui-renderer), [`client-ui-session`](../packages/client/ui-session), [`client-ui-settings`](../packages/client/ui-settings), [`client-ui-slots`](../packages/client/ui-slots), [`client-web`](../packages/client/web), [`remote-mock`](../packages/test-support/remote-mock), [`session`](../packages/core/session), [`subagent`](../packages/subagent/subagent), [`typert-protocol`](../packages/typert/protocol) |
|
||||
| [`subagent-dsh-sdk`](../packages/subagent/subagent-dsh-sdk) | `subagent` | [`agent`](../packages/core/agent), [`llm`](../packages/llm/llm), [`sdk-client`](../packages/sdk/client), [`session`](../packages/core/session), [`subagent`](../packages/subagent/subagent), [`subprocess`](../packages/subprocess/subprocess) |
|
||||
| [`tool-schedule`](../packages/schedule/tool-schedule) | `schedule` | [`llm`](../packages/llm/llm), [`schedule`](../packages/schedule/schedule), [`subagent`](../packages/subagent/subagent), [`tools`](../packages/core/tools) |
|
||||
<!-- END GENERATED module-graph:packages -->
|
||||
@@ -262,7 +262,6 @@ flowchart TD
|
||||
pkg_experimental_computer_use_cua_driver_native["experimental-computer-use-cua-driver-native"]
|
||||
pkg_experimental_inspector["experimental-inspector"]
|
||||
pkg_experimental_ptc_runtime_python["experimental-ptc-runtime-python"]
|
||||
pkg_experimental_schedule_bundle["experimental-schedule-bundle"]
|
||||
pkg_experimental_speech_to_text["experimental-speech-to-text"]
|
||||
pkg_experimental_speech_to_text_sensevoice["experimental-speech-to-text-sensevoice"]
|
||||
pkg_experimental_tool_agent_team["experimental-tool-agent-team"]
|
||||
@@ -339,6 +338,7 @@ flowchart TD
|
||||
end
|
||||
subgraph group_schedule["packages/schedule"]
|
||||
pkg_schedule["schedule"]
|
||||
pkg_tool_schedule["tool-schedule"]
|
||||
end
|
||||
subgraph group_sdk["packages/sdk"]
|
||||
pkg_sdk_client["sdk-client"]
|
||||
@@ -1337,6 +1337,7 @@ flowchart TD
|
||||
pkg_schedule --> pkg_session_persistence
|
||||
pkg_schedule --> pkg_session_projection
|
||||
pkg_schedule --> pkg_storage_domain
|
||||
pkg_schedule --> pkg_subagent
|
||||
pkg_schedule --> pkg_tools
|
||||
pkg_schedule --> pkg_typert_protocol
|
||||
pkg_schedule --> pkg_workspace
|
||||
@@ -1376,6 +1377,10 @@ flowchart TD
|
||||
pkg_subagent_dsh_sdk --> pkg_session
|
||||
pkg_subagent_dsh_sdk --> pkg_subagent
|
||||
pkg_subagent_dsh_sdk --> pkg_subprocess
|
||||
pkg_tool_schedule --> pkg_llm
|
||||
pkg_tool_schedule --> pkg_schedule
|
||||
pkg_tool_schedule --> pkg_subagent
|
||||
pkg_tool_schedule --> pkg_tools
|
||||
```
|
||||
|
||||
<!-- BEGIN GENERATED module-graph:packages -->
|
||||
@@ -1470,7 +1475,6 @@ flowchart TD
|
||||
| [`client-web`](../packages/client/web) | `client` | — |
|
||||
| [`office-to-pdf`](../packages/document/office-to-pdf) | `document` | — |
|
||||
| [`experimental-agent-team-profile`](../packages/experimental/agent-team-profile) | `experimental` | — |
|
||||
| [`experimental-schedule-bundle`](../packages/experimental/schedule-bundle) | `experimental` | — |
|
||||
| [`experimental-voice-input-bundle`](../packages/experimental/voice-input-bundle) | `experimental` | — |
|
||||
| [`experimental-webworker-packer`](../packages/experimental/webworker-packer) | `experimental` | — |
|
||||
| [`client-ui-cordis`](../packages/extensions/ui-cordis) | `extensions` | — |
|
||||
@@ -1692,9 +1696,10 @@ flowchart TD
|
||||
| [`experimental-client-ui-agent-team`](../packages/experimental/client-ui-agent-team) | `experimental` | [`api-session-controller`](../packages/api/session-controller), [`client-locale`](../packages/client/locale), [`client-ui-conversation`](../packages/client/ui-conversation), [`client-ui-primitives`](../packages/client/ui-primitives), [`client-ui-renderer`](../packages/client/ui-renderer), [`client-ui-session`](../packages/client/ui-session), [`client-ui-slots`](../packages/client/ui-slots), [`client-ui-workspace`](../packages/client/ui-workspace), [`experimental-agent-team`](../packages/experimental/agent-team), [`session`](../packages/core/session) |
|
||||
| [`experimental-client-ui-voice-input`](../packages/experimental/client-ui-voice-input) | `experimental` | [`api-gateway`](../packages/api/gateway), [`api-remotes`](../packages/api/remotes), [`api-session-controller`](../packages/api/session-controller), [`client-locale`](../packages/client/locale), [`client-store`](../packages/client/store), [`client-ui-conversation`](../packages/client/ui-conversation), [`client-ui-plugin-manager`](../packages/client/ui-plugin-manager), [`client-ui-primitives`](../packages/client/ui-primitives), [`client-ui-renderer`](../packages/client/ui-renderer), [`client-ui-session`](../packages/client/ui-session), [`client-ui-slots`](../packages/client/ui-slots), [`experimental-api-speech-to-text`](../packages/experimental/api-speech-to-text), [`experimental-speech-to-text`](../packages/experimental/speech-to-text), [`session`](../packages/core/session), [`typert-protocol`](../packages/typert/protocol) |
|
||||
| [`experimental-tool-agent-team`](../packages/experimental/tool-agent-team) | `experimental` | [`agent`](../packages/core/agent), [`experimental-agent-team`](../packages/experimental/agent-team), [`session`](../packages/core/session), [`system-prompt`](../packages/core/system-prompt), [`tools`](../packages/core/tools) |
|
||||
| [`schedule`](../packages/schedule/schedule) | `schedule` | [`agent`](../packages/core/agent), [`api-session-controller`](../packages/api/session-controller), [`brand`](../packages/util/brand), [`invariants`](../packages/runtime-diagnostics/invariants), [`llm`](../packages/llm/llm), [`session`](../packages/core/session), [`session-persistence`](../packages/session/session-persistence), [`session-projection`](../packages/session/session-projection), [`storage-domain`](../packages/storage/storage-domain), [`tools`](../packages/core/tools), [`typert-protocol`](../packages/typert/protocol), [`workspace`](../packages/workspace/workspace) |
|
||||
| [`schedule`](../packages/schedule/schedule) | `schedule` | [`agent`](../packages/core/agent), [`api-session-controller`](../packages/api/session-controller), [`brand`](../packages/util/brand), [`invariants`](../packages/runtime-diagnostics/invariants), [`llm`](../packages/llm/llm), [`session`](../packages/core/session), [`session-persistence`](../packages/session/session-persistence), [`session-projection`](../packages/session/session-projection), [`storage-domain`](../packages/storage/storage-domain), [`subagent`](../packages/subagent/subagent), [`tools`](../packages/core/tools), [`typert-protocol`](../packages/typert/protocol), [`workspace`](../packages/workspace/workspace) |
|
||||
| [`sdk-client`](../packages/sdk/client) | `sdk` | [`llm`](../packages/llm/llm), [`sdk-protocol`](../packages/sdk/protocol), [`session`](../packages/core/session) |
|
||||
| [`sdk-jsonrpc-server`](../packages/sdk/server) | `sdk` | [`agent`](../packages/core/agent), [`attachment`](../packages/attachment/attachment), [`llm`](../packages/llm/llm), [`llm-deepseek-api-key`](../packages/llm/llm-deepseek-api-key), [`scope`](../packages/core/scope), [`sdk-protocol`](../packages/sdk/protocol), [`session`](../packages/core/session), [`subagent`](../packages/subagent/subagent) |
|
||||
| [`client-test-runtime`](../packages/test-support/client-runtime) | `test-support` | [`api-gateway`](../packages/api/gateway), [`api-session-controller`](../packages/api/session-controller), [`api-workspace-controller`](../packages/api/workspace-controller), [`attachment`](../packages/attachment/attachment), [`client-connection`](../packages/client/connection), [`client-hmr`](../packages/client/hmr), [`client-modules`](../packages/client/modules), [`client-store`](../packages/client/store), [`client-ui-chat`](../packages/client/ui-chat), [`client-ui-conversation`](../packages/client/ui-conversation), [`client-ui-renderer`](../packages/client/ui-renderer), [`client-ui-session`](../packages/client/ui-session), [`client-ui-settings`](../packages/client/ui-settings), [`client-ui-slots`](../packages/client/ui-slots), [`client-web`](../packages/client/web), [`remote-mock`](../packages/test-support/remote-mock), [`session`](../packages/core/session), [`subagent`](../packages/subagent/subagent), [`typert-protocol`](../packages/typert/protocol) |
|
||||
| [`subagent-dsh-sdk`](../packages/subagent/subagent-dsh-sdk) | `subagent` | [`agent`](../packages/core/agent), [`llm`](../packages/llm/llm), [`sdk-client`](../packages/sdk/client), [`session`](../packages/core/session), [`subagent`](../packages/subagent/subagent), [`subprocess`](../packages/subprocess/subprocess) |
|
||||
| [`tool-schedule`](../packages/schedule/tool-schedule) | `schedule` | [`llm`](../packages/llm/llm), [`schedule`](../packages/schedule/schedule), [`subagent`](../packages/subagent/subagent), [`tools`](../packages/core/tools) |
|
||||
<!-- END GENERATED module-graph:packages -->
|
||||
@@ -165,8 +165,8 @@
|
||||
en: e5b55405bd2b69f5
|
||||
zh: e5b55405bd2b69f5
|
||||
/session-persistence-event-catalog/events/schedule/schedule-change-log-only:
|
||||
en: 353442ce8925614f
|
||||
zh: 71e6ab8296c74d2a
|
||||
en: 162584304e006c72
|
||||
zh: d8a6bacf60777aa9
|
||||
/session-persistence-event-catalog/events/session:
|
||||
en: a1ac8f2660a4f61e
|
||||
zh: a1ac8f2660a4f61e
|
||||
|
||||
@@ -775,7 +775,7 @@ Source: [`packages/sandbox/sandbox-policy/src/session-mode.ts:33`](../packages/s
|
||||
|
||||
Types: [ScheduleChange](subsystems/schedule.md)
|
||||
|
||||
Source: [`packages/schedule/schedule/src/types.ts:358`](../packages/schedule/schedule/src/types.ts)
|
||||
Source: [`packages/schedule/schedule/src/types.ts:365`](../packages/schedule/schedule/src/types.ts)
|
||||
|
||||
### `session/*`
|
||||
|
||||
|
||||
@@ -777,7 +777,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
||||
|
||||
类型:[ScheduleChange](subsystems/schedule.zh.md)
|
||||
|
||||
来源:[`packages/schedule/schedule/src/types.ts:358`](../packages/schedule/schedule/src/types.ts)
|
||||
来源:[`packages/schedule/schedule/src/types.ts:365`](../packages/schedule/schedule/src/types.ts)
|
||||
|
||||
### `session/*`
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
en: 41cd197b5c74bfa3
|
||||
zh: 18ed11259036d726
|
||||
/host-wide-schedule/absolute-time-input:
|
||||
en: 8186d070ab412545
|
||||
zh: 968b752df9e03b68
|
||||
en: a07f1a7153b0074f
|
||||
zh: f3c584db1073e49d
|
||||
/host-wide-schedule/daily-wall-clock-input:
|
||||
en: 2d249edc3dfccb8a
|
||||
zh: 33fecda132b03b84
|
||||
@@ -24,11 +24,11 @@
|
||||
en: 9cd7f65e0699aa91
|
||||
zh: 42f2a6fda33d2ff0
|
||||
/host-wide-schedule/active-views-and-management:
|
||||
en: 0656173de50ee132
|
||||
zh: 54176540371d0f28
|
||||
en: 93798ad69f74ddd5
|
||||
zh: 634126ad8accc356
|
||||
/host-wide-schedule/web-catalog:
|
||||
en: 1812b61ec3a5ba65
|
||||
zh: 5a066b6ebd5d9a3a
|
||||
en: b5e5ac8125e65f33
|
||||
zh: 9ee064d833a4f838
|
||||
/host-wide-schedule/timing-edits:
|
||||
en: ce5d2095a3ad2e82
|
||||
zh: 167b3715f8eaffc1
|
||||
|
||||
@@ -116,7 +116,7 @@ interface LocalAtInput {
|
||||
type AtInput = string | LocalAtInput
|
||||
```
|
||||
|
||||
The shipped Web composition carries no `time-context` row; the optional experimental bundle `@deepseek-ai/dsh-experimental-schedule-bundle`, enabled from the Plugins page, inserts and mounts time-context, which samples the browser's IANA zone for every prompt. Time-context tells the model to interpret otherwise-unqualified natural-language dates and times in that request-local zone when the open turn has one unambiguous browser zone; mixed or missing browser-zone records tell the model to ask. That guidance is not a durable Session default: the model must still pass an offset in the string form or `time_zone` in the local form, and Schedule never reads browser, Session, process, or model context.
|
||||
The shipped Web composition mounts the `schedule` service and the `ui-schedule` task page. The clock reading and the four reminder tools are preset-owned: `standard`, `cordis`, and `ptc` declare `time-context` and `@deepseek-ai/dsh-tool-schedule` together, and `minimal` declares neither. The `tool-subagent` and `tool-subagent-fork` rows in those three presets deny the four tools, and each tool refuses a delegated caller with `subagent_session`, so a delegated child neither sees the tools nor has a call accepted. Time-context tells the model to interpret otherwise-unqualified natural-language dates and times in that request-local zone when the open turn has one unambiguous browser zone; mixed or missing browser-zone records tell the model to ask. That guidance is not a durable Session default: the model must still pass an offset in the string form or `time_zone` in the local form, and Schedule never reads browser, Session, process, or model context.
|
||||
|
||||
Schedule rejects invalid offsets and zones, offset-free strings, non-future targets, and local times inside daylight-saving gaps. A daylight-saving overlap chooses its first, earlier instant. Successful creation stores only canonical UTC `scheduledAt`, so replay never depends on ambient time-zone state.
|
||||
|
||||
@@ -262,7 +262,7 @@ type ScheduleView = ScheduleRecord & {
|
||||
}
|
||||
```
|
||||
|
||||
The [tool catalog](../tool-catalog.md#deepseek-aidsh-schedule) owns schemas for `schedule_create`, `schedule_list`, `schedule_delete`, and `schedule_update`. Create, delete, and update acknowledge the storage-domain write. A Host-wide queue serializes these mutations against due delivery; deleting a task does not remove an already queued message. Model tools address the current Session, while the shared Host create, list, update, and delete methods accept an explicit Session binding. Creation requires a `title` that must be non-empty after trimming and at most 120 characters; a missing, blank, or over-long title is rejected with `invalid_prompt`, and creation never derives one from the instruction. Create and list views carry the stored `title` alongside the instruction, and a stored record whose `title` is missing or invalid is rejected at decode.
|
||||
The [tool catalog](../tool-catalog.md#deepseek-aidsh-tool-schedule) owns schemas for `schedule_create`, `schedule_list`, `schedule_delete`, and `schedule_update`, which [`@deepseek-ai/dsh-tool-schedule`](../../packages/schedule/tool-schedule/README.md) contributes to each preset that mounts it; the Host service owns storage and delivery. Create, delete, and update acknowledge the storage-domain write. A Host-wide queue serializes these mutations against due delivery; deleting a task does not remove an already queued message. Model tools address the current Session, while the shared Host create, list, update, and delete methods accept an explicit Session binding. `create` and `update` refuse a Session a delegated child owns with `subagent_session` when its delegation depth is above zero, and delivery cannot reach such a Session. The four model tools refuse a delegated caller in the tool layer, while `list`, `catalog`, `history`, and `delete` still serve that Session. Creation requires a `title` that must be non-empty after trimming and at most 120 characters; a missing, blank, or over-long title is rejected with `invalid_prompt`, and creation never derives one from the instruction. Create and list views carry the stored `title` alongside the instruction, and a stored record whose `title` is missing or invalid is rejected at decode.
|
||||
|
||||
```ts type-equiv
|
||||
/** Reminder creation selector, shared by the model consumer and Host service. */
|
||||
@@ -339,7 +339,7 @@ type ScheduleCatalogEntry = ScheduleRecord & {
|
||||
|
||||
The Remote `schedule.list({ sessionId })`, model `schedule_list`, and Session-header catalog return only active tasks. A model view's derived timing `state` remains distinct from stored lifecycle `status`. Deletion uses `schedule.delete({ sessionId, id })` with the entry's original binding; a mismatched binding returns not found. Model tools supply the current Agent's Session, whereas the global user interface supplies the selected task's binding. The binding check alone does not establish caller authorization. The payload-free `schedule/changed` event invalidates client lists; reconnecting clients fetch current state again.
|
||||
|
||||
The shipped Web composition carries no `ui-schedule` row; the optional experimental bundle `@deepseek-ai/dsh-experimental-schedule-bundle`, enabled from the Plugins page, inserts and mounts `ui-schedule` with the Host capability. The [client package](../../packages/client/ui-schedule/README.md) owns the catalog, empty state, and deletion controls. The page separately filters all, active, and inactive tasks, retains inactive details and an original-Session control in the detail tab strip, and requires explicit confirmed deletion. The Rules and Records tabs separate task settings from lazily paged saved receipts. Neither a receipt nor inactive status confirms model execution.
|
||||
The shipped Web composition mounts `ui-schedule` with the Host capability. The [client package](../../packages/client/ui-schedule/README.md) owns the catalog, empty state, and deletion controls. The page separately filters all, active, and inactive tasks, retains inactive details and an original-Session control in the detail tab strip, and requires explicit confirmed deletion. The Rules and Records tabs separate task settings from lazily paged saved receipts. Neither a receipt nor inactive status confirms model execution.
|
||||
|
||||
## Timing edits
|
||||
|
||||
@@ -459,6 +459,8 @@ Shared management service; reads, deletion, and timing edits never activate a Se
|
||||
*
|
||||
* The request must supply a title; a missing, blank-after-trim, or over-long
|
||||
* title rejects with `invalid_prompt` instead of deriving one from the prompt.
|
||||
* A Session a delegated child owns rejects with `subagent_session`, because delivery
|
||||
* can never reach it: the child is one whose delegation depth is above zero.
|
||||
* The record is built from the clock reading taken before the request joins the
|
||||
* serialized queue, so a create that waits behind a longer operation keeps its
|
||||
* request-time anchor and may already be due when the queue reaches it.
|
||||
@@ -497,7 +499,9 @@ async create(sessionId: SessionId, request: ScheduleCreateRequest, signal?: Abor
|
||||
* Delete one task belonging to the selected Session, leaving queued messages intact.
|
||||
*
|
||||
* The row is removed: the task no longer schedules, leaves `list` and `catalog`, and its
|
||||
* saved delivery records go with it.
|
||||
* saved delivery records go with it. A task bound to a Session a delegated child owns
|
||||
* stays deletable even though creation and timing edits refuse that binding, so a task
|
||||
* stored before that rule existed remains removable.
|
||||
* @param request - Session and exact task identity.
|
||||
* @param signal - Optional cancellation checked before persistence begins, including after FIFO waits.
|
||||
* @returns Whether that Session owned a deleted task. Cancellation does not roll back an in-flight write.
|
||||
@@ -509,10 +513,13 @@ async create(sessionId: SessionId, request: ScheduleCreateRequest, signal?: Abor
|
||||
* binding without activating the Session or changing saved deliveries.
|
||||
*
|
||||
* Each supplied field replaces its stored value; an omitted field keeps it. A name or
|
||||
* instruction change alone does not reset the committed target.
|
||||
* instruction change alone does not reset the committed target. A Session a delegated
|
||||
* child owns returns the non-mutating `subagent_session` result, so an edit cannot
|
||||
* re-arm a task bound to a Session delivery can never reach, and the Web editor can
|
||||
* explain the refusal through the ordinary result it already renders.
|
||||
* @param request - Task binding, complete observed record, and any combination of timing, name, and instruction.
|
||||
* @param signal - Cancellation checked after domain readiness and FIFO waits, before persistence begins.
|
||||
* @returns The committed record, unchanged record for a no-op, or a non-mutating input/lookup/conflict result.
|
||||
* @returns The committed record, unchanged record for a no-op, or a non-mutating input/lookup/conflict/refusal result.
|
||||
* Storage and lifecycle failures reject; cancellation after a write starts does not roll it back.
|
||||
*/
|
||||
@Remote('update') async update(request: ScheduleUpdateRequest, signal?: AbortSignal): Promise<ScheduleUpdateResult>
|
||||
|
||||
@@ -116,7 +116,7 @@ interface LocalAtInput {
|
||||
type AtInput = string | LocalAtInput
|
||||
```
|
||||
|
||||
随发行版交付的 Web 组合不含 `time-context` 行;在插件管理页启用可选实验性 bundle `@deepseek-ai/dsh-experimental-schedule-bundle` 会插入并挂载 time-context,它为每条提示词采样浏览器的 IANA 时区。当 open turn 只有一个无歧义的浏览器时区时,Time-context 会告诉模型按该请求本地时区解释未明确限定时区的自然语言日期和时间;浏览器时区记录混合或缺失时,则告诉模型询问用户。该指引不是持久 Session 默认值:模型仍必须在字符串形式中传入偏移量,或在本地形式中传入 `time_zone`;Schedule 绝不会读取浏览器、Session、进程或模型上下文。
|
||||
随发行版交付的 Web 组合挂载 `schedule` 服务与 `ui-schedule` 任务页面。时钟读数与四个提醒工具归 preset 所有:`standard`、`cordis` 与 `ptc` 一同声明 `time-context` 与 `@deepseek-ai/dsh-tool-schedule`,`minimal` 两者都不声明。这三个 preset 中的 `tool-subagent` 与 `tool-subagent-fork` 两行都 deny 这四个工具,且每个工具都以 `subagent_session` 拒绝被委派的调用方,因此被委派的子 agent 既看不到这些工具,其调用也不会被接受。当 open turn 只有一个无歧义的浏览器时区时,Time-context 会告诉模型按该请求本地时区解释未明确限定时区的自然语言日期和时间;浏览器时区记录混合或缺失时,则告诉模型询问用户。该指引不是持久 Session 默认值:模型仍必须在字符串形式中传入偏移量,或在本地形式中传入 `time_zone`;Schedule 绝不会读取浏览器、Session、进程或模型上下文。
|
||||
|
||||
Schedule 会拒绝无效偏移量与时区、不带偏移量的字符串、非未来目标,以及落在夏令时缺口内的本地时间。遇到夏令时重叠时,会选择第一次出现的较早时点。创建成功后只存储规范化后的 UTC `scheduledAt`,因此回放绝不依赖环境时区状态。
|
||||
|
||||
@@ -262,7 +262,7 @@ type ScheduleView = ScheduleRecord & {
|
||||
}
|
||||
```
|
||||
|
||||
[工具目录](../tool-catalog.zh.md#deepseek-aidsh-schedule) 负责 `schedule_create`、`schedule_list`、`schedule_delete` 和 `schedule_update` 的 schema。创建、删除和更新在 storage domain 写入确认后返回成功。宿主级队列将这些变更与到期投递串行化;删除任务不会移除已入队消息。模型工具操作当前 Session,共享宿主的 create、list、update 和 delete 方法接受显式 Session 绑定。创建必须提供 `title`,其去除首尾空白后必须非空且不超过 120 个字符;缺失、空白或过长的标题以 `invalid_prompt` 拒绝,且创建过程绝不从指令派生标题。create 和 list 视图在指令之外同时携带已存储的 `title`,且 `title` 缺失或非法的已存储记录在解码时被拒绝。
|
||||
[工具目录](../tool-catalog.zh.md#deepseek-aidsh-tool-schedule) 负责 `schedule_create`、`schedule_list`、`schedule_delete` 和 `schedule_update` 的 schema,这四个工具由 [`@deepseek-ai/dsh-tool-schedule`](../../packages/schedule/tool-schedule/README.zh.md) 在挂载它的每个 preset 中贡献;宿主服务拥有存储与投递。创建、删除和更新在 storage domain 写入确认后返回成功。宿主级队列将这些变更与到期投递串行化;删除任务不会移除已入队消息。模型工具操作当前 Session,共享宿主的 create、list、update 和 delete 方法接受显式 Session 绑定。`create` 与 `update` 在其委派深度大于零时以 `subagent_session` 拒绝被委派子 agent 拥有的 Session,且投递无法到达这样的 Session。四个模型工具在工具层拒绝被委派的调用方,而 `list`、`catalog`、`history` 与 `delete` 仍服务该 Session。创建必须提供 `title`,其去除首尾空白后必须非空且不超过 120 个字符;缺失、空白或过长的标题以 `invalid_prompt` 拒绝,且创建过程绝不从指令派生标题。create 和 list 视图在指令之外同时携带已存储的 `title`,且 `title` 缺失或非法的已存储记录在解码时被拒绝。
|
||||
|
||||
```ts type-equiv
|
||||
/** Reminder creation selector, shared by the model consumer and Host service. */
|
||||
@@ -339,7 +339,7 @@ type ScheduleCatalogEntry = ScheduleRecord & {
|
||||
|
||||
Remote 方法 `schedule.list({ sessionId })`、模型 `schedule_list` 和 Session 页头目录仅返回活动任务。模型视图派生的时间 `state` 与存储的生命周期 `status` 仍是不同概念。删除通过 `schedule.delete({ sessionId, id })` 使用条目的原始绑定;绑定不匹配时返回未找到。模型工具传入当前 Agent 的 Session,全局用户界面则传入所选任务的绑定。仅校验绑定并不构成调用者鉴权。无 payload 的 `schedule/changed` 事件通知客户端刷新列表;重新连接后,客户端再次获取当前状态。
|
||||
|
||||
随发行版交付的 Web 组合不含 `ui-schedule` 行;在插件管理页启用可选实验性 bundle `@deepseek-ai/dsh-experimental-schedule-bundle` 会插入它并与宿主能力一起挂载。[客户端包](../../packages/client/ui-schedule/README.zh.md) 负责目录、空状态与删除控件。页面单独筛选全部、活动和未运行任务,保留未运行任务详情及详情页签条内的原 Session 入口,并要求显式确认删除。“规则”和“任务运行记录”页签将任务设置与按需分页加载的已保存回执分开。回执与未运行状态均不确认模型执行。
|
||||
随发行版交付的 Web 组合把 `ui-schedule` 与宿主能力一起挂载。[客户端包](../../packages/client/ui-schedule/README.zh.md) 负责目录、空状态与删除控件。页面单独筛选全部、活动和未运行任务,保留未运行任务详情及详情页签条内的原 Session 入口,并要求显式确认删除。“规则”和“任务运行记录”页签将任务设置与按需分页加载的已保存回执分开。回执与未运行状态均不确认模型执行。
|
||||
|
||||
## 修改时间
|
||||
|
||||
@@ -459,6 +459,8 @@ Shared management service; reads, deletion, and timing edits never activate a Se
|
||||
*
|
||||
* The request must supply a title; a missing, blank-after-trim, or over-long
|
||||
* title rejects with `invalid_prompt` instead of deriving one from the prompt.
|
||||
* A Session a delegated child owns rejects with `subagent_session`, because delivery
|
||||
* can never reach it: the child is one whose delegation depth is above zero.
|
||||
* The record is built from the clock reading taken before the request joins the
|
||||
* serialized queue, so a create that waits behind a longer operation keeps its
|
||||
* request-time anchor and may already be due when the queue reaches it.
|
||||
@@ -497,7 +499,9 @@ async create(sessionId: SessionId, request: ScheduleCreateRequest, signal?: Abor
|
||||
* Delete one task belonging to the selected Session, leaving queued messages intact.
|
||||
*
|
||||
* The row is removed: the task no longer schedules, leaves `list` and `catalog`, and its
|
||||
* saved delivery records go with it.
|
||||
* saved delivery records go with it. A task bound to a Session a delegated child owns
|
||||
* stays deletable even though creation and timing edits refuse that binding, so a task
|
||||
* stored before that rule existed remains removable.
|
||||
* @param request - Session and exact task identity.
|
||||
* @param signal - Optional cancellation checked before persistence begins, including after FIFO waits.
|
||||
* @returns Whether that Session owned a deleted task. Cancellation does not roll back an in-flight write.
|
||||
@@ -509,10 +513,13 @@ async create(sessionId: SessionId, request: ScheduleCreateRequest, signal?: Abor
|
||||
* binding without activating the Session or changing saved deliveries.
|
||||
*
|
||||
* Each supplied field replaces its stored value; an omitted field keeps it. A name or
|
||||
* instruction change alone does not reset the committed target.
|
||||
* instruction change alone does not reset the committed target. A Session a delegated
|
||||
* child owns returns the non-mutating `subagent_session` result, so an edit cannot
|
||||
* re-arm a task bound to a Session delivery can never reach, and the Web editor can
|
||||
* explain the refusal through the ordinary result it already renders.
|
||||
* @param request - Task binding, complete observed record, and any combination of timing, name, and instruction.
|
||||
* @param signal - Cancellation checked after domain readiness and FIFO waits, before persistence begins.
|
||||
* @returns The committed record, unchanged record for a no-op, or a non-mutating input/lookup/conflict result.
|
||||
* @returns The committed record, unchanged record for a no-op, or a non-mutating input/lookup/conflict/refusal result.
|
||||
* Storage and lifecycle failures reject; cancellation after a write starts does not roll it back.
|
||||
*/
|
||||
@Remote('update') async update(request: ScheduleUpdateRequest, signal?: AbortSignal): Promise<ScheduleUpdateResult>
|
||||
|
||||
+19
-19
@@ -9,8 +9,8 @@
|
||||
en: 6cc2cd9ced70bb09
|
||||
zh: 1c0e6cb4ba2ed637
|
||||
/tool-schema-catalog/tool-package-map:
|
||||
en: 167287d095eee2f5
|
||||
zh: 18720d5e81379d2f
|
||||
en: 75120ef94b3c2830
|
||||
zh: c5db28dd6853e91a
|
||||
/tool-schema-catalog/deepseek-ai-dsh-plugin-manager:
|
||||
en: e0143916bb634762
|
||||
zh: e0143916bb634762
|
||||
@@ -168,23 +168,23 @@
|
||||
en: 0b517f13dfde11fe
|
||||
zh: b7ee7482e8ecde56
|
||||
/tool-schema-catalog/deepseek-ai-dsh-tool-goal/update-goal:
|
||||
en: e6b92fac5aad585c
|
||||
zh: 6b3cdd87b059a98f
|
||||
/tool-schema-catalog/deepseek-ai-dsh-schedule:
|
||||
en: 573da0cf49b1eed6
|
||||
zh: 573da0cf49b1eed6
|
||||
/tool-schema-catalog/deepseek-ai-dsh-schedule/schedule-create:
|
||||
en: 0a10b5db8919d316
|
||||
zh: 175d680a29f59b63
|
||||
/tool-schema-catalog/deepseek-ai-dsh-schedule/schedule-delete:
|
||||
en: cff096695f06e298
|
||||
zh: 3d0063a1e529377f
|
||||
/tool-schema-catalog/deepseek-ai-dsh-schedule/schedule-list:
|
||||
en: d8543c8503d0947e
|
||||
zh: 205e6c813ad2b37c
|
||||
/tool-schema-catalog/deepseek-ai-dsh-schedule/schedule-update:
|
||||
en: 3d5e2517b510238b
|
||||
zh: d6e5c4c4465c9645
|
||||
en: 5f8a1d6e44e57d09
|
||||
zh: d757489fdacde22d
|
||||
/tool-schema-catalog/deepseek-ai-dsh-tool-schedule:
|
||||
en: 9fd2eccb1ee51372
|
||||
zh: 9fd2eccb1ee51372
|
||||
/tool-schema-catalog/deepseek-ai-dsh-tool-schedule/schedule-create:
|
||||
en: 606fc2b8d62ba044
|
||||
zh: 7523e106168c2ab2
|
||||
/tool-schema-catalog/deepseek-ai-dsh-tool-schedule/schedule-delete:
|
||||
en: 5fc994535c95cd6b
|
||||
zh: 1910b545d7b92379
|
||||
/tool-schema-catalog/deepseek-ai-dsh-tool-schedule/schedule-list:
|
||||
en: 5bcfc051e364df29
|
||||
zh: b77e60c123800eb1
|
||||
/tool-schema-catalog/deepseek-ai-dsh-tool-schedule/schedule-update:
|
||||
en: b9f4691532157a1d
|
||||
zh: 8a0597790dc5f999
|
||||
/tool-schema-catalog/deepseek-ai-dsh-tool-lsp:
|
||||
en: 32982123b1f0e5bc
|
||||
zh: 32982123b1f0e5bc
|
||||
|
||||
@@ -32,7 +32,7 @@ This table connects model-visible tool names to the plugin package and service s
|
||||
| `@deepseek-ai/dsh-tool-fs-search` | `glob`, `grep` | `ctx.tools`, `ctx.subprocess`, `ctx.systemPrompt` | `tool/call`, `tool/result` | - | glob and grep are unconditional discovery tools that spawn the packaged ripgrep binary (`@vscode/ripgrep`) through ctx.subprocess as ordinary foreground calls (never background jobs) — no host `rg` install and no shell layer. The catalog uses `sampleOverCapGlobResults: true`; deployments must choose that behavior explicitly. Capped results save the complete formatted list through the optional ctx.spillStore backend; returned locators are follow-up-readable/searchable when the backend exposes local paths in co-located deployments. |
|
||||
| `@deepseek-ai/dsh-tool-terminal` | `terminal_close`, `terminal_list`, `terminal_open`, `terminal_read`, `terminal_send`, `terminal_signal` | `ctx.tools`, `ctx.terminals`, `ctx.systemPrompt`, `ctx.jobs at call time for run_in_background` | `tool/call`, `tool/result` | - | The six terminal tools are opt-in and complement one-shot shell/filesystem tools. `terminal_send(run_in_background: true)` registers with `ctx.jobs`; TUI, named key sequences, BEL, resize, auto-start, and cross-agent sharing are absent from the schema. |
|
||||
| `@deepseek-ai/dsh-tool-goal` | `create_goal`, `get_goal`, `update_goal` | `ctx.tools`, `ctx.agents`, `ctx.goals`, `ctx.systemPrompt`, `a calling Agent in an authorized open turn` | `tool/call`, `goal/change for mutations`, `tool/result` | - | create, edit, pause, and resume require direct-human root authority; complete and blocked also accept the exact current goal round. The default blocked lower bound is three admitted rounds. |
|
||||
| `@deepseek-ai/dsh-schedule` | `schedule_create`, `schedule_delete`, `schedule_list`, `schedule_update` | `ctx.tools`, `ctx.schedule`, `a live root Agent` | `tool/call`, `Schedule storage domain create, update, or delete`, `tool/result` | - | Registered in live root Agent scopes while the Schedule service is loaded. Accepts after_seconds, explicit absolute at, bounded fixed-rate every_seconds, daily and weekly local times in an explicit IANA zone, and cron as a five-field expression. Management uses the Host storage domain; due messages resume the original Session. |
|
||||
| `@deepseek-ai/dsh-tool-schedule` | `schedule_create`, `schedule_delete`, `schedule_list`, `schedule_update` | `ctx.tools`, `ctx.schedule` | `tool/call`, `Schedule storage domain create, update, or delete`, `tool/result` | - | A preset or Agent scope mounts this package; the preset decides which agents receive the four management tools. Each call acts on the calling Agent's Session. Accepts after_seconds, explicit absolute at, bounded fixed-rate every_seconds, daily and weekly local times in an explicit IANA zone, and cron as a five-field expression. Management uses the Host storage domain; due messages resume the original Session. |
|
||||
| `@deepseek-ai/dsh-tool-lsp` | `lsp` | `ctx.tools`, `ctx.lsp`, `ctx.systemPrompt` | `tool/call`, `tool/result` | - | The lsp tool keeps provider selection and language-server subprocesses behind ctx.lsp, so its model-visible schema stays stable across providers. Requires a registered provider (e.g. `@deepseek-ai/dsh-lsp-stdio`) at runtime; without one, a query returns the structured `LSP_UNAVAILABLE` error rather than changing the schema. |
|
||||
| `@deepseek-ai/dsh-tool-ralph` | `ralph` | `ctx.tools`, `ctx.workflowEngine`, `ctx.subagents`, `ctx.systemPrompt`, `a calling Agent (exec.agent parents every fresh round)` | `tool/call`, `tool/result`, `workflow and child session events during execution` | - | A fixed foreground workflow starts one fresh structured child per round; the model selects only the immutable objective and an optional round cap. |
|
||||
| `@deepseek-ai/dsh-tool-skill` | `skill` | `ctx.tools`, `ctx.agents`, `ctx.skills` | `tool/call`, `tool/result`, `user/message replacement catalogs via agent.inject()` | - | - |
|
||||
@@ -1377,9 +1377,9 @@ Source: [`packages/goal/tool-goal/src/index.ts`](../packages/goal/tool-goal/src/
|
||||
|
||||
create, edit, pause, and resume require direct-human root authority; complete and blocked also accept the exact current goal round. The default blocked lower bound is three admitted rounds.
|
||||
|
||||
<a id="deepseek-aidsh-schedule"></a>
|
||||
<a id="deepseek-aidsh-tool-schedule"></a>
|
||||
|
||||
## `@deepseek-ai/dsh-schedule`
|
||||
## `@deepseek-ai/dsh-tool-schedule`
|
||||
|
||||
### `schedule_create`
|
||||
|
||||
@@ -1506,7 +1506,7 @@ Create a reminder in the current session that delivers prompt when it becomes du
|
||||
}
|
||||
```
|
||||
|
||||
Source: [`packages/schedule/schedule/src/tools.ts`](../packages/schedule/schedule/src/tools.ts)
|
||||
Source: [`packages/schedule/tool-schedule/src/index.ts`](../packages/schedule/tool-schedule/src/index.ts)
|
||||
|
||||
### `schedule_delete`
|
||||
|
||||
@@ -1518,7 +1518,7 @@ Delete a reminder in the current session, active or inactive. Deletion does not
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "Schedule id returned by schedule_list."
|
||||
"description": "Exact schedule id."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -1527,7 +1527,7 @@ Delete a reminder in the current session, active or inactive. Deletion does not
|
||||
}
|
||||
```
|
||||
|
||||
Source: [`packages/schedule/schedule/src/tools.ts`](../packages/schedule/schedule/src/tools.ts)
|
||||
Source: [`packages/schedule/tool-schedule/src/index.ts`](../packages/schedule/tool-schedule/src/index.ts)
|
||||
|
||||
### `schedule_list`
|
||||
|
||||
@@ -1540,7 +1540,7 @@ List the active reminders in the current session.
|
||||
}
|
||||
```
|
||||
|
||||
Source: [`packages/schedule/schedule/src/tools.ts`](../packages/schedule/schedule/src/tools.ts)
|
||||
Source: [`packages/schedule/tool-schedule/src/index.ts`](../packages/schedule/tool-schedule/src/index.ts)
|
||||
|
||||
### `schedule_update`
|
||||
|
||||
@@ -1666,9 +1666,9 @@ Change a reminder in place, keeping its id. Supply a new title, prompt, or at mo
|
||||
}
|
||||
```
|
||||
|
||||
Source: [`packages/schedule/schedule/src/tools.ts`](../packages/schedule/schedule/src/tools.ts)
|
||||
Source: [`packages/schedule/tool-schedule/src/index.ts`](../packages/schedule/tool-schedule/src/index.ts)
|
||||
|
||||
Registered in live root Agent scopes while the Schedule service is loaded. Accepts after_seconds, explicit absolute at, bounded fixed-rate every_seconds, daily and weekly local times in an explicit IANA zone, and cron as a five-field expression. Management uses the Host storage domain; due messages resume the original Session.
|
||||
A preset or Agent scope mounts this package; the preset decides which agents receive the four management tools. Each call acts on the calling Agent's Session. Accepts after_seconds, explicit absolute at, bounded fixed-rate every_seconds, daily and weekly local times in an explicit IANA zone, and cron as a five-field expression. Management uses the Host storage domain; due messages resume the original Session.
|
||||
|
||||
<a id="deepseek-aidsh-tool-lsp"></a>
|
||||
|
||||
|
||||
+9
-13
@@ -36,7 +36,7 @@
|
||||
| `@deepseek-ai/dsh-tool-fs-search` | `glob`、`grep` | `ctx.tools`、`ctx.subprocess`、`ctx.systemPrompt` | `tool/call`、`tool/result` | - | glob 和 grep 是无条件可用的发现工具,通过 ctx.subprocess spawn 随包提供的 ripgrep 二进制文件(`@vscode/ripgrep`),并作为普通前台调用运行,绝不作为后台任务;无需在宿主机安装 `rg`,也不经过 shell 层。本目录使用 `sampleOverCapGlobResults: true`;部署必须显式选择该行为。结果超过上限时,会通过可选的 ctx.spillStore 后端保存完整的格式化列表;在共置部署中,如果后端公开本地路径,返回的定位信息可供后续读取/搜索。 |
|
||||
| `@deepseek-ai/dsh-tool-terminal` | `terminal_close`、`terminal_list`、`terminal_open`、`terminal_read`、`terminal_send`、`terminal_signal` | `ctx.tools`、`ctx.terminals`、`ctx.systemPrompt`、`ctx.jobs at call time for run_in_background` | `tool/call`、`tool/result` | - | 这 6 个终端工具需要选择启用,用于补充一次性 bash/文件系统工具。`terminal_send(run_in_background: true)` 会注册到 `ctx.jobs`;schema 不包含 TUI、具名按键序列、BEL、调整尺寸、自动启动和跨 agent 共享。 |
|
||||
| `@deepseek-ai/dsh-tool-goal` | `create_goal`、`get_goal`、`update_goal` | `ctx.tools`、`ctx.agents`、`ctx.goals`、`ctx.systemPrompt`、`a calling Agent in an authorized open turn` | `tool/call`、`goal/change for mutations`、`tool/result` | - | create、edit、pause 和 resume 要求直接来自人类的根权限;complete 和 blocked 也接受确切的当前 Goal Round。blocked 的默认下限是 3 个获准的 Round。 |
|
||||
| `@deepseek-ai/dsh-schedule` | `schedule_create`、`schedule_delete`、`schedule_list`、`schedule_update` | `ctx.tools`、`ctx.schedule`、live 根 Agent | `tool/call`、Schedule storage domain 创建、更新或删除、`tool/result` | - | Schedule 服务加载期间,在 live 根 Agent scope 内注册。接受 after_seconds、显式绝对 at、有界固定速率 every_seconds、带显式 IANA 时区的每日与每周本地时间,以及作为五字段表达式的 cron。管理使用宿主 storage domain;到期消息会恢复原 Session。 |
|
||||
| `@deepseek-ai/dsh-tool-schedule` | `schedule_create`、`schedule_delete`、`schedule_list`、`schedule_update` | `ctx.tools`、`ctx.schedule` | `tool/call`、Schedule storage domain 创建、更新或删除、`tool/result` | - | preset 或 Agent scope 挂载本包;由 preset 决定哪些 agent 获得这四个管理工具。每次调用都作用于调用方 Agent 的 Session。接受 after_seconds、显式绝对 at、有界固定速率 every_seconds、带显式 IANA 时区的每日与每周本地时间,以及作为五字段表达式的 cron。管理使用宿主 storage domain;到期消息会恢复原 Session。 |
|
||||
| `@deepseek-ai/dsh-tool-lsp` | `lsp` | `ctx.tools`、`ctx.lsp`、`ctx.systemPrompt` | `tool/call`、`tool/result` | - | lsp 工具将提供方选择和语言服务器子进程置于 ctx.lsp 之后,因此其模型可见 schema 在更换提供方时保持稳定。运行时要求已注册提供方,例如 `@deepseek-ai/dsh-lsp-stdio`;如果没有提供方,查询会返回结构化 `LSP_UNAVAILABLE` 错误,而不会改变 schema。 |
|
||||
| `@deepseek-ai/dsh-tool-ralph` | `ralph` | `ctx.tools`、`ctx.workflowEngine`、`ctx.subagents`、`ctx.systemPrompt`、`a calling Agent (exec.agent parents every fresh round)` | `tool/call`、`tool/result`、`workflow and child session events during execution` | - | 固定的前台工作流会在每个 Round 启动一个全新的结构化子级;模型只能选择不可变目标和可选的 Round 上限。 |
|
||||
| `@deepseek-ai/dsh-tool-skill` | `skill` | `ctx.tools`、`ctx.agents`、`ctx.skills` | `tool/call`、`tool/result`、`user/message replacement catalogs via agent.inject()` | - | - |
|
||||
@@ -1383,9 +1383,9 @@ glob 和 grep 是无条件可用的发现工具,通过 ctx.subprocess spawn
|
||||
|
||||
create、edit、pause 和 resume 要求直接来自人类的根权限;complete 和 blocked 也接受确切的当前 Goal Round。blocked 的默认下限是 3 个获准的 Round。
|
||||
|
||||
<a id="deepseek-aidsh-schedule"></a>
|
||||
<a id="deepseek-aidsh-tool-schedule"></a>
|
||||
|
||||
## `@deepseek-ai/dsh-schedule`
|
||||
## `@deepseek-ai/dsh-tool-schedule`
|
||||
|
||||
### `schedule_create`
|
||||
|
||||
@@ -1512,7 +1512,7 @@ create、edit、pause 和 resume 要求直接来自人类的根权限;complete
|
||||
}
|
||||
```
|
||||
|
||||
来源:[`packages/schedule/schedule/src/tools.ts`](../packages/schedule/schedule/src/tools.ts)
|
||||
来源:[`packages/schedule/tool-schedule/src/index.ts`](../packages/schedule/tool-schedule/src/index.ts)
|
||||
|
||||
### `schedule_delete`
|
||||
|
||||
@@ -1524,7 +1524,7 @@ create、edit、pause 和 resume 要求直接来自人类的根权限;complete
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "Schedule id returned by schedule_list."
|
||||
"description": "Exact schedule id."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -1533,7 +1533,7 @@ create、edit、pause 和 resume 要求直接来自人类的根权限;complete
|
||||
}
|
||||
```
|
||||
|
||||
来源:[`packages/schedule/schedule/src/tools.ts`](../packages/schedule/schedule/src/tools.ts)
|
||||
来源:[`packages/schedule/tool-schedule/src/index.ts`](../packages/schedule/tool-schedule/src/index.ts)
|
||||
|
||||
### `schedule_list`
|
||||
|
||||
@@ -1546,11 +1546,7 @@ create、edit、pause 和 resume 要求直接来自人类的根权限;complete
|
||||
}
|
||||
```
|
||||
|
||||
来源:[`packages/schedule/schedule/src/tools.ts`](../packages/schedule/schedule/src/tools.ts)
|
||||
|
||||
选择启用的 Schedule 服务加载期间,在 live 根 Agent scope 内注册。接受 after_seconds、显式绝对 at、有界固定速率 every_seconds、带显式 IANA 时区的每日与每周本地时间,以及作为五字段表达式的 cron。管理使用宿主 storage domain;到期消息会恢复原 Session。
|
||||
|
||||
<a id="deepseek-aidsh-tool-lsp"></a>
|
||||
来源:[`packages/schedule/tool-schedule/src/index.ts`](../packages/schedule/tool-schedule/src/index.ts)
|
||||
|
||||
### `schedule_update`
|
||||
|
||||
@@ -1676,9 +1672,9 @@ create、edit、pause 和 resume 要求直接来自人类的根权限;complete
|
||||
}
|
||||
```
|
||||
|
||||
Source: [`packages/schedule/schedule/src/tools.ts`](../packages/schedule/schedule/src/tools.ts)
|
||||
Source: [`packages/schedule/tool-schedule/src/index.ts`](../packages/schedule/tool-schedule/src/index.ts)
|
||||
|
||||
Schedule 服务加载期间,在 live 根 Agent scope 内注册。接受 after_seconds、显式绝对 at、有界固定速率 every_seconds、带显式 IANA 时区的每日与每周本地时间,以及作为五字段表达式的 cron。管理使用宿主 storage domain;到期消息会恢复原 Session。
|
||||
preset 或 Agent scope 挂载本包;由 preset 决定哪些 agent 获得这四个管理工具。每次调用都作用于调用方 Agent 的 Session。接受 after_seconds、显式绝对 at、有界固定速率 every_seconds、带显式 IANA 时区的每日与每周本地时间,以及作为五字段表达式的 cron。管理使用宿主 storage domain;到期消息会恢复原 Session。
|
||||
|
||||
<a id="deepseek-aidsh-tool-lsp"></a>
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
en: b3b2a6e0ce02bdee
|
||||
zh: 2ddb168de79fd19c
|
||||
/schedule-reminders/create-reminders:
|
||||
en: 68763ffeedaeea3c
|
||||
zh: 739af012a337d448
|
||||
en: f6d1a21af61a44fc
|
||||
zh: a92f177c97880b95
|
||||
/schedule-reminders/inspect-and-delete-tasks:
|
||||
en: b74bc63a1273680b
|
||||
zh: b6d806e91c361b99
|
||||
|
||||
@@ -17,7 +17,9 @@ Create reminders in a conversation, then inspect active and inactive tasks and e
|
||||
<a id="create-reminders"></a>
|
||||
## Create reminders
|
||||
|
||||
The shipped Web profile does not include Schedule. Open Plugins and enable Automation tasks in the Official group; the optional experimental bundle `@deepseek-ai/dsh-experimental-schedule-bundle` then adds Schedule with the clock context that gives the model the current time and the browser's zone. Configure a model provider before asking it to create reminders.
|
||||
The shipped Web profile includes the Host Schedule service and the Automation tasks page. Configure a model provider before asking it to create reminders.
|
||||
|
||||
The `standard`, `cordis`, and `ptc` presets declare the four reminder tools and the clock context that gives the model the current time and the browser's zone, so those presets provide `schedule_create`, `schedule_list`, `schedule_update`, and `schedule_delete`; the `minimal` preset declares neither. A delegated subagent sees none of the four tools, because the presets' delegation rows deny them; a call that reaches one anyway is refused.
|
||||
|
||||
Ask the model to create, list, edit, or delete reminders. It uses `schedule_create`, `schedule_list`, `schedule_update`, and `schedule_delete` (update changes one reminder in place and keeps its id and saved delivery records); the Automation tasks page's New action opens a New Session for a creation instead, with the request already written in its composer. Supported choices are a one-time delay in positive whole seconds, an absolute date and time, a fixed interval of at least one minute, a daily local time with an IANA time zone, a weekly local time with an IANA time zone and ISO weekdays from Monday 1 through Sunday 7, or a five-field cron expression with an explicit IANA time zone, stored in canonical form.
|
||||
|
||||
|
||||
@@ -17,7 +17,9 @@
|
||||
<a id="create-reminders"></a>
|
||||
## 创建提醒
|
||||
|
||||
发布的 Web profile 不含 Schedule。打开插件管理页,在“官方”分组中启用“自动化任务”;可选实验性 bundle `@deepseek-ai/dsh-experimental-schedule-bundle` 随即加入 Schedule 及其时钟上下文,后者把当前时间和浏览器时区交给模型。在请求模型创建提醒前,先配置模型 provider。
|
||||
发布的 Web profile 自带宿主 Schedule 服务与自动化任务页面。在请求模型创建提醒前,先配置模型 provider。
|
||||
|
||||
`standard`、`cordis` 和 `ptc` preset 声明四个提醒工具与把当前时间和浏览器时区交给模型的时钟上下文,因此这些 preset 提供 `schedule_create`、`schedule_list`、`schedule_update` 和 `schedule_delete`;`minimal` preset 两者都不声明。被委派的子 agent 看不到这四个工具,因为三个 preset 的委派行已将其 deny;即使某个调用仍能到达工具,也会被拒绝。
|
||||
|
||||
向模型提出创建、列出、修改或删除提醒的请求。模型使用 `schedule_create`、`schedule_list`、`schedule_update` 和 `schedule_delete`(更新原地修改一条提醒,保留其 id 与已保存的投递记录);「自动化任务」页面的「新建」操作则为创建打开一个新会话,其 composer 已写好该请求。支持正整数秒的一次性延迟、绝对日期时间、至少一分钟的固定间隔、带 IANA 时区的每日本地时间、带 IANA 时区和 ISO 星期(周一 1 至周日 7)的每周本地时间,以及带显式 IANA 时区的五字段 cron 表达式(表达式以规范化形式保存)。
|
||||
|
||||
|
||||
@@ -214,7 +214,6 @@ export const OPTIONAL_BUNDLES: readonly string[] = [
|
||||
'@deepseek-ai/dsh-experimental-agent-team-profile',
|
||||
'@deepseek-ai/dsh-experimental-voice-input-bundle',
|
||||
'@deepseek-ai/dsh-experimental-auto-review',
|
||||
'@deepseek-ai/dsh-experimental-schedule-bundle',
|
||||
]
|
||||
|
||||
const PROFILE_PATCH_TEMPLATE = `# Your patch layer for this dsh profile, applied after every bundle layer:
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
en: b7ab01cfe9fed40f
|
||||
zh: 23703ab7727c3ab5
|
||||
/deepseek-ai-dsh-web-app/use-this-package/configuration:
|
||||
en: a93760e9e451faa6
|
||||
zh: 5dab82dd20aa952f
|
||||
en: 04ae40fa453d2cb5
|
||||
zh: 51df66e4100f5660
|
||||
/deepseek-ai-dsh-web-app/use-this-package/lan-access-and-trusted-hosts:
|
||||
en: 2522c806db384ddc
|
||||
zh: 7e96f11194af9f9f
|
||||
|
||||
@@ -55,7 +55,7 @@ Most users never set these; the command-line flags feed the four settings below
|
||||
| `surfaceContext` | `true` | Give the agent GUI-orientation context and expose `DSH_WEB_URL` to its shell commands |
|
||||
| `trustedHosts` | `[]` | Extra hosts allowed to reach the GUI from the network |
|
||||
|
||||
The generated [configuration catalog](../../../docs/config-catalog.md#deepseek-aidsh-web-app) is the exhaustive source for every accepted field and its JSDoc. The shipped composition carries no `time-context`, `schedule`, or `ui-schedule` row; the optional experimental bundle `@deepseek-ai/dsh-experimental-schedule-bundle` inserts those three rows from the Plugins page.
|
||||
The generated [configuration catalog](../../../docs/config-catalog.md#deepseek-aidsh-web-app) is the exhaustive source for every accepted field and its JSDoc. The shipped composition inserts the `schedule` service row and the `ui-schedule` task page row, while the clock reading and the four reminder tools belong to the `standard`, `cordis`, and `ptc` presets. The `tool-subagent` and `tool-subagent-fork` rows in those presets deny the four tools, so a delegated child's scope never lists them.
|
||||
|
||||
### LAN access and trusted hosts
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ dsh --profile web --no-open --port 8080
|
||||
| `surfaceContext` | `true` | 给 agent 提供 GUI 定位上下文,并把 `DSH_WEB_URL` 暴露给其 shell 命令 |
|
||||
| `trustedHosts` | `[]` | 允许从网络访问 GUI 的额外主机 |
|
||||
|
||||
生成的[配置目录](../../../docs/config-catalog.zh.md#deepseek-aidsh-web-app)是每个受支持字段及其 JSDoc 的穷尽式真源。 随发行版交付的组合不含 `time-context`、`schedule` 和 `ui-schedule` 行,可选实验性 bundle `@deepseek-ai/dsh-experimental-schedule-bundle` 可在插件管理页插入这三行。
|
||||
生成的[配置目录](../../../docs/config-catalog.zh.md#deepseek-aidsh-web-app)是每个受支持字段及其 JSDoc 的穷尽式真源。 随发行版交付的组合插入 `schedule` 服务行与 `ui-schedule` 任务页面行,时钟读数与四个提醒工具则属于 `standard`、`cordis` 与 `ptc` 三个 preset。这三个 preset 的 `tool-subagent` 与 `tool-subagent-fork` 两行都 deny 这四个工具,因此被委派子 agent 的作用域不会列出它们。
|
||||
|
||||
### LAN 访问与可信主机
|
||||
|
||||
|
||||
@@ -132,6 +132,13 @@
|
||||
- id: workspace-files
|
||||
name: '@deepseek-ai/dsh-api-workspace-files'
|
||||
|
||||
# The Schedule service owns the task store and delivers each due occurrence
|
||||
# as a follow-up in its original Session. The clock reading and the four
|
||||
# reminder tools belong to the `standard`, `cordis`, and `ptc` presets,
|
||||
# which declare them in their own scope.
|
||||
- id: schedule
|
||||
name: '@deepseek-ai/dsh-schedule'
|
||||
|
||||
# Configuration-surface reads and writes over Typert Remote. Each method
|
||||
# reports an actionable error when its settings-domain provider is absent.
|
||||
- id: ui-settings-account
|
||||
@@ -371,6 +378,11 @@
|
||||
- id: ui-jobs
|
||||
name: '@deepseek-ai/dsh-client-ui-jobs'
|
||||
|
||||
# Task management and Session reminder catalog over the Host Schedule
|
||||
# service mounted above.
|
||||
- id: ui-schedule
|
||||
name: '@deepseek-ai/dsh-client-ui-schedule'
|
||||
|
||||
# Goal surface: GoalBar in the input dock over the goal session projection.
|
||||
- id: ui-goal
|
||||
name: '@deepseek-ai/dsh-client-ui-goal'
|
||||
|
||||
@@ -92,6 +92,7 @@
|
||||
"@deepseek-ai/dsh-client-ui-reference": "workspace:*",
|
||||
"@deepseek-ai/dsh-client-ui-renderer": "workspace:*",
|
||||
"@deepseek-ai/dsh-client-ui-session": "workspace:*",
|
||||
"@deepseek-ai/dsh-client-ui-schedule": "workspace:*",
|
||||
"@deepseek-ai/dsh-client-ui-settings": "workspace:*",
|
||||
"@deepseek-ai/dsh-client-ui-settings-general": "workspace:*",
|
||||
"@deepseek-ai/dsh-client-ui-settings-models": "workspace:*",
|
||||
@@ -137,6 +138,7 @@
|
||||
"@deepseek-ai/dsh-persona": "workspace:*",
|
||||
"@deepseek-ai/dsh-plan-mode": "workspace:*",
|
||||
"@deepseek-ai/dsh-plugin-manager": "workspace:*",
|
||||
"@deepseek-ai/dsh-schedule": "workspace:*",
|
||||
"@deepseek-ai/dsh-session-log-export": "workspace:*",
|
||||
"@deepseek-ai/dsh-session-reference": "workspace:*",
|
||||
"@deepseek-ai/dsh-session-stats": "workspace:*",
|
||||
@@ -145,6 +147,7 @@
|
||||
"@deepseek-ai/dsh-subprocess": "workspace:*",
|
||||
"@deepseek-ai/dsh-terminal": "workspace:*",
|
||||
"@deepseek-ai/dsh-terminal-bash": "workspace:*",
|
||||
"@deepseek-ai/dsh-time-context": "workspace:*",
|
||||
"@deepseek-ai/dsh-tool-ask-user": "workspace:*",
|
||||
"@deepseek-ai/dsh-tool-bash": "workspace:*",
|
||||
"@deepseek-ai/dsh-tool-bash-persistent": "workspace:*",
|
||||
@@ -157,6 +160,7 @@
|
||||
"@deepseek-ai/dsh-tool-pwsh": "workspace:*",
|
||||
"@deepseek-ai/dsh-tool-pwsh-persistent": "workspace:*",
|
||||
"@deepseek-ai/dsh-tool-ralph": "workspace:*",
|
||||
"@deepseek-ai/dsh-tool-schedule": "workspace:*",
|
||||
"@deepseek-ai/dsh-tool-skill": "workspace:*",
|
||||
"@deepseek-ai/dsh-tool-subagent": "workspace:*",
|
||||
"@deepseek-ai/dsh-tool-subagent-control": "workspace:*",
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
name: '@deepseek-ai/dsh-agent-instructions'
|
||||
config:
|
||||
maxBytes: 65536
|
||||
- id: time-context
|
||||
name: '@deepseek-ai/dsh-time-context'
|
||||
- id: tool-bash
|
||||
name: '@deepseek-ai/dsh-tool-bash'
|
||||
disabled: !!js process.platform === 'win32'
|
||||
@@ -34,6 +36,8 @@
|
||||
sampleOverCapGlobResults: false
|
||||
- id: tool-jobs
|
||||
name: '@deepseek-ai/dsh-tool-jobs'
|
||||
- id: tool-schedule
|
||||
name: '@deepseek-ai/dsh-tool-schedule'
|
||||
- id: command-goal
|
||||
name: '@deepseek-ai/dsh-command-goal'
|
||||
- id: tool-goal
|
||||
@@ -93,12 +97,24 @@
|
||||
toolName: subagent
|
||||
modelSelectionSettings: true
|
||||
backgroundMode: continuable
|
||||
toolFilter:
|
||||
deny:
|
||||
- schedule_create
|
||||
- schedule_delete
|
||||
- schedule_list
|
||||
- schedule_update
|
||||
- id: tool-subagent-fork
|
||||
name: '@deepseek-ai/dsh-tool-subagent'
|
||||
config:
|
||||
provider: fork
|
||||
toolName: subagent_fork
|
||||
backgroundMode: continuable
|
||||
toolFilter:
|
||||
deny:
|
||||
- schedule_create
|
||||
- schedule_delete
|
||||
- schedule_list
|
||||
- schedule_update
|
||||
- id: tool-subagent-codex
|
||||
name: '@deepseek-ai/dsh-tool-subagent'
|
||||
disabled: true
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
name: '@deepseek-ai/dsh-agent-instructions'
|
||||
config:
|
||||
maxBytes: 65536
|
||||
- id: time-context
|
||||
name: '@deepseek-ai/dsh-time-context'
|
||||
- id: tool-bash
|
||||
name: '@deepseek-ai/dsh-tool-bash'
|
||||
disabled: !!js process.platform === 'win32'
|
||||
@@ -31,6 +33,8 @@
|
||||
sampleOverCapGlobResults: false
|
||||
- id: tool-jobs
|
||||
name: '@deepseek-ai/dsh-tool-jobs'
|
||||
- id: tool-schedule
|
||||
name: '@deepseek-ai/dsh-tool-schedule'
|
||||
- id: skill-filesystem
|
||||
name: '@deepseek-ai/dsh-skill-filesystem'
|
||||
- id: tool-skill
|
||||
@@ -94,12 +98,24 @@
|
||||
toolName: subagent
|
||||
modelSelectionSettings: true
|
||||
backgroundMode: continuable
|
||||
toolFilter:
|
||||
deny:
|
||||
- schedule_create
|
||||
- schedule_delete
|
||||
- schedule_list
|
||||
- schedule_update
|
||||
- id: tool-subagent-fork
|
||||
name: '@deepseek-ai/dsh-tool-subagent'
|
||||
config:
|
||||
provider: fork
|
||||
toolName: subagent_fork
|
||||
backgroundMode: continuable
|
||||
toolFilter:
|
||||
deny:
|
||||
- schedule_create
|
||||
- schedule_delete
|
||||
- schedule_list
|
||||
- schedule_update
|
||||
- id: tool-subagent-codex
|
||||
name: '@deepseek-ai/dsh-tool-subagent'
|
||||
disabled: true
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
name: '@deepseek-ai/dsh-agent-instructions'
|
||||
config:
|
||||
maxBytes: 65536
|
||||
- id: time-context
|
||||
name: '@deepseek-ai/dsh-time-context'
|
||||
- id: tool-bash
|
||||
name: '@deepseek-ai/dsh-tool-bash'
|
||||
disabled: !!js process.platform === 'win32'
|
||||
@@ -31,6 +33,8 @@
|
||||
sampleOverCapGlobResults: false
|
||||
- id: tool-jobs
|
||||
name: '@deepseek-ai/dsh-tool-jobs'
|
||||
- id: tool-schedule
|
||||
name: '@deepseek-ai/dsh-tool-schedule'
|
||||
- id: skill-filesystem
|
||||
name: '@deepseek-ai/dsh-skill-filesystem'
|
||||
- id: tool-skill
|
||||
@@ -94,12 +98,24 @@
|
||||
toolName: subagent
|
||||
modelSelectionSettings: true
|
||||
backgroundMode: continuable
|
||||
toolFilter:
|
||||
deny:
|
||||
- schedule_create
|
||||
- schedule_delete
|
||||
- schedule_list
|
||||
- schedule_update
|
||||
- id: tool-subagent-fork
|
||||
name: '@deepseek-ai/dsh-tool-subagent'
|
||||
config:
|
||||
provider: fork
|
||||
toolName: subagent_fork
|
||||
backgroundMode: continuable
|
||||
toolFilter:
|
||||
deny:
|
||||
- schedule_create
|
||||
- schedule_delete
|
||||
- schedule_list
|
||||
- schedule_update
|
||||
- id: tool-subagent-codex
|
||||
name: '@deepseek-ai/dsh-tool-subagent'
|
||||
disabled: true
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
en: d152484eb41ac6b4
|
||||
zh: 405b30feaf48c087
|
||||
/deepseek-ai-dsh-client-ui-schedule/use-this-package:
|
||||
en: b9f8449e78936e0d
|
||||
zh: 9822c7105d1ed04c
|
||||
en: c668e3d223102e47
|
||||
zh: efedf3996679fb17
|
||||
/deepseek-ai-dsh-client-ui-schedule/use-this-package/time-zone-data-source:
|
||||
en: 6bd6882dbbbefcb0
|
||||
zh: 03aa15f1a65d13dc
|
||||
|
||||
@@ -25,7 +25,7 @@ Manage active and inactive tasks from the Automation tasks page and the right Si
|
||||
<a id="use-this-package"></a>
|
||||
## Use this package
|
||||
|
||||
The shipped Web composition carries no `ui-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 `ui-schedule` with the Host Schedule service and the clock context that supplies the model's current time. The Automation tasks sidebar entry opens a global page without selecting or activating a Session. The page header's New action starts a new Session, where the reminder is created by asking the model; the page itself has no creation form. Its task list supports text search and one All, Enabled, and Inactive status filter row; search matches the stored task name, the instruction, and the internal Session id, not a resolved Session title, and the empty state keeps the heading's New action beside the notice. Selecting an active or inactive task opens a second detail level with Rules and Records tabs. Every list row shows the task's stored title with its status, frequency, and next run and never the original Session name; the detail's name control shows the stored title. Rules contains the complete reminder, status, next target for active tasks, original recurrence rule, and task id. Daily rule labels show the saved local time and exact stored IANA zone, preserving nonzero seconds and milliseconds rather than substituting the browser's zone. The Linked session entry in the detail tab strip names the linked Session by its catalog title, falling back to the Session id when no title is available. When the strip cannot fit the tab list beside the labelled entry, the entry becomes an icon button with the same button style as More task actions, with the Session chat icon and a Linked session tooltip that also shows while the entry is disabled; the entry keeps focus when it switches layouts; the tab list scrolls without a visible scrollbar. It opens an available, unarchived Session after metadata loads; pending Session or Workspace metadata, an archived Session, missing Session membership, or a Workspace query error keeps it disabled with an explanation. The click rechecks availability; browsing does not unarchive the Session. Only this action requests Session activation. Deletion is available from the More task actions menu in the detail's top strip, separate from navigation.
|
||||
The shipped Web composition mounts `ui-schedule` with the Host Schedule service. The clock context that supplies the model's current time is preset-owned: `standard`, `cordis`, and `ptc` declare it, and `minimal` declares neither it nor the reminder tools. The Automation tasks sidebar entry opens a global page without selecting or activating a Session. The page header's New action starts a new Session, where the reminder is created by asking the model; the page itself has no creation form. Its task list supports text search and one All, Enabled, and Inactive status filter row; search matches the stored task name, the instruction, and the internal Session id, not a resolved Session title, and the empty state keeps the heading's New action beside the notice. Selecting an active or inactive task opens a second detail level with Rules and Records tabs. Every list row shows the task's stored title with its status, frequency, and next run and never the original Session name; the detail's name control shows the stored title. Rules contains the complete reminder, status, next target for active tasks, original recurrence rule, and task id. Daily rule labels show the saved local time and exact stored IANA zone, preserving nonzero seconds and milliseconds rather than substituting the browser's zone. The Linked session entry in the detail tab strip names the linked Session by its catalog title, falling back to the Session id when no title is available. When the strip cannot fit the tab list beside the labelled entry, the entry becomes an icon button with the same button style as More task actions, with the Session chat icon and a Linked session tooltip that also shows while the entry is disabled; the entry keeps focus when it switches layouts; the tab list scrolls without a visible scrollbar. It opens an available, unarchived Session after metadata loads; pending Session or Workspace metadata, an archived Session, missing Session membership, or a Workspace query error keeps it disabled with an explanation. The click rechecks availability; browsing does not unarchive the Session. Only this action requests Session activation. Deletion is available from the More task actions menu in the detail's top strip, separate from navigation.
|
||||
|
||||
Selecting a task from the list opens Rules; refreshing that task preserves the selected tab. Rules edits an active task's name, instruction, and run time; the edits stay in a local draft until saved, and inactive tasks remain read-only. Unmodified Left/Right arrows cycle the tabs, Home/End select the first/last tab, and keyboard focus follows the selection. The tabs do not consume these keys with Alt, Ctrl, Meta, or Shift. The linked-Session control in the detail tab strip stays available on the Rules tab, and confirmed deletion is available from either view.
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ kind: "package-reference"
|
||||
<a id="use-this-package"></a>
|
||||
## 使用本包
|
||||
|
||||
随发行版交付的 Web 组合不含 `ui-schedule` 行;在插件管理页的“官方”分组中启用可选实验性 bundle `@deepseek-ai/dsh-experimental-schedule-bundle`,或把它列进 profile 的 `dsh.profile.bundles`,即可插入 `ui-schedule` 并将它与 Host Schedule 服务、以及为模型提供当前时间的时钟上下文一起挂载。侧栏的自动化任务入口打开全局页面,不选择或激活会话。页面页头的“新建”操作会打开一个新会话,提醒由模型在该会话中创建;页面本身没有创建表单。列表支持文本搜索和一行“全部/已开启/未运行”状态筛选;搜索匹配任务已存储的名称、指令和内部会话 id,不匹配解析出的会话标题,空状态在提示旁保留页头的“新建”操作。选择活动或未运行任务后,进入含“规则”和“任务运行记录”页签的第二层详情。每条列表行显示任务已存储的标题及其状态、频率和下次运行,不显示原会话名称;详情中的名称输入框显示任务已存储的标题。“规则”显示完整提醒、状态、活动任务的下一目标时间、原始重复规则和任务 id。每天的规则标签显示已保存的本地时间与精确的存储 IANA 时区,保留非零秒与毫秒,而不替换为浏览器时区。详情页签条内的“关联会话”入口按会话标题显示,取不到标题时回退显示会话 id。页签条放不下页签列表和带文字的入口时,入口收为与“更多任务操作”同样式的图标按钮,使用会话对话图标,悬停提示“关联会话”,入口禁用时也会显示;切换形态时保留焦点;页签列表可滚动但不显示滚动条。元数据加载后,它可打开可用且未归档的会话;会话或 Workspace 元数据尚未就绪、会话已归档、会话不在列表中或 Workspace 查询失败时,入口保持禁用并显示原因。点击时会重新检查可用性;浏览不会取消会话归档。仅此操作请求激活会话。删除位于详情顶部条带的“更多任务操作”菜单。
|
||||
随发行版交付的 Web 组合把 `ui-schedule` 与 Host Schedule 服务一起挂载。为模型提供当前时间的时钟上下文归 preset 所有:`standard`、`cordis` 与 `ptc` 声明它,`minimal` 既不声明它,也不声明提醒工具。侧栏的自动化任务入口打开全局页面,不选择或激活会话。页面页头的“新建”操作会打开一个新会话,提醒由模型在该会话中创建;页面本身没有创建表单。列表支持文本搜索和一行“全部/已开启/未运行”状态筛选;搜索匹配任务已存储的名称、指令和内部会话 id,不匹配解析出的会话标题,空状态在提示旁保留页头的“新建”操作。选择活动或未运行任务后,进入含“规则”和“任务运行记录”页签的第二层详情。每条列表行显示任务已存储的标题及其状态、频率和下次运行,不显示原会话名称;详情中的名称输入框显示任务已存储的标题。“规则”显示完整提醒、状态、活动任务的下一目标时间、原始重复规则和任务 id。每天的规则标签显示已保存的本地时间与精确的存储 IANA 时区,保留非零秒与毫秒,而不替换为浏览器时区。详情页签条内的“关联会话”入口按会话标题显示,取不到标题时回退显示会话 id。页签条放不下页签列表和带文字的入口时,入口收为与“更多任务操作”同样式的图标按钮,使用会话对话图标,悬停提示“关联会话”,入口禁用时也会显示;切换形态时保留焦点;页签列表可滚动但不显示滚动条。元数据加载后,它可打开可用且未归档的会话;会话或 Workspace 元数据尚未就绪、会话已归档、会话不在列表中或 Workspace 查询失败时,入口保持禁用并显示原因。点击时会重新检查可用性;浏览不会取消会话归档。仅此操作请求激活会话。删除位于详情顶部条带的“更多任务操作”菜单。
|
||||
|
||||
从列表选择任务时默认打开“规则”;刷新同一任务会保留当前页签。活动任务的“规则”修改名称、指令和运行时间;这些修改保留在本地草稿中直到保存,未运行任务保持只读。不带修饰键的左右方向键循环切换页签,Home/End 选择第一个/最后一个页签,键盘焦点随选择移动。页签不会拦截这些键与 Alt、Ctrl、Meta 或 Shift 的组合。共用的会话入口位于详情页签条内,在“规则”页签可见;确认删除操作在两种页签下都可用。
|
||||
|
||||
|
||||
@@ -84,6 +84,7 @@ export const en = {
|
||||
'timing.conflict': 'This task changed while you were editing. Your draft is retained. '
|
||||
+ 'Cancel and reopen after refresh to edit the latest rule.',
|
||||
'timing.notFound': 'This task is no longer available. Your draft is retained; cancel to close the editor.',
|
||||
'timing.subagentSession': 'This session belongs to a sub-agent, which never receives delivered reminders.',
|
||||
'timing.invalid': 'Enter a valid date and time, or check the timing fields.',
|
||||
'timing.invalidZone': 'Enter a valid IANA time zone, for example Asia/Shanghai.',
|
||||
'timing.notFuture': 'Choose a date and time in the future.',
|
||||
@@ -226,6 +227,7 @@ export const zh: Record<TaskManagerKey, string> = {
|
||||
'timing.inactive': '已结束的任务为只读,无法修改时间',
|
||||
'timing.conflict': '编辑期间任务已变化,草稿已保留。请在刷新后取消并重新打开编辑器,以修改最新规则',
|
||||
'timing.notFound': '此任务当前不可用,草稿已保留。请取消以关闭编辑器',
|
||||
'timing.subagentSession': '此会话属于子 agent,永远不会收到投递的提醒',
|
||||
'timing.invalid': '请输入有效的日期和时间,或检查时间字段',
|
||||
'timing.invalidZone': '请输入有效的 IANA 时区,例如 Asia/Shanghai',
|
||||
'timing.notFuture': '请选择未来的日期和时间',
|
||||
|
||||
@@ -189,6 +189,7 @@ export function timingError(code: Extract<ScheduleUpdateResult, { code: string }
|
||||
case 'schedule_conflict': return 'timing.conflict'
|
||||
case 'schedule_ended': return 'timing.inactive'
|
||||
case 'schedule_not_found': return 'timing.notFound'
|
||||
case 'subagent_session': return 'timing.subagentSession'
|
||||
case 'invalid_time_zone': return 'timing.invalidZone'
|
||||
case 'not_future': return 'timing.notFuture'
|
||||
case 'frequency_too_high': return 'timing.invalidInterval'
|
||||
|
||||
@@ -2933,6 +2933,24 @@ describe('Task detail rule header and run-time card', () => {
|
||||
expect(screen.getByRole('alert').textContent).toBe(en['rule.error.conflict'])
|
||||
})
|
||||
|
||||
it('explains a subagent-owned Session through the ordinary update result', async () => {
|
||||
const h = mount({ records: [cron] })
|
||||
fireEvent.click(screen.getByRole('button', { name: cron.prompt }))
|
||||
h.updateTiming.mockResolvedValue({
|
||||
ok: true,
|
||||
value: { code: 'subagent_session', message: 'This Session belongs to subagent routing.' },
|
||||
})
|
||||
chooseCronShape(en['rule.cronLabel'])
|
||||
fireEvent.change(screen.getByLabelText<HTMLInputElement>(en['rule.cronLabel']), {
|
||||
target: { value: '*/15 * * * *' },
|
||||
})
|
||||
clickSave()
|
||||
await act(async () => { await h.updateTiming.mock.results[0]!.value })
|
||||
// The refusal arrives as an ordinary non-mutating result, so the editor
|
||||
// names the reason instead of falling back to `rule.error.unknown`.
|
||||
expect(screen.getByRole('alert').textContent).toBe(en['timing.subagentSession'])
|
||||
})
|
||||
|
||||
it.each([en, zh])('renders a catalog cron rule with its shape rows, preview, zone, and next run', (dictionary) => {
|
||||
mount({ records: [cron] }, dictionary)
|
||||
fireEvent.click(screen.getByRole('button', { name: cron.prompt }))
|
||||
|
||||
@@ -174,6 +174,7 @@ describe('timingError', () => {
|
||||
['schedule_conflict', 'timing.conflict'],
|
||||
['schedule_ended', 'timing.inactive'],
|
||||
['schedule_not_found', 'timing.notFound'],
|
||||
['subagent_session', 'timing.subagentSession'],
|
||||
['invalid_time_zone', 'timing.invalidZone'],
|
||||
['not_future', 'timing.notFuture'],
|
||||
['frequency_too_high', 'timing.invalidInterval'],
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
en: ec051915b3d81cda
|
||||
zh: 3a0ef832e3a5e419
|
||||
/deepseek-ai-dsh-time-context/summary:
|
||||
en: d152f34674644f83
|
||||
zh: 5521772386c3737e
|
||||
en: d28b1e42b7fb9f84
|
||||
zh: 729afbd7a4510c1b
|
||||
/deepseek-ai-dsh-time-context/table-of-contents:
|
||||
en: d152484eb41ac6b4
|
||||
zh: 09388d293f9be9cb
|
||||
/deepseek-ai-dsh-time-context/use-this-package:
|
||||
en: dedd1cdaec7140f1
|
||||
zh: 9399f5b677ff8f34
|
||||
en: 0289a0503ae95934
|
||||
zh: 8aa8e24f9fcba4f4
|
||||
/deepseek-ai-dsh-time-context/use-this-package/what-the-model-gets:
|
||||
en: 104b5d5609b00f33
|
||||
zh: f6115b4eaa24bda7
|
||||
|
||||
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
|
||||
|
||||
## Summary
|
||||
|
||||
`dsh-time-context` gives the model a clock: on eligible steps it appends a durable, source-attributed reading with the current time, the browser zone attached to the open request, and the elapsed time since the preceding model-visible message. It helps the model interpret otherwise-unqualified dates and times in the user's browser zone, and tells it to ask when current-turn browser zones are mixed or missing. The shipped Web composition carries no row for it; the optional `@deepseek-ai/dsh-experimental-schedule-bundle` inserts and mounts it with Schedule from the Plugins page. Readings default to a 10-minute minimum interval; `refreshIntervalMs: 0` injects at every eligible step.
|
||||
`dsh-time-context` gives the model a clock: on eligible steps it appends a durable, source-attributed reading with the current time, the browser zone attached to the open request, and the elapsed time since the preceding model-visible message. It helps the model interpret otherwise-unqualified dates and times in the user's browser zone, and tells it to ask when current-turn browser zones are mixed or missing. The shipped Web composition carries no row for it; `standard`, `cordis`, and `ptc` declare it. Readings default to a 10-minute minimum interval; `refreshIntervalMs: 0` injects at every eligible step.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
@@ -25,7 +25,7 @@ English | [中文](README.zh.md)
|
||||
<a id="use-this-package"></a>
|
||||
## Use this package
|
||||
|
||||
Mount this plugin when the model should interpret unqualified dates and times in the user's zone, and when a request-local browser zone is available or a configured fallback is acceptable. Each injection is one additional user-role message in the durable history; schedule it with `refreshIntervalMs` when per-step readings are more than the conversation needs.
|
||||
Mount this plugin when the model should interpret unqualified dates and times in the user's zone, and when a request-local browser zone is available or a configured fallback is acceptable. Each injection is one additional user-role message in the durable history; schedule it with `refreshIntervalMs` when per-step readings are more than the conversation needs. The shipped Web composition carries no Host `time-context` row, and the `standard`, `cordis`, and `ptc` presets declare it beside the reminder tools that consume it, while `minimal` declares neither.
|
||||
|
||||
### What the model gets
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ kind: "package-reference"
|
||||
|
||||
## 概述
|
||||
|
||||
`dsh-time-context` 给模型一只时钟:在符合条件的步骤上,它追加一条持久、带来源的读数,包含当前时间、附加到当前开放请求的浏览器时区,以及自前一条模型可见消息以来的经过时长。它帮助模型按用户的浏览器时区解释未明确限定时区的日期与时间;时区来源混杂或缺失时,它告诉模型去询问。随发行版交付的 Web 组合不含该行;可选的 `@deepseek-ai/dsh-experimental-schedule-bundle` 在插件管理页会插入它并随 Schedule 一起挂载。读数默认采用 10 分钟的最小间隔;`refreshIntervalMs: 0` 会在每个符合条件的步骤注入。
|
||||
`dsh-time-context` 给模型一只时钟:在符合条件的步骤上,它追加一条持久、带来源的读数,包含当前时间、附加到当前开放请求的浏览器时区,以及自前一条模型可见消息以来的经过时长。它帮助模型按用户的浏览器时区解释未明确限定时区的日期与时间;时区来源混杂或缺失时,它告诉模型去询问。随发行版交付的 Web 组合不含该行;`standard`、`cordis` 与 `ptc` 声明它。读数默认采用 10 分钟的最小间隔;`refreshIntervalMs: 0` 会在每个符合条件的步骤注入。
|
||||
|
||||
## 目录
|
||||
|
||||
@@ -25,7 +25,7 @@ kind: "package-reference"
|
||||
<a id="use-this-package"></a>
|
||||
## 使用本包
|
||||
|
||||
当模型需要按用户所在时区解释未限定的日期与时间,且请求本地浏览器时区可用或已配置的回退值可接受时,挂载此插件。每次注入都是持久历史中额外的一条 user 角色消息;当按步骤读数超出对话需要时,用 `refreshIntervalMs` 调度。
|
||||
当模型需要按用户所在时区解释未限定的日期与时间,且请求本地浏览器时区可用或已配置的回退值可接受时,挂载此插件。每次注入都是持久历史中额外的一条 user 角色消息;当按步骤读数超出对话需要时,用 `refreshIntervalMs` 调度。随发行版交付的 Web 组合不含宿主 `time-context` 行,由 `standard`、`cordis` 与 `ptc` preset 把它声明在消费它的提醒工具旁,而 `minimal` 两者都不声明。
|
||||
|
||||
### 模型能得到什么
|
||||
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
en: 18bc48bb66b3e516
|
||||
zh: 51f2340a5c921f36
|
||||
/packages-experimental/summary:
|
||||
en: 882aada84ecc5413
|
||||
zh: daedbca3726e6ac2
|
||||
en: 9341a408afcd5dfa
|
||||
zh: 07541055b5f41ff8
|
||||
/packages-experimental/table-of-contents:
|
||||
en: 1eb35b015a6c423f
|
||||
zh: a8a3dceee2c9e943
|
||||
/packages-experimental/packages:
|
||||
en: a64c1a1461fcad89
|
||||
zh: 8a54ffde7c24af47
|
||||
en: ad10945dac9dbb51
|
||||
zh: 245b454406ce99f8
|
||||
/packages-experimental/related-documentation:
|
||||
en: 31282a28dd828c81
|
||||
zh: ebb1d3cacdc1bd6d
|
||||
|
||||
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
|
||||
|
||||
## Summary
|
||||
|
||||
The experimental group contains prototype capabilities whose contracts can change and carry no support promise. All current packages publish under their `@deepseek-ai/dsh-experimental-*` names, including the opt-in Agent Teams composition, Auto review, Cua Driver providers, browser-use backends, cross-realm Inspector, CPython PTC backend, and browser-worker preview libraries. Released products outside this group must not depend on experimental packages. The dsh installation ships the Agent Teams, voice input, Auto review, and Schedule packages as optional bundles switched on from the Web sidebar's Plugins page ([decision](../../.agents/notes/implemented/architecture/2026-09-21-experimental-capabilities-as-optional-bundles.md)); the other packages are libraries or explicit compositions.
|
||||
The experimental group contains prototype capabilities whose contracts can change and carry no support promise. All current packages publish under their `@deepseek-ai/dsh-experimental-*` names, including the opt-in Agent Teams composition, Auto review, Cua Driver providers, browser-use backends, cross-realm Inspector, CPython PTC backend, and browser-worker preview libraries. Released products outside this group must not depend on experimental packages. The dsh installation ships the Agent Teams, voice input, and Auto review packages as optional bundles switched on from the Web sidebar's Plugins page ([decision](../../.agents/notes/implemented/architecture/2026-09-21-experimental-capabilities-as-optional-bundles.md)); the other packages are libraries or explicit compositions.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
@@ -33,7 +33,6 @@ The experimental group contains prototype capabilities whose contracts can chang
|
||||
| [`agent-team`](agent-team/README.md) | Named teammates with durable messages and a shared task board | `ctx.agentTeams` |
|
||||
| [`client-ui-agent-team`](client-ui-agent-team/README.md) | Team roster, task board, and teammate navigation for Web | — |
|
||||
| [`auto-review`](auto-review/README.md) | Explicit Web layer for same-model review before each native or PTC inner tool call | — |
|
||||
| [`schedule-bundle`](schedule-bundle/README.md) | Optional Schedule, task page, and time context for the shipped Web composition | — |
|
||||
| [`ptc-runtime-python`](ptc-runtime-python/README.md) | CPython subprocess backend for the PTC execution seam | `ctx.ptcRuntime` |
|
||||
| [`computer-use-cua-driver-mcp`](computer-use-cua-driver-mcp/README.md) | Use an installed Cua Driver through MCP | `ctx.computerUse` |
|
||||
| [`computer-use-cua-driver-native`](computer-use-cua-driver-native/README.md) | Embed the Cua Driver native npm runtime | `ctx.computerUse` |
|
||||
|
||||
@@ -9,7 +9,7 @@ kind: "package-group"
|
||||
|
||||
## 概述
|
||||
|
||||
实验组包含约定可能变更且不提供支持承诺的原型能力。所有当前包都以 `@deepseek-ai/dsh-experimental-*` 名称发布,包括显式启用的 Agent Teams 组合、Auto review、Cua Driver 提供方、浏览器操作后端、跨 realm Inspector、CPython PTC 后端与浏览器 worker 预览库。组外已发布产品不得依赖实验性包。dsh 安装将 Agent Teams、语音输入、Auto review 与定时包作为可选 bundle 一起发布,可从 Web 侧边栏“插件”页启用([决策](../../.agents/notes/implemented/architecture/2026-09-21-experimental-capabilities-as-optional-bundles.zh.md));其余包是库或显式组合。
|
||||
实验组包含约定可能变更且不提供支持承诺的原型能力。所有当前包都以 `@deepseek-ai/dsh-experimental-*` 名称发布,包括显式启用的 Agent Teams 组合、Auto review、Cua Driver 提供方、浏览器操作后端、跨 realm Inspector、CPython PTC 后端与浏览器 worker 预览库。组外已发布产品不得依赖实验性包。dsh 安装将 Agent Teams、语音输入与 Auto review 包作为可选 bundle 一起发布,可从 Web 侧边栏“插件”页启用([决策](../../.agents/notes/implemented/architecture/2026-09-21-experimental-capabilities-as-optional-bundles.zh.md));其余包是库或显式组合。
|
||||
|
||||
## 目录
|
||||
|
||||
@@ -33,7 +33,6 @@ kind: "package-group"
|
||||
| [`agent-team`](agent-team/README.zh.md) | 具名 teammate,成员之间持久消息与共享任务板 | `ctx.agentTeams` |
|
||||
| [`client-ui-agent-team`](client-ui-agent-team/README.zh.md) | Web Team roster、任务板与 teammate 导航 | — |
|
||||
| [`auto-review`](auto-review/README.zh.md) | 显式 Web 层,在每个原生或 PTC inner 工具调用前使用同一模型审查 | — |
|
||||
| [`schedule-bundle`](schedule-bundle/README.zh.md) | 为出厂 Web 组合按需加入定时服务、任务页面与时间上下文 | — |
|
||||
| [`ptc-runtime-python`](ptc-runtime-python/README.zh.md) | PTC 执行 seam 的 CPython 子进程后端 | `ctx.ptcRuntime` |
|
||||
| [`computer-use-cua-driver-mcp`](computer-use-cua-driver-mcp/README.zh.md) | 通过 MCP 使用已安装的 Cua Driver | `ctx.computerUse` |
|
||||
| [`computer-use-cua-driver-native`](computer-use-cua-driver-native/README.zh.md) | 嵌入 Cua Driver 原生 npm 运行时 | `ctx.computerUse` |
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
# Bilingual-pair consistency record for README.md (docs/i18n/README.md): per heading
|
||||
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
|
||||
# After editing either side, bring the other along and re-record with:
|
||||
# pnpm run verify-translation-pairing --write packages/experimental/schedule-bundle/README.md
|
||||
/:
|
||||
en: 06ac0f83120e2636
|
||||
zh: 24407e82f408f03c
|
||||
/deepseek-ai-dsh-experimental-schedule-bundle:
|
||||
en: d7b8b6126df4e3c4
|
||||
zh: 546d528efd4edbde
|
||||
/deepseek-ai-dsh-experimental-schedule-bundle/summary:
|
||||
en: cd6bb19197192724
|
||||
zh: 983a579ee54aa098
|
||||
/deepseek-ai-dsh-experimental-schedule-bundle/table-of-contents:
|
||||
en: d152484eb41ac6b4
|
||||
zh: 364c80ee00a374ff
|
||||
/deepseek-ai-dsh-experimental-schedule-bundle/use-this-package:
|
||||
en: 632033572617d7bc
|
||||
zh: b2a050e68cf3f3e1
|
||||
/deepseek-ai-dsh-experimental-schedule-bundle/understand-the-implementation:
|
||||
en: fce278be320c1ade
|
||||
zh: 8f81ac0154ea01a1
|
||||
/deepseek-ai-dsh-experimental-schedule-bundle/further-exploration:
|
||||
en: c66c056c527188f1
|
||||
zh: 2781b2ff3420c319
|
||||
/deepseek-ai-dsh-experimental-schedule-bundle/model-experience:
|
||||
en: 215e7ba838619b7b
|
||||
zh: a311da3843709f90
|
||||
/deepseek-ai-dsh-experimental-schedule-bundle/model-experience/reminder-tools-and-clock-readings:
|
||||
en: c7fec3a37d945018
|
||||
zh: 164346dc63d188dd
|
||||
/deepseek-ai-dsh-experimental-schedule-bundle/model-experience/reminder-tools-and-clock-readings/what-the-model-sees:
|
||||
en: fb1906621d02c594
|
||||
zh: 394dc933ed63b349
|
||||
/deepseek-ai-dsh-experimental-schedule-bundle/model-experience/reminder-tools-and-clock-readings/token-effect:
|
||||
en: 7c44bfc062010b7b
|
||||
zh: 15f431db31ad53eb
|
||||
/deepseek-ai-dsh-experimental-schedule-bundle/model-experience/reminder-tools-and-clock-readings/kv-cache-effect:
|
||||
en: 0b01d8c40b422f5b
|
||||
zh: 57fede4db59a62b8
|
||||
/deepseek-ai-dsh-experimental-schedule-bundle/known-limitations-and-deferred-work:
|
||||
en: 6c0599acfe520c6a
|
||||
zh: 69063300060b5785
|
||||
/deepseek-ai-dsh-experimental-schedule-bundle/known-limitations-and-deferred-work/dev-note:
|
||||
en: 0225ba087c5266f3
|
||||
zh: 4e706f1b2b984e63
|
||||
@@ -1,95 +0,0 @@
|
||||
---
|
||||
description: "Add Schedule, its reminder catalog, and the Automation tasks page from the plugin manager."
|
||||
kind: "package-bundle"
|
||||
---
|
||||
|
||||
# @deepseek-ai/dsh-experimental-schedule-bundle
|
||||
|
||||
English | [中文](README.zh.md)
|
||||
|
||||
## Summary
|
||||
|
||||
This optional bundle inserts the three Schedule rows the shipped Web composition leaves out: `time-context`, `schedule`, and `ui-schedule`. Shipped profiles leave it switched off.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [Use this package](#use-this-package)
|
||||
- [Understand the implementation](#understand-the-implementation)
|
||||
- [Further Exploration](#further-exploration)
|
||||
- [Model Experience](#model-experience)
|
||||
- [Known Limitations and Deferred Work](#known-limitations-and-deferred-work)
|
||||
- [Dev Note](#dev-note)
|
||||
|
||||
-----
|
||||
|
||||
<a id="use-this-package"></a>
|
||||
## Use this package
|
||||
|
||||
Open Plugins in the Web sidebar and enable Automation tasks, marked by an alarm clock icon. A live root Agent then receives `schedule_create`, `schedule_list`, `schedule_update`, and `schedule_delete`, the Session header shows its reminder catalog, the sidebar's Automation tasks entry opens the task-management page and the right Sidebar holds the selected task's detail, and each eligible step appends one clock reading with the current time, the browser zone attached to the open request, and the elapsed time since the preceding model-visible message. The bundle's page lists Time awareness, Task scheduling, and Task interface with their state. Disabling the bundle restores the shipped composition; stored tasks remain on disk.
|
||||
|
||||
-----
|
||||
|
||||
<a id="understand-the-implementation"></a>
|
||||
## Understand the implementation
|
||||
|
||||
<details>
|
||||
<summary>Maintainer details — click to expand</summary>
|
||||
|
||||
`cordis.patch.yml` inserts the three rows, and `package.json` depends on their packages so each row resolves from this bundle. `OPTIONAL_BUNDLES` in `packages/boot/app-boot/src/profile.ts` names this package and `apps/cli` depends on it, so every installation ships it switched off and the plugin manager offers it in the Official group. Selecting it appends the bundle to the profile's `dsh.profile.bundles` list. No runtime invariant companion is published because this configuration-only package owns no mutable runtime state.
|
||||
|
||||
| File | Role |
|
||||
|---|---|
|
||||
| [`cordis.patch.yml`](cordis.patch.yml) | Inserts the `time-context`, `schedule`, and `ui-schedule` rows |
|
||||
| [`package.json`](package.json) | The row packages as dependencies |
|
||||
| [`locale/en.json`](locale/en.json), [`locale/zh.json`](locale/zh.json) | Plugin-manager title and description |
|
||||
| [`icon.svg`](icon.svg) | Plugin-manager icon |
|
||||
| [`src/index.ts`](src/index.ts) | Empty module entry; the patch is the runtime content |
|
||||
|
||||
</details>
|
||||
|
||||
-----
|
||||
|
||||
<a id="further-exploration"></a>
|
||||
## Further Exploration
|
||||
|
||||
- [Schedule subsystem](../../../docs/subsystems/schedule.md) — durable tasks, occurrence resolution, and delivery.
|
||||
- [Schedule service](../../schedule/schedule/README.md) — Host task storage, activation, and the record format.
|
||||
- [Web bundle](../../bundle/web-app/README.md) — the composition this bundle adds the rows to.
|
||||
|
||||
-----
|
||||
|
||||
<a id="model-experience"></a>
|
||||
## Model Experience
|
||||
|
||||
### Reminder tools and clock readings
|
||||
|
||||
#### What the model sees
|
||||
|
||||
A live root Agent gains `schedule_create`, `schedule_list`, `schedule_update`, and `schedule_delete`. `time-context` appends one durable user message per eligible step carrying the sampled instant, the browser zone attached to the open request, and the elapsed time since the preceding model-visible message.
|
||||
|
||||
#### Token effect
|
||||
|
||||
Selecting the bundle adds four Schedule tool schemas to every live root Agent request and one durable clock reading per eligible step; a conversation that never creates a reminder pays both.
|
||||
|
||||
#### KV Cache effect
|
||||
|
||||
The tool schemas change the request prefix once when the bundle mounts; each appended reading is new visible content after that prefix, so existing entries are not invalidated.
|
||||
|
||||
## Known Limitations and Deferred Work
|
||||
|
||||
<a id="known-limitations-and-deferred-work"></a>
|
||||
|
||||
- While the bundle is on, its page offers a switch per row, as for every bundle. The three rows work only together: switching `schedule` off leaves the task page without its service, and switching `time-context` off leaves the model without the current time for new reminders.
|
||||
- A profile patch or `--patch` overlay that targets `time-context`, `schedule`, or `ui-schedule` by id matches no row while this bundle is not selected: the loader warns `patch: entry <id> not found` for each such patch. Select this bundle instead of switching the rows on by id.
|
||||
|
||||
-----
|
||||
|
||||
<a id="dev-note"></a>
|
||||
### Dev Note
|
||||
|
||||
<details>
|
||||
<summary>Maintainer details — click to expand</summary>
|
||||
|
||||
None.
|
||||
|
||||
</details>
|
||||
@@ -1,95 +0,0 @@
|
||||
---
|
||||
description: "从插件管理页加入定时服务、提醒目录与自动化任务页面。"
|
||||
kind: "package-bundle"
|
||||
---
|
||||
|
||||
# @deepseek-ai/dsh-experimental-schedule-bundle
|
||||
|
||||
[English](README.md) | 中文
|
||||
|
||||
## 概述
|
||||
|
||||
此可选 Bundle 插入随发行版交付的 Web 组合所不含的三个定时条目:`time-context`、`schedule` 与 `ui-schedule`。随包配置默认禁用。
|
||||
|
||||
## 目录
|
||||
|
||||
- [使用此包](#use-this-package)
|
||||
- [理解实现](#understand-the-implementation)
|
||||
- [进一步探索](#further-exploration)
|
||||
- [模型体验](#model-experience)
|
||||
- [已知限制与后续工作](#known-limitations-and-deferred-work)
|
||||
- [开发备注](#dev-note)
|
||||
|
||||
-----
|
||||
|
||||
<a id="use-this-package"></a>
|
||||
## 使用此包
|
||||
|
||||
打开 Web 侧栏的插件管理页并启用带闹钟图标的“自动化任务”。此后,活跃的根智能体获得 `schedule_create`、`schedule_list`、`schedule_update` 与 `schedule_delete`,会话头部显示提醒目录,侧栏的自动化任务入口打开任务管理页面、右侧栏承载所选任务的详情,每个符合条件的步骤追加一条时钟读数,包含当前时间、打开请求所带的浏览器时区,以及距上一条模型可见消息的经过时间。此 Bundle 的页面列出时间感知、任务调度与任务界面及其状态。禁用此 Bundle 会恢复随包组合;已存储的任务保留在磁盘上。
|
||||
|
||||
-----
|
||||
|
||||
<a id="understand-the-implementation"></a>
|
||||
## 理解实现
|
||||
|
||||
<details>
|
||||
<summary>维护者信息 — 点击展开</summary>
|
||||
|
||||
`cordis.patch.yml` 插入这三个条目,`package.json` 依赖它们的包,使每个条目都从此 Bundle 解析。`packages/boot/app-boot/src/profile.ts` 的 `OPTIONAL_BUNDLES` 列出此包,`apps/cli` 依赖它,因此每次安装都随包携带且默认禁用,插件管理页在“官方”分组中提供它。选中后会把该 Bundle 追加到 profile 的 `dsh.profile.bundles` 列表。此纯配置包不拥有可变的运行时状态,因此不发布不变量伴随模块。
|
||||
|
||||
| 文件 | 作用 |
|
||||
|---|---|
|
||||
| [`cordis.patch.yml`](cordis.patch.yml) | 插入 `time-context`、`schedule` 与 `ui-schedule` 三个条目 |
|
||||
| [`package.json`](package.json) | 以依赖声明这些条目的包 |
|
||||
| [`locale/en.json`](locale/en.json)、[`locale/zh.json`](locale/zh.json) | 插件管理页的标题与描述 |
|
||||
| [`icon.svg`](icon.svg) | 插件管理页图标 |
|
||||
| [`src/index.ts`](src/index.ts) | 空的模块入口;补丁即运行时内容 |
|
||||
|
||||
</details>
|
||||
|
||||
-----
|
||||
|
||||
<a id="further-exploration"></a>
|
||||
## 进一步探索
|
||||
|
||||
- [定时子系统](../../../docs/subsystems/schedule.zh.md) — 持久任务、发生时刻解析与投递。
|
||||
- [定时服务](../../schedule/schedule/README.zh.md) — Host 任务存储、激活与记录格式。
|
||||
- [Web Bundle](../../bundle/web-app/README.zh.md) — 此 Bundle 向其加入这些条目的组合。
|
||||
|
||||
-----
|
||||
|
||||
<a id="model-experience"></a>
|
||||
## 模型体验
|
||||
|
||||
### 提醒工具与时钟读数
|
||||
|
||||
#### 模型看到的内容
|
||||
|
||||
活跃的根智能体获得 `schedule_create`、`schedule_list`、`schedule_update` 与 `schedule_delete`。`time-context` 在每个符合条件的步骤追加一条持久用户消息,携带采样时刻、打开请求所带的浏览器时区,以及距上一条模型可见消息的经过时间。
|
||||
|
||||
#### Token 影响
|
||||
|
||||
启用该 bundle 会给每个活跃根 Agent 请求增加四个定时工具的 schema,并为每个符合条件的步骤增加一条持久时钟读数;即使对话从不创建提醒也会承担这两项开销。
|
||||
|
||||
#### KV 缓存影响
|
||||
|
||||
四个工具的 schema 在 bundle 挂载时改变一次请求前缀;每条追加的读数都是该前缀之后的新可见内容,因此不会使已有条目失效。
|
||||
|
||||
## 已知限制与后续工作
|
||||
|
||||
<a id="known-limitations-and-deferred-work"></a>
|
||||
|
||||
- 此 Bundle 打开时,其页面像其他所有 Bundle 一样为每个条目提供开关。这三个条目只能一起工作:关掉 `schedule` 会让任务页面失去服务,关掉 `time-context` 会让模型在创建新提醒时拿不到当前时间。
|
||||
- 未选中此 Bundle 时,按 id 定位 `time-context`、`schedule` 或 `ui-schedule` 的 profile 补丁或 `--patch` overlay 匹配不到任何条目:加载器为每条这样的补丁报告一条 `patch: entry <id> not found` 警告。请选中此 Bundle,而不是按 id 打开这些条目。
|
||||
|
||||
-----
|
||||
|
||||
<a id="dev-note"></a>
|
||||
### 开发备注
|
||||
|
||||
<details>
|
||||
<summary>维护者信息 — 点击展开</summary>
|
||||
|
||||
无。
|
||||
|
||||
</details>
|
||||
@@ -1,16 +0,0 @@
|
||||
# Experimental Schedule over the shipped Web composition, which carries none of
|
||||
# these rows. The Schedule service owns the task store and delivers each due
|
||||
# occurrence as a follow-up in its original Session; `time-context` supplies the
|
||||
# current time, browser zone, and elapsed time the model needs to resolve an
|
||||
# unqualified date or time; `ui-schedule` is the task page and the Session
|
||||
# reminder catalog over that service.
|
||||
|
||||
- insert:
|
||||
- id: time-context
|
||||
name: '@deepseek-ai/dsh-time-context'
|
||||
|
||||
- id: schedule
|
||||
name: '@deepseek-ai/dsh-schedule'
|
||||
|
||||
- id: ui-schedule
|
||||
name: '@deepseek-ai/dsh-client-ui-schedule'
|
||||
@@ -1,18 +0,0 @@
|
||||
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M18.5404 17.9143L22.2526 19.3885L21.5998 21.0332L17.8875 19.56C17.2134 19.2924 16.771 18.6398 16.771 17.9143V13.6399H18.5404V17.9143Z" fill="url(#paint0_linear_3786_96461)" stroke="url(#paint1_linear_3786_96461)" stroke-width="0.284352" stroke-linejoin="round"/>
|
||||
<path d="M17.9976 8C21.4515 8 24.4968 9.75127 26.2935 12.4141L26.646 10.9189L28.1216 11.2666L27.2671 14.9033L27.1118 15.5625L26.439 15.4824L22.73 15.042L22.9077 13.5371L24.6714 13.7451C23.2655 11.545 20.8019 10.0859 17.9976 10.0859C13.6268 10.0862 10.0836 13.6292 10.0835 18C10.0836 22.3708 13.6268 25.9148 17.9976 25.915C22.3685 25.915 25.9125 22.3709 25.9126 18V17.9531H27.9976V18C27.9974 23.5226 23.5202 28 17.9976 28C12.4752 27.9998 7.99768 23.5224 7.99756 18C7.99764 12.4775 12.4751 8.00024 17.9976 8ZM14.1235 27.1699C14.1657 27.1877 14.2091 27.2025 14.2515 27.2197C14.1683 27.1859 14.0857 27.1507 14.0034 27.1152L14.1235 27.1699Z" fill="url(#paint2_linear_3786_96461)"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_3786_96461" x1="15.6334" y1="13.2607" x2="29.9092" y2="27.3696" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#58BCC8"/>
|
||||
<stop offset="0.55" stop-color="#658EFF"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint1_linear_3786_96461" x1="16.5812" y1="13.2607" x2="29.9092" y2="27.3696" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#58BCC8"/>
|
||||
<stop offset="0.55" stop-color="#658EFF"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint2_linear_3786_96461" x1="13.2184" y1="7.52381" x2="31.0194" y2="27.2245" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#52CED8"/>
|
||||
<stop offset="1" stop-color="#617BEB"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.7 KiB |
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"meta": {
|
||||
"title": "Automation tasks",
|
||||
"description": "Run tasks in your sessions at a set time or on a repeating schedule."
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"meta": {
|
||||
"title": "自动化任务",
|
||||
"description": "按设定的时间或周期,在会话中自动执行任务。"
|
||||
}
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-experimental-schedule-bundle",
|
||||
"description": "Optional bundle that adds Schedule, its task page, and time context to the Web composition",
|
||||
"version": "0.2.0-rc.2",
|
||||
"icon": "./icon.svg",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/deepseek-ai/deepseek-harness.git",
|
||||
"directory": "packages/experimental/schedule-bundle"
|
||||
},
|
||||
"type": "module",
|
||||
"main": "lib/index.js",
|
||||
"types": "lib/types/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./lib/types/index.d.ts",
|
||||
"default": "./lib/index.js"
|
||||
},
|
||||
"./src/*": "./src/*",
|
||||
"./package.json": "./package.json",
|
||||
"./cordis.patch.yml": "./cordis.patch.yml",
|
||||
"./locale/*.json": "./locale/*.json"
|
||||
},
|
||||
"files": [
|
||||
"icon.svg",
|
||||
"locale/*.json",
|
||||
"lib/index.js",
|
||||
"cordis.patch.yml",
|
||||
"lib/types/**/*.d.ts"
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@deepseek-ai/dsh-client-ui-schedule": "workspace:*",
|
||||
"@deepseek-ai/dsh-schedule": "workspace:*",
|
||||
"@deepseek-ai/dsh-time-context": "workspace:*"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~",
|
||||
"@deepseek-ai/cordis-plugin-include": "workspace:~",
|
||||
"js-yaml": "^4.2.0"
|
||||
},
|
||||
"dsh": {
|
||||
"bundle": {
|
||||
"patch": "./cordis.patch.yml"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
/** Experimental Schedule composition switch; the patched rows live in cordis.patch.yml. */
|
||||
export {}
|
||||
@@ -1,47 +0,0 @@
|
||||
/** The experimental Schedule bundle inserts the three Schedule rows the shipped Web composition leaves out. */
|
||||
|
||||
import { readFileSync } from 'node:fs'
|
||||
import { resolve } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import * as yaml from 'js-yaml'
|
||||
import { entryListSchema } from '@deepseek-ai/cordis-plugin-include'
|
||||
|
||||
const root = fileURLToPath(new URL('..', import.meta.url))
|
||||
|
||||
interface Manifest {
|
||||
name?: string
|
||||
icon?: string
|
||||
private?: boolean
|
||||
publishConfig?: { access?: string }
|
||||
exports?: Record<string, unknown>
|
||||
dependencies?: Record<string, string>
|
||||
dsh?: { bundle?: { patch?: string } }
|
||||
}
|
||||
|
||||
describe('experimental Schedule bundle', () => {
|
||||
const manifest = JSON.parse(readFileSync(resolve(root, 'package.json'), 'utf8')) as Manifest
|
||||
|
||||
it('publishes as an experimental bundle with plugin-manager display metadata', () => {
|
||||
expect(manifest.name).toBe('@deepseek-ai/dsh-experimental-schedule-bundle')
|
||||
expect(manifest.private).toBeUndefined()
|
||||
expect(manifest.publishConfig?.access).toBe('public')
|
||||
expect(manifest.icon).toBe('./icon.svg')
|
||||
expect(manifest.dsh?.bundle?.patch).toBe('./cordis.patch.yml')
|
||||
expect(manifest.exports?.['./locale/*.json']).toBe('./locale/*.json')
|
||||
expect(manifest.exports?.['./cordis.patch.yml']).toBe('./cordis.patch.yml')
|
||||
// Each inserted row names a package the bundle depends on, so the rows resolve from the bundle.
|
||||
expect(Object.keys(manifest.dependencies ?? {}).sort()).toEqual([
|
||||
'@deepseek-ai/dsh-client-ui-schedule', '@deepseek-ai/dsh-schedule', '@deepseek-ai/dsh-time-context',
|
||||
])
|
||||
})
|
||||
|
||||
it('inserts the three Schedule rows switched on', () => {
|
||||
const parsed = yaml.load(readFileSync(resolve(root, './cordis.patch.yml'), 'utf8'), { schema: entryListSchema })
|
||||
expect(parsed).toEqual([{ insert: [
|
||||
{ id: 'time-context', name: '@deepseek-ai/dsh-time-context' },
|
||||
{ id: 'schedule', name: '@deepseek-ai/dsh-schedule' },
|
||||
{ id: 'ui-schedule', name: '@deepseek-ai/dsh-client-ui-schedule' },
|
||||
] }])
|
||||
})
|
||||
})
|
||||
@@ -1,3 +0,0 @@
|
||||
import { defineConfig } from 'tsdown'
|
||||
|
||||
export default defineConfig({ entry: ['lib/types/index.js'], outDir: 'lib', format: ['esm'], platform: 'node', target: 'es2024', fixedExtension: false, dts: false, clean: false })
|
||||
@@ -1865,7 +1865,7 @@ export const SERVICE_API: readonly ServiceApiEntry[] = [
|
||||
methods: [
|
||||
{
|
||||
signature: 'async create(sessionId: SessionId, request: ScheduleCreateRequest, signal?: AbortSignal): Promise<ScheduleRecord>',
|
||||
description: 'Create a reminder bound to the caller-selected Session without activating it.\n\nThe request must supply a title; a missing, blank-after-trim, or over-long title rejects with `invalid_prompt` instead of deriving one from the prompt. The record is built from the clock reading taken before the request joins the serialized queue, so a create that waits behind a longer operation keeps its request-time anchor and may already be due when the queue reaches it.',
|
||||
description: 'Create a reminder bound to the caller-selected Session without activating it.\n\nThe request must supply a title; a missing, blank-after-trim, or over-long title rejects with `invalid_prompt` instead of deriving one from the prompt. A Session a delegated child owns rejects with `subagent_session`, because delivery can never reach it: the child is one whose delegation depth is above zero. The record is built from the clock reading taken before the request joins the serialized queue, so a create that waits behind a longer operation keeps its request-time anchor and may already be due when the queue reaches it.',
|
||||
parameters: [{ name: 'sessionId', description: 'Original Session receiving the reminder.' }, { name: 'request', description: 'Validated tool selector, required title, and reminder content.' }, { name: 'signal', description: 'Optional cancellation checked before persistence begins, including after FIFO waits.' }],
|
||||
returns: 'The durably stored schedule. Cancellation does not roll back an in-flight write.',
|
||||
},
|
||||
@@ -1890,15 +1890,15 @@ export const SERVICE_API: readonly ServiceApiEntry[] = [
|
||||
},
|
||||
{
|
||||
signature: '@Remote(\'delete\') async delete(request: ScheduleDeleteRequest, signal?: AbortSignal): Promise<ScheduleDeleteResult>',
|
||||
description: 'Delete one task belonging to the selected Session, leaving queued messages intact.\n\nThe row is removed: the task no longer schedules, leaves `list` and `catalog`, and its saved delivery records go with it.',
|
||||
description: 'Delete one task belonging to the selected Session, leaving queued messages intact.\n\nThe row is removed: the task no longer schedules, leaves `list` and `catalog`, and its saved delivery records go with it. A task bound to a Session a delegated child owns stays deletable even though creation and timing edits refuse that binding, so a task stored before that rule existed remains removable.',
|
||||
parameters: [{ name: 'request', description: 'Session and exact task identity.' }, { name: 'signal', description: 'Optional cancellation checked before persistence begins, including after FIFO waits.' }],
|
||||
returns: 'Whether that Session owned a deleted task. Cancellation does not roll back an in-flight write.',
|
||||
},
|
||||
{
|
||||
signature: '@Remote(\'update\') async update(request: ScheduleUpdateRequest, signal?: AbortSignal): Promise<ScheduleUpdateResult>',
|
||||
description: 'Update the name, instruction, and timing of an active task within the original Session binding without activating the Session or changing saved deliveries.\n\nEach supplied field replaces its stored value; an omitted field keeps it. A name or instruction change alone does not reset the committed target.',
|
||||
description: 'Update the name, instruction, and timing of an active task within the original Session binding without activating the Session or changing saved deliveries.\n\nEach supplied field replaces its stored value; an omitted field keeps it. A name or instruction change alone does not reset the committed target. A Session a delegated child owns returns the non-mutating `subagent_session` result, so an edit cannot re-arm a task bound to a Session delivery can never reach, and the Web editor can explain the refusal through the ordinary result it already renders.',
|
||||
parameters: [{ name: 'request', description: 'Task binding, complete observed record, and any combination of timing, name, and instruction.' }, { name: 'signal', description: 'Cancellation checked after domain readiness and FIFO waits, before persistence begins.' }],
|
||||
returns: 'The committed record, unchanged record for a no-op, or a non-mutating input/lookup/conflict result. Storage and lifecycle failures reject; cancellation after a write starts does not roll it back.',
|
||||
returns: 'The committed record, unchanged record for a no-op, or a non-mutating input/lookup/conflict/refusal result. Storage and lifecycle failures reject; cancellation after a write starts does not roll it back.',
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -6363,7 +6363,7 @@ export const TYPE_API: readonly TypeApiEntry[] = [
|
||||
},
|
||||
{
|
||||
name: 'ScheduleToolError',
|
||||
declaration: 'export type ScheduleToolError = InvalidPromptError | InvalidSelectorError | InvalidRuleError | InvalidTimeZoneError | NotFutureError | TimeOutOfRangeError | FrequencyTooHighError | InternalScheduleError;',
|
||||
declaration: 'export type ScheduleToolError = InvalidPromptError | InvalidSelectorError | InvalidRuleError | InvalidTimeZoneError | NotFutureError | TimeOutOfRangeError | FrequencyTooHighError | SubagentSessionError | InternalScheduleError;',
|
||||
},
|
||||
{
|
||||
name: 'ScheduleUpdateContent',
|
||||
@@ -7297,6 +7297,10 @@ export const TYPE_API: readonly TypeApiEntry[] = [
|
||||
name: 'SubagentSendMessageOptions',
|
||||
declaration: 'export interface SubagentSendMessageOptions {\n readonly signal: AbortSignal;\n}',
|
||||
},
|
||||
{
|
||||
name: 'SubagentSessionError',
|
||||
declaration: 'export interface SubagentSessionError {\n readonly code: \'subagent_session\';\n readonly message: string;\n}',
|
||||
},
|
||||
{
|
||||
name: 'SubagentStartRequest',
|
||||
declaration: 'export interface SubagentStartRequest {\n readonly label?: string;\n readonly prompt: ContentBlock[];\n readonly parent: Agent;\n readonly signal: AbortSignal;\n readonly agentOptions?: AgentOptions;\n readonly outputSchema?: ObjectJsonSchema;\n readonly maxDepth?: number;\n readonly toolFilter?: ToolRestriction;\n readonly persona?: string;\n}',
|
||||
|
||||
+1
@@ -340,6 +340,7 @@ Every package below exports a Cordis plugin that a bundle patch can name in a Lo
|
||||
| Package | Config | Description |
|
||||
|---|---|---|
|
||||
| `@deepseek-ai/dsh-schedule` | yes | Host-wide durable reminders with shared management and original-Session delivery |
|
||||
| `@deepseek-ai/dsh-tool-schedule` | no | Model-facing reminder management tools (schedule_create, schedule_list, schedule_update, schedule_delete) over the Host ctx.schedule service |
|
||||
|
||||
## sdk
|
||||
|
||||
|
||||
@@ -9,17 +9,17 @@
|
||||
en: 4002053eaf6dc600
|
||||
zh: 95fcbc7c14129229
|
||||
/schedule-host-owned-reminders/summary:
|
||||
en: 1b1c6395ae6eae1c
|
||||
zh: 8b11a0b8e5de16bc
|
||||
en: 3b980815b19b4583
|
||||
zh: 5c22a5f81ce26674
|
||||
/schedule-host-owned-reminders/table-of-contents:
|
||||
en: 1eb35b015a6c423f
|
||||
zh: a8a3dceee2c9e943
|
||||
/schedule-host-owned-reminders/packages:
|
||||
en: f0a5af4d48d6c759
|
||||
zh: 019a5d7b0a16da50
|
||||
en: 339f83d294c62b49
|
||||
zh: 28b5df2b0f0d26ae
|
||||
/schedule-host-owned-reminders/related-documentation:
|
||||
en: ddcf855df0fe7333
|
||||
zh: 7269b92860d53390
|
||||
en: a1686b192f3a2312
|
||||
zh: 39eadd15e3e22ecf
|
||||
/schedule-host-owned-reminders/dev-note:
|
||||
en: 5de1d6304e00c58f
|
||||
zh: 8d8225361cfa29e5
|
||||
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
|
||||
|
||||
## Summary
|
||||
|
||||
Create one-shot, fixed-rate, daily, weekly, or cron reminders for a conversation and keep them across Host restarts. Inspect active and inactive tasks without opening their original Sessions. Use Schedule for reminder creation and delivery, and the optional Tasks page for cross-Session inspection and confirmed deletion. Due reminders arrive as ordinary follow-up messages in the original conversation, not email, SMS, or push notifications.
|
||||
Create one-shot, fixed-rate, daily, weekly, or cron reminders for a conversation and keep them across Host restarts. Inspect active and inactive tasks without opening their original Sessions. Use Schedule for reminder creation and delivery, and the Automation tasks page for cross-Session inspection and confirmed deletion. Due reminders arrive as ordinary follow-up messages in the original conversation, not email, SMS, or push notifications.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
@@ -27,6 +27,7 @@ Choose this package for persistent reminder management.
|
||||
| Package | Role |
|
||||
|---|---|
|
||||
| [`schedule/`](schedule/README.md) | Host-owned reminder persistence, scheduling, inspection, and explicit deletion |
|
||||
| [`tool-schedule/`](tool-schedule/README.md) | Preset-scoped `schedule_create`, `schedule_list`, `schedule_update`, and `schedule_delete` tools over the Host `ctx.schedule` service |
|
||||
|
||||
-----
|
||||
|
||||
@@ -34,8 +35,8 @@ Choose this package for persistent reminder management.
|
||||
## Related documentation
|
||||
|
||||
- [Schedule subsystem](../../docs/subsystems/schedule.md) — task records, latest receipts, timing, and delivery contracts.
|
||||
- [Generated tool catalog](../../docs/tool-catalog.md#deepseek-aidsh-schedule) — the `schedule_create`/`schedule_list`/`schedule_update`/`schedule_delete` schemas the model receives.
|
||||
- [Schedule user guide](../../docs/user/guide/schedule.md) — enable reminders and inspect active or inactive tasks.
|
||||
- [Generated tool catalog](../../docs/tool-catalog.md#deepseek-aidsh-tool-schedule) — the `schedule_create`/`schedule_list`/`schedule_update`/`schedule_delete` schemas a mounting preset contributes.
|
||||
- [Schedule user guide](../../docs/user/guide/schedule.md) — create reminders and inspect active or inactive tasks.
|
||||
- [Web task page and reminder catalog](../client/ui-schedule/README.md) — browser inspection of tasks and confirmed deletion.
|
||||
|
||||
-----
|
||||
|
||||
@@ -9,7 +9,7 @@ kind: "package-group"
|
||||
|
||||
## 概述
|
||||
|
||||
为对话创建一次性、固定速率、每日、每周或 cron 提醒,并在 Host 重启后保留它们。无需打开原 Session,即可查看活动和已结束任务。使用 Schedule 创建和投递提醒,使用可选的任务页面跨 Session 查看任务并确认删除。到期提醒作为普通 follow-up 消息进入原对话,而不是电子邮件、短信或推送通知。
|
||||
为对话创建一次性、固定速率、每日、每周或 cron 提醒,并在 Host 重启后保留它们。无需打开原 Session,即可查看活动和已结束任务。使用 Schedule 创建和投递提醒,使用自动化任务页面跨 Session 查看任务并确认删除。到期提醒作为普通 follow-up 消息进入原对话,而不是电子邮件、短信或推送通知。
|
||||
|
||||
## 目录
|
||||
|
||||
@@ -27,6 +27,7 @@ kind: "package-group"
|
||||
| 包 | 职责 |
|
||||
|---|---|
|
||||
| [`schedule/`](schedule/README.zh.md) | Host 拥有的提醒持久化、调度、查询与显式删除 |
|
||||
| [`tool-schedule/`](tool-schedule/README.zh.md) | 基于宿主 `ctx.schedule` 服务的 preset 级 `schedule_create`、`schedule_list`、`schedule_update` 和 `schedule_delete` 工具 |
|
||||
|
||||
-----
|
||||
|
||||
@@ -34,8 +35,8 @@ kind: "package-group"
|
||||
## 相关文档
|
||||
|
||||
- [Schedule 子系统](../../docs/subsystems/schedule.zh.md)——任务记录、最近一次回执、时间与投递约定。
|
||||
- [生成的工具目录](../../docs/tool-catalog.zh.md#deepseek-aidsh-schedule)——模型接收的 `schedule_create`/`schedule_list`/`schedule_update`/`schedule_delete` schema。
|
||||
- [Schedule 用户指南](../../docs/user/guide/schedule.zh.md)——启用提醒并查看活动或已结束任务。
|
||||
- [生成的工具目录](../../docs/tool-catalog.zh.md#deepseek-aidsh-tool-schedule)——挂载 preset 所贡献的 `schedule_create`/`schedule_list`/`schedule_update`/`schedule_delete` schema。
|
||||
- [Schedule 用户指南](../../docs/user/guide/schedule.zh.md)——创建提醒并查看活动或已结束任务。
|
||||
- [Web 任务页面与提醒目录](../client/ui-schedule/README.zh.md)——在浏览器中查询任务并确认删除。
|
||||
|
||||
-----
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
en: 23386452a66b2fbd
|
||||
zh: 4a8d91b2f313fead
|
||||
/deepseek-ai-dsh-schedule/use-this-package:
|
||||
en: 318cad8a73818a95
|
||||
zh: 267b9c86cb9f06d1
|
||||
en: 88aba0cd93ff0903
|
||||
zh: a8e4c257c319de53
|
||||
/deepseek-ai-dsh-schedule/understand-the-implementation:
|
||||
en: 676b7c508f37a1b7
|
||||
zh: c5e8520b3350f0b0
|
||||
@@ -26,16 +26,16 @@
|
||||
/deepseek-ai-dsh-schedule/model-experience:
|
||||
en: 215e7ba838619b7b
|
||||
zh: a311da3843709f90
|
||||
/deepseek-ai-dsh-schedule/model-experience/tool-schemas-on-root-agents:
|
||||
en: c4c31a3f6826626d
|
||||
zh: 5aa01bfa311b2f4c
|
||||
/deepseek-ai-dsh-schedule/model-experience/tool-schemas-on-root-agents/what-the-model-sees:
|
||||
en: fe159715b83e3058
|
||||
zh: e86fa4871283720f
|
||||
/deepseek-ai-dsh-schedule/model-experience/tool-schemas-on-root-agents/token-effect:
|
||||
/deepseek-ai-dsh-schedule/model-experience/tool-schemas-in-mounted-presets:
|
||||
en: 097a655a88e2a9f2
|
||||
zh: 6612c58808186b1e
|
||||
/deepseek-ai-dsh-schedule/model-experience/tool-schemas-in-mounted-presets/what-the-model-sees:
|
||||
en: bcc153e35a059ba8
|
||||
zh: 2c2ec93cd0dfa6c0
|
||||
/deepseek-ai-dsh-schedule/model-experience/tool-schemas-in-mounted-presets/token-effect:
|
||||
en: ae0eb4d2609d4329
|
||||
zh: 4fe0a26e37c272dc
|
||||
/deepseek-ai-dsh-schedule/model-experience/tool-schemas-on-root-agents/kv-cache-effect:
|
||||
/deepseek-ai-dsh-schedule/model-experience/tool-schemas-in-mounted-presets/kv-cache-effect:
|
||||
en: 7bf33bbe17e1da03
|
||||
zh: 2af9a2f842b4f430
|
||||
/deepseek-ai-dsh-schedule/model-experience/tool-results-after-management-calls:
|
||||
@@ -69,8 +69,8 @@
|
||||
en: 1006325fa610366d
|
||||
zh: 476215d8a3c70fe4
|
||||
/deepseek-ai-dsh-schedule/known-limitations-and-deferred-work:
|
||||
en: fd511d607cbc7b8d
|
||||
zh: f45a14991cfa47e6
|
||||
en: 4f01a96b25d462b7
|
||||
zh: 22085f47cb287892
|
||||
/deepseek-ai-dsh-schedule/known-limitations-and-deferred-work/dev-note:
|
||||
en: e67f633dc6fe7773
|
||||
zh: 8ec3e73528ddb1a6
|
||||
@@ -23,9 +23,9 @@ Schedule delivers one-shot, fixed-rate, daily, weekly, and cron wall-clock remin
|
||||
<a id="use-this-package"></a>
|
||||
## Use this package
|
||||
|
||||
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`.
|
||||
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`.
|
||||
|
||||
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:
|
||||
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:
|
||||
|
||||
| Selector | Example | Timing |
|
||||
|---|---|---|
|
||||
@@ -90,11 +90,11 @@ The `schedule.archiveAdmission()` effect answers the Workspace registry's archiv
|
||||
<a id="model-experience"></a>
|
||||
## Model Experience
|
||||
|
||||
### Tool schemas on root Agents
|
||||
### Tool schemas in mounted presets
|
||||
|
||||
#### What the model sees
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
#### Token effect
|
||||
|
||||
@@ -155,6 +155,7 @@ Reminder messages append to the original Session's history and preserve earlier
|
||||
- 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.
|
||||
- Old Session-log reminders require explicit recreation. Previously physically deleted tasks are not restored or fabricated.
|
||||
- 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.
|
||||
- `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.
|
||||
- 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.
|
||||
- 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.
|
||||
- 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.
|
||||
|
||||
@@ -23,9 +23,9 @@ Schedule 将一次性、固定周期、按每日、按每周以及 cron 本地
|
||||
<a id="use-this-package"></a>
|
||||
## 使用此包
|
||||
|
||||
随发行版交付的 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` 之后一次投递才会提交。
|
||||
随发行版交付的 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` 之后一次投递才会提交。
|
||||
|
||||
Agent 获得 `schedule_create`、`schedule_list`、`schedule_delete` 和 `schedule_update`。更新原地替换一条提醒的名称、指令或时间,保留其 id 与已保存记录;相对的 `after` 延迟不支持更新。创建时需要非空提示文本、标题,且必须只提供以下六个选择器之一:
|
||||
提醒工具 `schedule_create`、`schedule_list`、`schedule_delete` 和 `schedule_update` 来自 [`@deepseek-ai/dsh-tool-schedule`](../tool-schedule/README.zh.md),由 preset 挂载;本包提供这些工具调用的宿主服务。更新原地替换一条提醒的名称、指令或时间,保留其 id 与已保存记录;相对的 `after` 延迟不支持更新。创建时需要非空提示文本、标题,且必须只提供以下六个选择器之一:
|
||||
|
||||
| 选择器 | 示例 | 时间语义 |
|
||||
|---|---|---|
|
||||
@@ -90,11 +90,11 @@ Schedule domain 声明整 unit 布局,因为任务是权威数据。路由到
|
||||
<a id="model-experience"></a>
|
||||
## 模型体验
|
||||
|
||||
### 根 Agent 的工具 schema
|
||||
### 挂载 preset 中的工具 schema
|
||||
|
||||
#### 模型看到什么
|
||||
|
||||
[生成的工具目录](../../../docs/tool-catalog.zh.md#deepseek-aidsh-schedule) 包含 `schedule_create`、`schedule_list`、`schedule_delete` 和 `schedule_update` 的描述与 schema;Schedule 加载期间,这些工具注册在活动根 Agent 的作用域中。
|
||||
[生成的工具目录](../../../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。
|
||||
|
||||
#### Token 影响
|
||||
|
||||
@@ -155,6 +155,7 @@ This is a scheduled message from the user
|
||||
- 删除会移除任务行及其已保存的投递记录:后续投递停止,任务离开 `list` 与 `catalog`,`history` 也不再解析到它。
|
||||
- 旧会话日志提醒需要明确重新创建。此前已物理删除的任务不会被恢复或虚构。
|
||||
- 仅可修改活动任务的管理字段。不支持暂停、执行状态、原会话以外的投递或每次运行新建会话。名称、指令和时间更新可由模型通过 `schedule_update` 修改其自身 Session 内的提醒,也可在 Web 详情中对所选任务修改;不支持跨会话转交工作流,产品权限策略尚未确定,会话绑定校验不等于调用者鉴权。
|
||||
- 对由被委派子 agent 拥有的 Session,当该 Agent 的委派深度大于零时,`create` 与 `update` 会以 `subagent_session` 拒绝(这正是委派封顶本身执行的记账,读取自持久化 session header,因此冷恢复后仍然成立)。投递会经由 Session controller 解析该绑定 Session,而后者拒绝被委派子 agent 的活跃 Agent,因此绑定到那里的任务永远无法投递。调用方限制属于工具层:`@deepseek-ai/dsh-tool-schedule` 会拒绝被委派调用方的每一个工具。`list`、`catalog`、`history` 与 `delete` 仍服务该 Session,所以在这条规则之前存储的任务仍可删除。
|
||||
- Cron 使用五字段 Vixie 方言,因此最小间隔为一分钟,不支持亚分钟级调度。不接受扩展表达式:`L`、`W`、`#`、月份或星期名称、`@daily` 风格宏以及秒字段都会被拒绝。存储记录只保留规范化表达式,创建时提供的原始拼写不会被保留。
|
||||
- Daily、Weekly 与 Cron 的未来目标使用宿主当前的 IANA 数据;解码和重启绝不重新计算已提交的目标。UTC 目标仅支持 0001–9999 年;没有后续目标时,任务在投递后保留为未运行状态。
|
||||
- 已保存的发送记录在追加确认时按配置的 `deliveryHistoryDays` 窗口(以每条回执的 `deliveredAt` 向前计算)与 `deliveryHistoryRecords` 条数上限裁剪;新追加的最近一次回执始终保留,发生裁剪时任务标记更早记录不可用。JSON 后端把 Schedule domain 存在一个 `schedule.json` 文档中,因此每次任务变更都会重写全部保留任务及其历史,宿主也会把全部保留历史加载到内存。历史分页仅限制返回的记录数,不限制存储增长、保留的内存、提示文本字节数或写入成本。
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
"@deepseek-ai/dsh-session-persistence": "workspace:*",
|
||||
"@deepseek-ai/dsh-session-projection": "workspace:*",
|
||||
"@deepseek-ai/dsh-storage-domain": "workspace:*",
|
||||
"@deepseek-ai/dsh-subagent": "workspace:*",
|
||||
"@deepseek-ai/dsh-tools": "workspace:*",
|
||||
"@deepseek-ai/dsh-typert-protocol": "workspace:*",
|
||||
"@deepseek-ai/dsh-workspace": "workspace:*",
|
||||
@@ -86,6 +87,7 @@
|
||||
"@deepseek-ai/dsh-storage": "workspace:*",
|
||||
"@deepseek-ai/dsh-storage-domain": "workspace:*",
|
||||
"@deepseek-ai/dsh-storage-json": "workspace:*",
|
||||
"@deepseek-ai/dsh-subagent": "workspace:*",
|
||||
"@deepseek-ai/dsh-system-prompt": "workspace:*",
|
||||
"@deepseek-ai/dsh-tools": "workspace:*",
|
||||
"@deepseek-ai/dsh-typert-protocol": "workspace:*",
|
||||
|
||||
@@ -79,7 +79,7 @@ export class ScheduleLogError extends Error {
|
||||
}
|
||||
}
|
||||
|
||||
/** Error from a model-supplied Schedule rule that cannot become a record. */
|
||||
/** Error from a model-supplied Schedule rule or target Session that cannot become a record. */
|
||||
export class ScheduleInputError extends Error {
|
||||
/** Stable public Schedule input code. */
|
||||
readonly code:
|
||||
@@ -90,6 +90,7 @@ export class ScheduleInputError extends Error {
|
||||
| 'not_future'
|
||||
| 'time_out_of_range'
|
||||
| 'frequency_too_high'
|
||||
| 'subagent_session'
|
||||
|
||||
/**
|
||||
* Construct a stable input failure.
|
||||
@@ -105,7 +106,8 @@ export class ScheduleInputError extends Error {
|
||||
| 'invalid_time_zone'
|
||||
| 'not_future'
|
||||
| 'time_out_of_range'
|
||||
| 'frequency_too_high',
|
||||
| 'frequency_too_high'
|
||||
| 'subagent_session',
|
||||
message: string,
|
||||
options?: ErrorOptions,
|
||||
) {
|
||||
|
||||
@@ -4,11 +4,10 @@ import z from '@deepseek-ai/schemastery'
|
||||
import { Context, Service } from '@deepseek-ai/cordis'
|
||||
import { TypertRemoteService, Remote } from '@deepseek-ai/dsh-typert-protocol'
|
||||
import type { Domain } from '@deepseek-ai/dsh-storage-domain'
|
||||
import type {} from '@deepseek-ai/dsh-api-session-controller'
|
||||
import { delegationDepthOf } from '@deepseek-ai/dsh-subagent'
|
||||
import type { SessionId } from '@deepseek-ai/dsh-session'
|
||||
import type { SessionActivity } from '@deepseek-ai/dsh-workspace'
|
||||
import { ScheduleRuntime } from './runtime.ts'
|
||||
import { registerScheduleTools } from './tools.ts'
|
||||
import { scheduleDomain } from './storage.ts'
|
||||
import { deliveryHistoryPage } from './delivery-history.ts'
|
||||
import { resolveScheduleUpdate } from './update.ts'
|
||||
@@ -20,11 +19,10 @@ import {
|
||||
import type {
|
||||
DeliveryRetentionBounds, ScheduleCatalogEntry, ScheduleCreateRequest, ScheduleDeleteRequest, ScheduleDeleteResult,
|
||||
ScheduleDeliveryHistoryRequest, ScheduleDeliveryHistoryResult, ScheduleListRequest, ScheduleRecord,
|
||||
ScheduleUpdateRequest, ScheduleUpdateResult,
|
||||
ScheduleUpdateRequest, ScheduleUpdateResult, SubagentSessionError,
|
||||
} from './types.ts'
|
||||
|
||||
export type * from './types.ts'
|
||||
export { registerScheduleTools } from './tools.ts'
|
||||
export { scheduleDomain } from './storage.ts'
|
||||
export type { ScheduleTask } from './storage.ts'
|
||||
export type { RecurringOccurrence } from './domain.ts'
|
||||
@@ -32,6 +30,7 @@ export {
|
||||
SCHEDULE_CHANGE_VERSION,
|
||||
MIN_EVERY_INTERVAL_SECONDS,
|
||||
MAX_TITLE_LENGTH,
|
||||
REQUIRED_TITLE_MESSAGE,
|
||||
ScheduleId,
|
||||
ScheduleInputError,
|
||||
ScheduleLogError,
|
||||
@@ -98,7 +97,7 @@ const DEFAULT_DELIVERY_HISTORY_RECORDS = 200
|
||||
* service is the plugin that registers that listener.
|
||||
*/
|
||||
export class ScheduleService extends TypertRemoteService {
|
||||
static inject = ['agents', 'sessions', 'tools', 'storageDomain', 'sessionController', 'sessionPersistence']
|
||||
static inject = ['agents', 'sessions', 'storageDomain', 'sessionController', 'sessionPersistence']
|
||||
|
||||
static Config: z<Config> = z.object({
|
||||
deliveryHistoryDays: z.number().step(1).min(1).max(3650).default(DEFAULT_DELIVERY_HISTORY_DAYS),
|
||||
@@ -164,27 +163,6 @@ export class ScheduleService extends TypertRemoteService {
|
||||
this.runtime.requestDrive()
|
||||
return cleanup
|
||||
})
|
||||
const registered = new WeakSet<object>()
|
||||
const attached = new Map<import('@deepseek-ai/dsh-agent').Agent, () => Promise<void>>()
|
||||
const attach = (agent: import('@deepseek-ai/dsh-agent').Agent): void => {
|
||||
if (this.stopping || registered.has(agent) || !ctx.agents.roots().includes(agent)) return
|
||||
registered.add(agent)
|
||||
// The plugin-scope effect is what tears the Agent-scoped registration down when this
|
||||
// plugin unloads, so it must also be disposed when the Agent itself is released.
|
||||
attached.set(agent, ctx.effect(
|
||||
() => agent.ctx.effect(() => registerScheduleTools(ctx, agent.ctx, agent)),
|
||||
))
|
||||
}
|
||||
ctx.on('agent/created', ({ agent }) => { attach(agent) })
|
||||
ctx.on('agent/disposed', ({ agent }) => {
|
||||
const detach = attached.get(agent)
|
||||
if (detach === undefined) return
|
||||
attached.delete(agent)
|
||||
// `agent/disposed` declares a void listener, so the disposer promise is not returned;
|
||||
// this teardown chain is synchronous, and a failure throws into
|
||||
// `AgentRegistry.emitDisposed`, which reports it as a listener throw.
|
||||
void detach()
|
||||
})
|
||||
ctx.on('session/created', (session) => {
|
||||
// Historical Schedule events remain readable but do not populate Host tasks.
|
||||
// A throwing `session/created` listener rolls the attach back, so an unreadable
|
||||
@@ -226,7 +204,6 @@ export class ScheduleService extends TypertRemoteService {
|
||||
activity()
|
||||
}
|
||||
}, 'schedule.archiveAdmission()')
|
||||
for (const agent of ctx.agents.roots()) attach(agent)
|
||||
}
|
||||
|
||||
async [Service.init](): Promise<void> {
|
||||
@@ -238,6 +215,8 @@ export class ScheduleService extends TypertRemoteService {
|
||||
*
|
||||
* The request must supply a title; a missing, blank-after-trim, or over-long
|
||||
* title rejects with `invalid_prompt` instead of deriving one from the prompt.
|
||||
* A Session a delegated child owns rejects with `subagent_session`, because delivery
|
||||
* can never reach it: the child is one whose delegation depth is above zero.
|
||||
* The record is built from the clock reading taken before the request joins the
|
||||
* serialized queue, so a create that waits behind a longer operation keeps its
|
||||
* request-time anchor and may already be due when the queue reaches it.
|
||||
@@ -270,6 +249,8 @@ export class ScheduleService extends TypertRemoteService {
|
||||
else if (request.cron !== undefined) record = createCronScheduleRecord(id, request.prompt, request.cron, now, title)
|
||||
else throw new ScheduleInputError('invalid_selector', 'Exactly one reminder selector is required.')
|
||||
return this.serialize(async () => {
|
||||
const refusal = this.reminderTargetRefusal(sessionId)
|
||||
if (refusal !== undefined) throw new ScheduleInputError('subagent_session', refusal.message)
|
||||
const domain = await this.getDomain()
|
||||
signal?.throwIfAborted()
|
||||
await domain.table('tasks').put(id, {
|
||||
@@ -334,7 +315,9 @@ export class ScheduleService extends TypertRemoteService {
|
||||
* Delete one task belonging to the selected Session, leaving queued messages intact.
|
||||
*
|
||||
* The row is removed: the task no longer schedules, leaves `list` and `catalog`, and its
|
||||
* saved delivery records go with it.
|
||||
* saved delivery records go with it. A task bound to a Session a delegated child owns
|
||||
* stays deletable even though creation and timing edits refuse that binding, so a task
|
||||
* stored before that rule existed remains removable.
|
||||
* @param request - Session and exact task identity.
|
||||
* @param signal - Optional cancellation checked before persistence begins, including after FIFO waits.
|
||||
* @returns Whether that Session owned a deleted task. Cancellation does not roll back an in-flight write.
|
||||
@@ -360,15 +343,20 @@ export class ScheduleService extends TypertRemoteService {
|
||||
* binding without activating the Session or changing saved deliveries.
|
||||
*
|
||||
* Each supplied field replaces its stored value; an omitted field keeps it. A name or
|
||||
* instruction change alone does not reset the committed target.
|
||||
* instruction change alone does not reset the committed target. A Session a delegated
|
||||
* child owns returns the non-mutating `subagent_session` result, so an edit cannot
|
||||
* re-arm a task bound to a Session delivery can never reach, and the Web editor can
|
||||
* explain the refusal through the ordinary result it already renders.
|
||||
* @param request - Task binding, complete observed record, and any combination of timing, name, and instruction.
|
||||
* @param signal - Cancellation checked after domain readiness and FIFO waits, before persistence begins.
|
||||
* @returns The committed record, unchanged record for a no-op, or a non-mutating input/lookup/conflict result.
|
||||
* @returns The committed record, unchanged record for a no-op, or a non-mutating input/lookup/conflict/refusal result.
|
||||
* Storage and lifecycle failures reject; cancellation after a write starts does not roll it back.
|
||||
*/
|
||||
@Remote('update')
|
||||
async update(request: ScheduleUpdateRequest, signal?: AbortSignal): Promise<ScheduleUpdateResult> {
|
||||
return this.serialize<ScheduleUpdateResult>(async () => {
|
||||
const refusal = this.reminderTargetRefusal(request.sessionId)
|
||||
if (refusal !== undefined) return refusal
|
||||
const tasks = (await this.getDomain()).table('tasks')
|
||||
signal?.throwIfAborted()
|
||||
const current = tasks.get(request.id)
|
||||
@@ -407,6 +395,27 @@ export class ScheduleService extends TypertRemoteService {
|
||||
return this.ready
|
||||
}
|
||||
|
||||
/**
|
||||
* Refuse a Session no delivery can reach because a delegated child owns it.
|
||||
*
|
||||
* Delivery resolves the bound Session through `ctx.sessionController.resolveAgent`,
|
||||
* which rejects the live Agent of a delegated child; a stored task for such a Session
|
||||
* would stay permanently overdue and retry on every drive. Both operations that can
|
||||
* arm a delivery read that same fact here instead of restating it: a delegated child
|
||||
* is one whose {@link delegationDepthOf} is above zero, the accounting the delegation
|
||||
* cap itself enforces, which survives a cold resume through the persisted header.
|
||||
* @param sessionId - Session the task would be bound to.
|
||||
* @returns The stable refusal for a delegated child's Session, or undefined when the Session is eligible.
|
||||
*/
|
||||
private reminderTargetRefusal(sessionId: SessionId): SubagentSessionError | undefined {
|
||||
const agent = this.ctx.agents.get(sessionId)
|
||||
if (agent === undefined || delegationDepthOf(agent) === 0) return undefined
|
||||
return {
|
||||
code: 'subagent_session',
|
||||
message: 'This Session belongs to subagent routing, which never receives reminder delivery.',
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove every active task stored for one Session, inside the queue the tools
|
||||
* use.
|
||||
|
||||
@@ -311,6 +311,12 @@ export interface FrequencyTooHighError {
|
||||
readonly message: string
|
||||
}
|
||||
|
||||
/** Stable error returned when the target Session belongs to subagent routing, which never receives reminder delivery. */
|
||||
export interface SubagentSessionError {
|
||||
readonly code: 'subagent_session'
|
||||
readonly message: string
|
||||
}
|
||||
|
||||
/** Stable fallback that does not disclose an internal exception. */
|
||||
export interface InternalScheduleError {
|
||||
readonly code: 'internal_error'
|
||||
@@ -326,6 +332,7 @@ export type ScheduleToolError =
|
||||
| NotFutureError
|
||||
| TimeOutOfRangeError
|
||||
| FrequencyTooHighError
|
||||
| SubagentSessionError
|
||||
| InternalScheduleError
|
||||
|
||||
/** Canonical `schedule_create` value. */
|
||||
|
||||
@@ -4,6 +4,7 @@ import AgentRegistry, { type Agent } from '@deepseek-ai/dsh-agent'
|
||||
import { unsupportedInbox } from '@deepseek-ai/dsh-agent-loop-testkit'
|
||||
import type { UserMessage } from '@deepseek-ai/dsh-llm'
|
||||
import SessionStore, { SessionId } from '@deepseek-ai/dsh-session'
|
||||
import type { CreateSessionOptions } from '@deepseek-ai/dsh-session'
|
||||
import Storage, { type KvUnit, type KvUnitDescriptor, type StorageBackend } from '@deepseek-ai/dsh-storage'
|
||||
import { DomainFacility } from '@deepseek-ai/dsh-storage-domain'
|
||||
import SystemPrompt from '@deepseek-ai/dsh-system-prompt'
|
||||
@@ -118,10 +119,11 @@ export interface HarnessAgent extends Agent {
|
||||
/** Build an unregistered Agent for a test-owned Session.
|
||||
* @param ctx - Services owning the Session.
|
||||
* @param id - Unique Session identity within the test Context.
|
||||
* @param meta - Optional Session creation metadata, such as subagent lineage.
|
||||
* @returns Agent whose follow-up entry is a spy.
|
||||
*/
|
||||
export function agentFor(ctx: Context, id = 'original'): HarnessAgent {
|
||||
const session = ctx.sessions.create(SessionId(id))
|
||||
export function agentFor(ctx: Context, id = 'original', meta?: CreateSessionOptions['meta']): HarnessAgent {
|
||||
const session = ctx.sessions.create(SessionId(id), meta === undefined ? undefined : { meta })
|
||||
return {
|
||||
id: session.id, session, ctx: ctx.extend(), options: {}, status: 'idle', inbox: unsupportedInbox(),
|
||||
send() {}, followup: vi.fn<(message: UserMessage) => void>(), steer() {}, inject() {}, cancel() {},
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
import type { MockInstance } from 'vitest'
|
||||
import { agentEvents } from '@deepseek-ai/dsh-agent'
|
||||
import { SessionId, SessionSeq } from '@deepseek-ai/dsh-session'
|
||||
import type { SessionEvent } from '@deepseek-ai/dsh-session'
|
||||
import { gatedScheduleBackend, harness, agentFor } from './harness.ts'
|
||||
@@ -35,16 +34,6 @@ describe('shared Schedule management', () => {
|
||||
expect(await service.catalog()).toEqual([])
|
||||
})
|
||||
|
||||
it('ignores the disposal of an Agent it never attached', async () => {
|
||||
const { ctx, service } = await setup()
|
||||
const sessionId = SessionId('unattached-disposal')
|
||||
await service.create(sessionId, { prompt: 'later', after_seconds: 60, title: 'Later' })
|
||||
// An Agent the plugin never attached has no detacher, so its disposal returns
|
||||
// from the listener without one and leaves the stored task alone.
|
||||
ctx.emit('agent/disposed', { agent: agentFor(ctx, 'never-attached') })
|
||||
expect((await service.catalog()).map(entry => entry.title)).toEqual(['Later'])
|
||||
})
|
||||
|
||||
it('reports a Session its active reminders and deletes them on a stop request', async () => {
|
||||
const { ctx, service, fiber } = await setup()
|
||||
const sessionId = SessionId('archive-admission')
|
||||
@@ -482,46 +471,33 @@ describe('Schedule activation and shutdown', () => {
|
||||
expect(warnings).toEqual([expect.stringContaining('fixture close failure')])
|
||||
})
|
||||
|
||||
it('attaches existing roots once and leaves owned children without a new registration', async () => {
|
||||
it('registers no tools for existing roots or their owned children', async () => {
|
||||
const test = await harness({ beforeService: async (ctx) => {
|
||||
const parent = agentFor(ctx, 'existing-root')
|
||||
ctx.effect(() => ctx.agents.enter(parent, undefined))
|
||||
} })
|
||||
tests.push(test)
|
||||
const parent = test.ctx.agents.get(SessionId('existing-root'))!
|
||||
expect(test.ctx.tools.get('schedule_create', parent)).toBeDefined()
|
||||
await agentEvents(test.ctx, parent).serial('agent/created', { source: 'startup' })
|
||||
const child = agentFor(test.ctx, 'owned-child')
|
||||
test.ctx.effect(() => test.ctx.agents.enter(child, parent))
|
||||
await agentEvents(test.ctx, child).serial('agent/created', { source: 'startup' })
|
||||
expect(test.ctx.agents.roots()).toEqual([parent])
|
||||
expect(test.ctx.tools.get('schedule_create', parent)).toBeDefined()
|
||||
for (const name of ['schedule_create', 'schedule_list', 'schedule_update', 'schedule_delete']) {
|
||||
expect(test.ctx.tools.get(name, parent)).toBeUndefined()
|
||||
expect(test.ctx.tools.get(name, child)).toBeUndefined()
|
||||
expect(test.ctx.tools.get(name)).toBeUndefined()
|
||||
}
|
||||
})
|
||||
|
||||
it('registers tools for a new root and rejects management after service teardown', async () => {
|
||||
it('registers no tools for a new root and rejects management after service teardown', async () => {
|
||||
const test = await setup()
|
||||
const agent = agentFor(test.ctx, 'new-root')
|
||||
await test.ctx.agents.register(agent)
|
||||
expect(test.ctx.tools.get('schedule_create', agent)).toBeDefined()
|
||||
expect(test.ctx.tools.get('schedule_create', agent)).toBeUndefined()
|
||||
await test.ctx.fiber.dispose()
|
||||
await expect(test.service.delete({ sessionId: agent.session.id, id: ScheduleId('gone') }))
|
||||
.rejects.toThrow('Schedule service is stopping')
|
||||
})
|
||||
|
||||
it('releases a disposed root Agent from the plugin scope', async () => {
|
||||
const test = await setup()
|
||||
const baseline = test.fiber.getEffects().length
|
||||
const agent = agentFor(test.ctx, 'released-root')
|
||||
const disposeAgent = await test.ctx.agents.register(agent)
|
||||
expect(test.fiber.getEffects().length).toBe(baseline + 1)
|
||||
expect(test.ctx.tools.get('schedule_create', agent)).toBeDefined()
|
||||
await disposeAgent()
|
||||
expect(test.fiber.getEffects().length).toBe(baseline)
|
||||
expect(test.ctx.tools.get('schedule_create', agent)).toBeUndefined()
|
||||
await test.ctx.fiber.dispose()
|
||||
expect(test.fiber.getEffects()).toEqual([])
|
||||
})
|
||||
|
||||
it('rejects a missing creation selector at the shared service entry', async () => {
|
||||
const test = await setup()
|
||||
await expect(test.service.create(SessionId('caller'), { prompt: 'Missing schedule', title: 'Missing schedule' }))
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
/** Host Schedule refuses to arm delivery for a Session a delegated child owns. */
|
||||
import type { Context } from '@deepseek-ai/cordis'
|
||||
import type { KvTable } from '@deepseek-ai/dsh-storage-domain'
|
||||
import { SessionId } from '@deepseek-ai/dsh-session'
|
||||
import { afterEach, beforeEach, expect, it, vi } from 'vitest'
|
||||
import { createAfterScheduleRecord, ScheduleId } from '../src/domain.ts'
|
||||
import { scheduleDomain, type ScheduleTask } from '../src/storage.ts'
|
||||
import type { ScheduleRecord } from '../src/types.ts'
|
||||
import { agentFor, harness } from './harness.ts'
|
||||
|
||||
const contexts: Context[] = []
|
||||
const childId = SessionId('subagent-child')
|
||||
const parentId = SessionId('top-level-parent')
|
||||
|
||||
beforeEach(() => { vi.useFakeTimers(); vi.setSystemTime(new Date('2026-09-16T00:00:00.000Z')) })
|
||||
afterEach(async () => {
|
||||
await Promise.all(contexts.splice(0).map(ctx => ctx.fiber.dispose()))
|
||||
vi.restoreAllMocks()
|
||||
vi.useRealTimers()
|
||||
})
|
||||
|
||||
async function setup(task?: ScheduleTask) {
|
||||
return harness({
|
||||
...task === undefined ? {} : { beforeService: async (_ctx, facility) => {
|
||||
const domain = await facility.open(scheduleDomain)
|
||||
await domain.table('tasks').put(task.record.id, task)
|
||||
await domain.close()
|
||||
} },
|
||||
onContext: ctx => contexts.push(ctx),
|
||||
})
|
||||
}
|
||||
|
||||
function table(test: Awaited<ReturnType<typeof setup>>) {
|
||||
const domain = test.ctx.storageDomain.get('schedule')
|
||||
if (domain === undefined) throw new Error('Schedule domain not initialized')
|
||||
return domain.table('tasks') as KvTable<ScheduleRecord['id'], ScheduleTask>
|
||||
}
|
||||
|
||||
function childTask(record: ScheduleRecord): ScheduleTask {
|
||||
return { sessionId: childId, record, status: 'active', deliveryHistory: { records: [], earlierRecordsUnavailable: false } }
|
||||
}
|
||||
|
||||
it('refuses to create a reminder for a live subagent Session and stores nothing', async () => {
|
||||
const test = await setup()
|
||||
const child = agentFor(test.ctx, childId, { origin: 'subagent', parentSession: parentId, delegationDepth: 1 })
|
||||
await test.ctx.agents.register(child)
|
||||
const changed = vi.fn()
|
||||
test.ctx.on('schedule/changed', changed)
|
||||
|
||||
await expect(test.service.create(child.session.id, { prompt: 'Check', title: 'Check', after_seconds: 60 }))
|
||||
.rejects.toMatchObject({ code: 'subagent_session' })
|
||||
|
||||
expect([...table(test).entries()]).toEqual([])
|
||||
expect(changed).not.toHaveBeenCalled()
|
||||
expect(test.resolve).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('refuses to create for a Session whose live Agent a delegating parent owns', async () => {
|
||||
const test = await setup()
|
||||
const parent = agentFor(test.ctx, parentId)
|
||||
await test.ctx.agents.register(parent)
|
||||
const child = agentFor(test.ctx, childId, { parentSession: parentId, delegationDepth: 1 })
|
||||
test.ctx.agents.enter(child, parent)
|
||||
|
||||
await expect(test.service.create(childId, { prompt: 'Check', title: 'Check', after_seconds: 60 }))
|
||||
.rejects.toMatchObject({ code: 'subagent_session' })
|
||||
|
||||
expect([...table(test).entries()]).toEqual([])
|
||||
})
|
||||
|
||||
it('refuses to update a stored reminder bound to a delegated child Session', async () => {
|
||||
const record = createAfterScheduleRecord(ScheduleId('subagent-task'), 'Exact prompt', 60, Date.now(), 'Child task')
|
||||
const task = childTask(record)
|
||||
const test = await setup(task)
|
||||
const child = agentFor(test.ctx, childId, { origin: 'subagent', delegationDepth: 1 })
|
||||
await test.ctx.agents.register(child)
|
||||
const put = vi.spyOn(table(test), 'put')
|
||||
const changed = vi.fn()
|
||||
test.ctx.on('schedule/changed', changed)
|
||||
|
||||
// The refusal travels the ordinary non-mutating result so the Web editor renders
|
||||
// `timing.subagentSession` instead of a generic Remote failure.
|
||||
await expect(test.service.update({
|
||||
sessionId: childId, id: record.id, expected: record, change: { kind: 'every', every_seconds: 600 },
|
||||
})).resolves.toEqual({
|
||||
code: 'subagent_session',
|
||||
message: 'This Session belongs to subagent routing, which never receives reminder delivery.',
|
||||
})
|
||||
|
||||
expect(put).not.toHaveBeenCalled()
|
||||
expect(changed).not.toHaveBeenCalled()
|
||||
expect(table(test).get(record.id)).toEqual(task)
|
||||
expect(test.resolve).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('refuses a delegated child recorded only by its delegation depth', async () => {
|
||||
const test = await setup()
|
||||
// No `origin`/ownership link: the persisted header's delegation depth is the only
|
||||
// record, which is the accounting the delegation cap itself reads.
|
||||
const child = agentFor(test.ctx, childId, { delegationDepth: 1 })
|
||||
await test.ctx.agents.register(child)
|
||||
|
||||
await expect(test.service.create(child.session.id, { prompt: 'Check', title: 'Check', after_seconds: 60 }))
|
||||
.rejects.toMatchObject({ code: 'subagent_session' })
|
||||
|
||||
expect([...table(test).entries()]).toEqual([])
|
||||
})
|
||||
|
||||
it('still creates a reminder for a top-level Agent', async () => {
|
||||
const test = await setup()
|
||||
const owner = agentFor(test.ctx, parentId)
|
||||
await test.ctx.agents.register(owner)
|
||||
|
||||
const record = await test.service.create(parentId, { prompt: 'Check', title: 'Check', after_seconds: 60 })
|
||||
|
||||
expect(record.title).toBe('Check')
|
||||
expect(await test.service.list({ sessionId: parentId })).toEqual([record])
|
||||
})
|
||||
|
||||
it('still lists and deletes a stored reminder bound to a delegated child Session', async () => {
|
||||
const record = createAfterScheduleRecord(ScheduleId('legacy-subagent-task'), 'Exact prompt', 60, Date.now(), 'Legacy task')
|
||||
const test = await setup(childTask(record))
|
||||
const child = agentFor(test.ctx, childId, { origin: 'subagent', delegationDepth: 1 })
|
||||
await test.ctx.agents.register(child)
|
||||
|
||||
expect(await test.service.list({ sessionId: childId })).toEqual([record])
|
||||
expect((await test.service.catalog()).map(entry => entry.id)).toEqual([record.id])
|
||||
expect(await test.service.delete({ sessionId: childId, id: record.id })).toEqual({ id: record.id, deleted: true })
|
||||
expect(table(test).get(record.id)).toBeUndefined()
|
||||
})
|
||||
@@ -341,7 +341,7 @@ it('rejects persistence failures without publishing the new rule and permits a l
|
||||
await expect(test.service.update(request(record))).rejects.toThrow('Schedule service is stopping')
|
||||
})
|
||||
|
||||
it('does not append historical Session events and exposes the in-place update tool', async () => {
|
||||
it('does not append historical Session events and registers no tool', async () => {
|
||||
const test = await setup()
|
||||
const agent = agentFor(test.ctx, sessionId)
|
||||
await test.ctx.agents.register(agent)
|
||||
@@ -349,8 +349,8 @@ it('does not append historical Session events and exposes the in-place update to
|
||||
const events = agent.session.snapshotEvents()
|
||||
expect(await test.service.update(request(record))).toMatchObject({ updated: true })
|
||||
expect(agent.session.snapshotEvents()).toEqual(events)
|
||||
expect(test.ctx.tools.get('schedule_update', agent)).toBeDefined()
|
||||
expect(test.ctx.tools.get('schedule_create', agent)).toBeDefined()
|
||||
expect(test.ctx.tools.get('schedule_update', agent)).toBeUndefined()
|
||||
expect(test.ctx.tools.get('schedule_create', agent)).toBeUndefined()
|
||||
expect(test.resolve).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
# Bilingual-pair consistency record for README.md (docs/i18n/README.md): per heading
|
||||
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
|
||||
# After editing either side, bring the other along and re-record with:
|
||||
# pnpm run verify-translation-pairing --write packages/schedule/tool-schedule/README.md
|
||||
/:
|
||||
en: 5bcd39034f505033
|
||||
zh: 9bfd85a1ad52bc67
|
||||
/deepseek-ai-dsh-tool-schedule:
|
||||
en: eb91320d8594cfca
|
||||
zh: 7a900a2029baafa5
|
||||
/deepseek-ai-dsh-tool-schedule/summary:
|
||||
en: 3552ccd992a1540e
|
||||
zh: 13241608f0b9fc8a
|
||||
/deepseek-ai-dsh-tool-schedule/table-of-contents:
|
||||
en: d152484eb41ac6b4
|
||||
zh: 09388d293f9be9cb
|
||||
/deepseek-ai-dsh-tool-schedule/use-this-package:
|
||||
en: a692cac1bda0f1bc
|
||||
zh: 3cc2e4bff8062e4e
|
||||
/deepseek-ai-dsh-tool-schedule/use-this-package/when-to-choose-it:
|
||||
en: a9203babc3d8db01
|
||||
zh: 4b26bfe528f39972
|
||||
/deepseek-ai-dsh-tool-schedule/use-this-package/the-four-tools:
|
||||
en: f8aae686d0531c29
|
||||
zh: 3cccd1ba81aae48d
|
||||
/deepseek-ai-dsh-tool-schedule/use-this-package/minimal-configuration:
|
||||
en: eef3a83c0ffb2931
|
||||
zh: 9b527abfde4c3406
|
||||
/deepseek-ai-dsh-tool-schedule/understand-the-implementation:
|
||||
en: 065702b7a82b8fa1
|
||||
zh: 642037baaa2c0f1d
|
||||
/deepseek-ai-dsh-tool-schedule/understand-the-implementation/source-map:
|
||||
en: 7e398b6e198c4be0
|
||||
zh: da97b96fa6736445
|
||||
/deepseek-ai-dsh-tool-schedule/further-exploration:
|
||||
en: 1484566b323c3cff
|
||||
zh: 1b1b9fbf85daf3fa
|
||||
/deepseek-ai-dsh-tool-schedule/model-experience:
|
||||
en: 215e7ba838619b7b
|
||||
zh: a311da3843709f90
|
||||
/deepseek-ai-dsh-tool-schedule/model-experience/tool-schemas:
|
||||
en: 3039bc5e7a796b21
|
||||
zh: 6b7a9eaf69c9ea53
|
||||
/deepseek-ai-dsh-tool-schedule/model-experience/tool-schemas/what-the-model-sees:
|
||||
en: 82465f7520c67ddd
|
||||
zh: eb9014c758b687c5
|
||||
/deepseek-ai-dsh-tool-schedule/model-experience/tool-schemas/token-effect:
|
||||
en: 70fb9094859d0804
|
||||
zh: 30726b045484713c
|
||||
/deepseek-ai-dsh-tool-schedule/model-experience/tool-schemas/kv-cache-effect:
|
||||
en: 332231fb9f1b8146
|
||||
zh: eace0b2e789d1c0f
|
||||
/deepseek-ai-dsh-tool-schedule/model-experience/reminder-results:
|
||||
en: ffeb087f9476fddf
|
||||
zh: 94569d39555d5192
|
||||
/deepseek-ai-dsh-tool-schedule/model-experience/reminder-results/what-the-model-sees:
|
||||
en: 68ce690c2d5c2312
|
||||
zh: d3a9fca950518702
|
||||
/deepseek-ai-dsh-tool-schedule/model-experience/reminder-results/token-effect:
|
||||
en: a08931b2c5048399
|
||||
zh: 758ea2131adb23e4
|
||||
/deepseek-ai-dsh-tool-schedule/model-experience/reminder-results/kv-cache-effect:
|
||||
en: 2fbf2175168e8244
|
||||
zh: 9c4c1964ae59e661
|
||||
/deepseek-ai-dsh-tool-schedule/known-limitations-and-deferred-work:
|
||||
en: b1631143d20598e5
|
||||
zh: 39da52b36da27b03
|
||||
/deepseek-ai-dsh-tool-schedule/known-limitations-and-deferred-work/dev-note:
|
||||
en: e67f633dc6fe7773
|
||||
zh: b2ee0fbaa165910d
|
||||
@@ -0,0 +1,132 @@
|
||||
---
|
||||
description: "Preset-scoped reminder management tools (schedule_create, schedule_list, schedule_update, schedule_delete) over the Host ctx.schedule service, for deployments choosing which agents may keep durable reminders."
|
||||
kind: "package-reference"
|
||||
---
|
||||
|
||||
# @deepseek-ai/dsh-tool-schedule
|
||||
|
||||
English | [中文](README.zh.md)
|
||||
|
||||
## Summary
|
||||
|
||||
Use `dsh-tool-schedule` to let an agent create, list, edit, and delete durable Host reminders through `schedule_create`, `schedule_list`, `schedule_update`, and `schedule_delete`. The package registers the four tools in the preset or Agent scope that mounts it, so the composition decides which agents receive them; `minimal` keeps none. Each call acts on the calling Agent's Session and only manages stored reminders — the Host `@deepseek-ai/dsh-schedule` service owns storage, scheduling, and delivery. Failures return one structured error code instead of storage details.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [Use this package](#use-this-package)
|
||||
- [Understand the implementation](#understand-the-implementation)
|
||||
- [Further Exploration](#further-exploration)
|
||||
- [Model Experience](#model-experience)
|
||||
- [Known Limitations and Deferred Work](#known-limitations-and-deferred-work)
|
||||
- [Dev Note](#dev-note)
|
||||
|
||||
-----
|
||||
|
||||
<a id="use-this-package"></a>
|
||||
## Use this package
|
||||
|
||||
Add the row below to a preset's plugin list when that preset's agents should manage durable reminders. The shipped Web `standard`, `cordis`, and `ptc` presets mount it; `minimal` does not.
|
||||
|
||||
### When to choose it
|
||||
|
||||
Choose it for any preset whose agents need to schedule future work in their own Session, and load `@deepseek-ai/dsh-schedule` in the same process: this package is only the model-facing consumer of that service. A preset that should stay capability-poor — `minimal` is the shipped example — omits the row, and its agents see no reminder tool at all.
|
||||
|
||||
### The four tools
|
||||
|
||||
- `schedule_create(prompt, title, <one selector>)` — Create one reminder. Supply a non-empty prompt, a title of at most 120 characters, and exactly one of `after_seconds`, `at`, `every_seconds`, `daily`, `weekly`, or `cron`. Returns the canonical reminder view.
|
||||
- `schedule_list()` — List every active reminder of the calling Session with its id, title, UTC target, state, and delivery mode.
|
||||
- `schedule_update(id, <title|prompt|one selector>)` — Replace the name, instruction, or timing in place, or a combination of them. An unknown or ended reminder returns `updated: false` with the reason code; `after_seconds` is create-only.
|
||||
- `schedule_delete(id)` — Remove one retained reminder, active or ended. Unknown or already-deleted ids return `deleted: false`.
|
||||
|
||||
### Minimal configuration
|
||||
|
||||
```yaml
|
||||
- name: '@deepseek-ai/dsh-tool-schedule'
|
||||
```
|
||||
|
||||
The package declares no `Config` fields. It injects `ctx.tools` and registers the four tools once the scope resolves the Host `ctx.schedule` service, so a composition that keeps that service off mounts no reminder tool. Each call acts on the Session of the Agent that dispatched it.
|
||||
|
||||
-----
|
||||
|
||||
<a id="understand-the-implementation"></a>
|
||||
## Understand the implementation
|
||||
|
||||
<details>
|
||||
<summary>Implementation internals — click to expand</summary>
|
||||
|
||||
The plugin registers four `defineTool` definitions through the context that loads it, so a preset mount decides visibility and Cordis effect ownership disposes them with the mount. Execution reads `exec.agent` for the Session binding and the injected `ctx.schedule` service for storage; the delegation-depth guard runs before selector and identity checks, all before the service call, and any failure the service raises that is not a `ScheduleInputError` collapses to `internal_error` so storage details never reach the model. Model content is the canonical JSON of the returned value, and the Host service owns persistence, scheduling, Session restoration, and delivery.
|
||||
|
||||
### Source map
|
||||
|
||||
| File | Role |
|
||||
|---|---|
|
||||
| [`src/index.ts`](src/index.ts) | Plugin entry: the four registrations, selector validation, and the render/present helpers |
|
||||
| — | No runtime invariant companion is published; the tools hold no independent lifecycle stream, and the relations they preserve belong to the `ctx.schedule` service. |
|
||||
|
||||
</details>
|
||||
|
||||
-----
|
||||
|
||||
<a id="further-exploration"></a>
|
||||
## Further Exploration
|
||||
|
||||
- [Schedule service](../schedule/README.md) — the Host task store, runtime, and delivery behavior these tools manage.
|
||||
- [Schedule group map](../README.md) — the sibling packages in this group.
|
||||
- [Generated tool catalog](../../../docs/tool-catalog.md#deepseek-aidsh-tool-schedule) — the exact four schemas the model receives.
|
||||
- [Schedule subsystem](../../../docs/subsystems/schedule.md) — the `ctx.schedule` Cordis surface and stored types.
|
||||
- [Schedule user guide](../../../docs/user/guide/schedule.md) — the user-facing reminder workflow.
|
||||
|
||||
-----
|
||||
|
||||
<a id="model-experience"></a>
|
||||
## Model Experience
|
||||
|
||||
### Tool schemas
|
||||
|
||||
#### What the model sees
|
||||
|
||||
The generated [`schedule_create`, `schedule_list`, `schedule_update`, and `schedule_delete` schemas](../../../docs/tool-catalog.md#deepseek-aidsh-tool-schedule) whenever this package is visible in the calling Agent's scope.
|
||||
|
||||
#### Token effect
|
||||
|
||||
A fixed schema cost on every request from an Agent whose preset mounts the package. Agents under a preset that omits the row pay nothing.
|
||||
|
||||
#### KV Cache effect
|
||||
|
||||
Prefix-stable while tool definitions and visibility are unchanged. Mounting, disposal, or a scope change may invalidate reuse from the first changed schema token.
|
||||
|
||||
### Reminder results
|
||||
|
||||
#### What the model sees
|
||||
|
||||
One lossless JSON text block per call: a reminder view for `schedule_create`, an array of views for `schedule_list`, `{ id, deleted }` for `schedule_delete`, and a reminder view or `{ id, updated: false, code }` for `schedule_update`. A rejected call returns `{ code, message }` carrying one published error code.
|
||||
|
||||
#### Token effect
|
||||
|
||||
Results remain in the calling Session's history until compaction and repeat the stored reminder fields; a long reminder list costs its full rendered length on every later request.
|
||||
|
||||
#### KV Cache effect
|
||||
|
||||
Append-only; newly visible content follows the reusable request prefix and does not invalidate existing KV Cache entries.
|
||||
|
||||
## Known Limitations and Deferred Work
|
||||
|
||||
<a id="known-limitations-and-deferred-work"></a>
|
||||
|
||||
- **No tools without the Host service** — a composition that mounts this package without `ctx.schedule` leaves the plugin pending, so none of the four tools register.
|
||||
- **Every call needs a calling Agent** — a call dispatched without one returns `internal_error` rather than guessing a Session.
|
||||
- **Deletion does not retract a queued message** — a reminder the Host already delivered stays in the Session inbox after `schedule_delete`.
|
||||
- **Reminder timing belongs to the Host** — the tools expose no target-time correction, clock source, or delivery retry; those limits are the service's.
|
||||
- **Every tool refuses a delegated caller** — each of `schedule_create`, `schedule_list`, `schedule_update`, and `schedule_delete` reads the calling Agent's delegation depth before dispatch and returns `{ code: 'subagent_session', message: 'A delegated subagent cannot use reminders.' }` when that depth is above zero. The guard lives in this package and reads `delegationDepthOf` from `@deepseek-ai/dsh-subagent`, the same accounting the delegation cap enforces, so it holds under any preset that mounts the tools.
|
||||
- **A preset's delegation rows remove the four tools from a child's prompt** — the `standard`, `cordis`, and `ptc` presets declare `toolFilter.deny` for `schedule_create`, `schedule_delete`, `schedule_list`, and `schedule_update` on both the `tool-subagent` and `tool-subagent-fork` rows. The provider applies that filter through `ctx.tools.restrict()` in the child scope, so the four tools leave a delegated child's prompt; delegating further on that chain intersects the same restriction.
|
||||
- **A Session a delegated child owns cannot arm a reminder** — `ScheduleService.create` throws `ScheduleInputError` with code `subagent_session`, and `ScheduleService.update` returns the non-mutating `subagent_session` result, when the Session's Agent has a delegation depth above zero. The delegation depth is the accounting the delegation cap itself reads, and the persisted session header carries it across a cold resume. The rule sits in the service, not in these tools, so other in-process consumers reach it too: the Automation surface included. `schedule_list` and `schedule_delete` still serve that Session, so a reminder stored before this rule stays removable.
|
||||
|
||||
<a id="dev-note"></a>
|
||||
### Dev Note
|
||||
|
||||
<details>
|
||||
<summary>Working context for maintainers — click to expand</summary>
|
||||
|
||||
None.
|
||||
|
||||
</details>
|
||||
@@ -0,0 +1,132 @@
|
||||
---
|
||||
description: "预设作用域的提醒管理工具(schedule_create、schedule_list、schedule_update、schedule_delete),基于宿主 ctx.schedule 服务,供选择哪些 agent 可以维护持久提醒的部署使用。"
|
||||
kind: "package-reference"
|
||||
---
|
||||
|
||||
# @deepseek-ai/dsh-tool-schedule
|
||||
|
||||
[English](README.md) | 中文
|
||||
|
||||
## 概述
|
||||
|
||||
使用 `dsh-tool-schedule`,可通过 `schedule_create`、`schedule_list`、`schedule_update` 与 `schedule_delete` 让 agent(智能体)创建、列出、编辑和删除宿主持久提醒。本包把四个工具注册进挂载它的 preset 或 Agent 作用域,因此由组合决定哪些 agent 获得这些工具;`minimal` 不获得。每次调用都作用于调用方 Agent 的 Session,并且只管理已存储的提醒——存储、调度与投递由宿主 `@deepseek-ai/dsh-schedule` 服务负责。失败时返回一个结构化错误码,而不是存储细节。
|
||||
|
||||
## 目录
|
||||
|
||||
- [使用本包](#use-this-package)
|
||||
- [理解实现](#understand-the-implementation)
|
||||
- [进一步探索](#further-exploration)
|
||||
- [模型体验](#model-experience)
|
||||
- [已知限制与延期工作](#known-limitations-and-deferred-work)
|
||||
- [开发备注](#dev-note)
|
||||
|
||||
-----
|
||||
|
||||
<a id="use-this-package"></a>
|
||||
## 使用本包
|
||||
|
||||
当某个 preset 的 agent 需要管理持久提醒时,把下面这一行加入该 preset 的插件列表。随产品发布的 Web `standard`、`cordis` 与 `ptc` preset 会挂载它;`minimal` 不会。
|
||||
|
||||
### 何时选用
|
||||
|
||||
当 preset 的 agent 需要在自己的 Session 中安排未来工作时选用它,并在同一进程内加载 `@deepseek-ai/dsh-schedule`:本包只是该服务面向模型的消费方。需要保持能力精简的 preset——随产品发布的例子是 `minimal`——会省略该行,其 agent 完全看不到提醒工具。
|
||||
|
||||
### 四个工具
|
||||
|
||||
- `schedule_create(prompt, title, <一个选择器>)` —— 创建一条提醒。需提供非空提示文本、不超过 120 个字符的标题,以及 `after_seconds`、`at`、`every_seconds`、`daily`、`weekly`、`cron` 中的恰好一个。返回规范提醒视图。
|
||||
- `schedule_list()` —— 列出调用方 Session 的全部活动提醒及其 id、标题、UTC 目标、状态与投递模式。
|
||||
- `schedule_update(id, <title|prompt|一个选择器>)` —— 原地替换名称、指令或时间,或它们的组合。未知或已结束的提醒返回 `updated: false` 及原因码;`after_seconds` 仅限创建时使用。
|
||||
- `schedule_delete(id)` —— 删除一条保留的提醒,无论活动还是已结束。未知或已删除的 id 返回 `deleted: false`。
|
||||
|
||||
### 最小配置
|
||||
|
||||
```yaml
|
||||
- name: '@deepseek-ai/dsh-tool-schedule'
|
||||
```
|
||||
|
||||
本包不声明任何 `Config` 字段。它注入 `ctx.tools`,并在作用域解析到宿主 `ctx.schedule` 服务后注册这四个工具,因此保持该服务关闭的组合不会挂载任何提醒工具。每次调用都作用于派发该调用的 Agent 的 Session。
|
||||
|
||||
-----
|
||||
|
||||
<a id="understand-the-implementation"></a>
|
||||
## 理解实现
|
||||
|
||||
<details>
|
||||
<summary>实现内部细节——点击展开</summary>
|
||||
|
||||
插件通过加载它的上下文注册四个 `defineTool` 定义,因此由 preset 挂载决定可见性,并由 Cordis effect 的所有权随挂载一并释放。执行时读取 `exec.agent` 作为 Session 绑定,并读取注入的 `ctx.schedule` 服务进行存储;委派深度守卫先于选择器与身份校验运行,二者均在服务调用之前完成,服务抛出的任何非 `ScheduleInputError` 失败都收敛为 `internal_error`,因此存储细节不会到达模型。模型内容为返回值的规范 JSON,而持久化、调度、Session 恢复与投递都由宿主服务负责。
|
||||
|
||||
### 源码映射
|
||||
|
||||
| 文件 | 作用 |
|
||||
|---|---|
|
||||
| [`src/index.ts`](src/index.ts) | 插件入口:四个注册、选择器校验,以及 render/present 辅助函数 |
|
||||
| — | 不发布运行时 invariant 伴随模块;这些工具不持有独立生命周期流,它们维护的关系属于 `ctx.schedule` 服务。 |
|
||||
|
||||
</details>
|
||||
|
||||
-----
|
||||
|
||||
<a id="further-exploration"></a>
|
||||
## 进一步探索
|
||||
|
||||
- [Schedule 服务](../schedule/README.zh.md) —— 这些工具所管理的宿主任务存储、运行时与投递行为。
|
||||
- [Schedule 分组映射](../README.zh.md) —— 本组内的同级包。
|
||||
- [生成的工具目录](../../../docs/tool-catalog.zh.md#deepseek-aidsh-tool-schedule) —— 模型接收的确切四个 schema。
|
||||
- [Schedule 子系统](../../../docs/subsystems/schedule.zh.md) —— `ctx.schedule` 的 Cordis 接线区域与存储类型。
|
||||
- [Schedule 用户指南](../../../docs/user/guide/schedule.zh.md) —— 面向用户的提醒工作流。
|
||||
|
||||
-----
|
||||
|
||||
<a id="model-experience"></a>
|
||||
## 模型体验
|
||||
|
||||
### 工具 schema
|
||||
|
||||
#### What the model sees
|
||||
|
||||
只要本包在调用方 Agent 的作用域内可见,模型就会收到生成的 [`schedule_create`、`schedule_list`、`schedule_update` 与 `schedule_delete` schema](../../../docs/tool-catalog.zh.md#deepseek-aidsh-tool-schedule)。
|
||||
|
||||
#### Token effect
|
||||
|
||||
凡是 preset 挂载了本包的 Agent,其每次请求都有固定的 schema 开销。省略该行的 preset 下的 Agent 不付出任何开销。
|
||||
|
||||
#### KV Cache effect
|
||||
|
||||
只要工具定义与可见性不变,前缀保持稳定。挂载、释放或作用域变化都可能使从首个变化 schema token 起的复用失效。
|
||||
|
||||
### 提醒结果
|
||||
|
||||
#### What the model sees
|
||||
|
||||
每次调用返回一个无损 JSON 文本块:`schedule_create` 返回提醒视图,`schedule_list` 返回视图数组,`schedule_delete` 返回 `{ id, deleted }`,`schedule_update` 返回提醒视图或 `{ id, updated: false, code }`。被拒绝的调用返回带有某个已发布错误码的 `{ code, message }`。
|
||||
|
||||
#### Token effect
|
||||
|
||||
结果会留在调用方 Session 的历史中直到压缩,并重复存储的提醒字段;较长的提醒列表在之后每次请求中都付出其全部渲染长度。
|
||||
|
||||
#### KV Cache effect
|
||||
|
||||
只追加;新可见内容跟在可复用的请求前缀之后,不会使既有 KV Cache 条目失效。
|
||||
|
||||
## Known Limitations and Deferred Work
|
||||
|
||||
<a id="known-limitations-and-deferred-work"></a>
|
||||
|
||||
- **没有宿主服务就没有工具** —— 在缺少 `ctx.schedule` 的组合中挂载本包会让插件保持挂起,四个工具都不会注册。
|
||||
- **每次调用都需要调用方 Agent** —— 未携带 Agent 的派发返回 `internal_error`,而不会猜测某个 Session。
|
||||
- **删除不会撤回已排队的消息** —— 宿主已经投递的提醒在 `schedule_delete` 之后仍留在 Session 收件箱中。
|
||||
- **提醒时间由宿主负责** —— 这些工具不提供目标时间校正、时钟来源或投递重试;这些限制属于该服务。
|
||||
- **每个工具都拒绝被委派的调用方** —— `schedule_create`、`schedule_list`、`schedule_update` 与 `schedule_delete` 都会在派发前读取调用方 Agent 的委派深度,当该深度大于零时返回 `{ code: 'subagent_session', message: 'A delegated subagent cannot use reminders.' }`。该守卫位于本包内,读取来自 `@deepseek-ai/dsh-subagent` 的 `delegationDepthOf`,即委派封顶本身执行的同一份记账,因此在任何挂载这些工具的 preset 下都成立。
|
||||
- **preset 的委派行让这四个工具从子 agent 的 prompt 中消失** —— `standard`、`cordis` 与 `ptc` preset 在 `tool-subagent` 与 `tool-subagent-fork` 两行上都声明 `toolFilter.deny`,拒绝 `schedule_create`、`schedule_delete`、`schedule_list` 和 `schedule_update`。provider 会在子作用域内通过 `ctx.tools.restrict()` 应用该过滤,因此这四个工具会从被委派子 agent 的 prompt 中消失;在子链上继续委派会沿链求交同一限制。
|
||||
- **被委派子 agent 拥有的 Session 不能设置提醒** —— 当 Session 的 Agent 委派深度大于零时,`ScheduleService.create` 会抛出 `ScheduleInputError`(code 为 `subagent_session`),`ScheduleService.update` 则返回非变更的 `subagent_session` 结果。委派深度正是委派封顶本身读取的同一份记账,持久化 session header 让它在冷恢复后仍然成立。这条规则在服务层而非这些工具里,因此其它进程内消费方(包括自动化任务页面)也会命中。`schedule_list` 与 `schedule_delete` 仍可服务该 Session,所以在这条规则之前存储的提醒仍可删除。
|
||||
|
||||
<a id="dev-note"></a>
|
||||
### 开发备注
|
||||
|
||||
<details>
|
||||
<summary>维护者工作上下文——点击展开</summary>
|
||||
|
||||
None.
|
||||
|
||||
</details>
|
||||
Loaded 100 of 142 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user