dsh-schedule-enable:启用 DeepSeek Harness 内置调度器

DeepSeek Harness 的设计理念是「一切皆插件」。对于需要定时任务的 Agent 开发者来说,手动实现或引入外部调度库会增加复杂度。DSH 内置了 @deepseek-ai/dsh-schedule,但默认并未挂载到 profile 中。dsh-schedule-enable 是一个纯配置层 bundle,它的作用是把这个内置调度器启用,让 Agent 拥有管理提醒的能力。

这是一个 纯 patch-only bundle(配置层),由用户 shixiong0529 维护。它不包含模块入口,仅通过配置将 @deepseek-ai/dsh-schedule 注入到组合 profile 中。

核心功能

启用后,活跃的根 Agent 会获得 3 个 Agent 作用域的调度管理工具:

工具 作用
schedule_create 创建持久化提醒。支持 after_seconds(延迟)、at(目标时间)或 every_seconds(固定频率,最小 300 秒)。
schedule_list 列出当前会话的全部活跃提醒,包含 id、UTC 目标时间、状态及投递方式。
schedule_delete 按精确 id 删除一条活跃提醒。未知或已结束的 id 返回 deleted: false。

安装

安装到 Web profile(web):

dsh plugin --profile web add github:shixiong0529/dsh-schedule-enable

这条命令会自动把 dsh-schedule-enable 追加到该 profile 的 dsh.profile.bundles。安装后重启 profile(重新启动 dsh web),组合配置就会插入 time-context 和 schedule 两行,调度器即可用。

典型用法

重启服务后,在 Web 界面新建一个会话,对 Agent 发送指令:

提醒我 3 天后检查备份,并把提醒内容定下来。

Agent 会调用 schedule_create。到点时,会话内会出现一条 [SCHEDULE REMINDER] 消息,由模型正常跟进处理。

要求与限制

环境要求

  • DeepSeek Harness:0.1.1-rc.2 或更高版本。
  • Node.js:^22.19.0 或 >=24.0.0。
  • Profile 依赖:目标 profile 需组合 @deepseek-ai/dsh-base(Web profile 还需 @deepseek-ai/dsh-web-app),它们提供 sessions、agents 等基础服务。

行为限制

  • 仅新建会话生效:调度工具只在 profile 重启后新建的根 Agent 会话中可用。已存在的旧会话不会自动获得 schedule_create / schedule_list / schedule_delete。
  • 频率限制:固定频率下限为 300 秒(5 分钟),不支持 Cron/日历表达式。
  • 投递语义:
    • 仅会话内投递:提醒只在原会话活跃时运行。冷会话恢复后按 overdue 处理。
    • 不保证精确一次:在特定崩溃场景下可能重复触发一次提醒。

验证

若安装后「插件列表」里看不到 @deepseek-ai/dsh-schedule,可以先运行以下命令检查配置:

dsh --profile web --dump-config

确认输出末尾有 time-context 与 schedule 两行且没有 disabled: true。

总结

dsh-schedule-enable 是一个轻量级的配置层插件,用于在 DeepSeek Harness 中启用内置的持久化调度能力。它不依赖外部包,适合需要在 Agent 中快速实现定时提醒功能的场景。

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

小夜