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 中快速實現定時提醒功能的場景。

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

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

小夜