DeepSeek Harness 插件

dsh-delay-tools

Delayed wake-up for DeepSeek Harness: schedule a reminder N minutes out and the agent wakes in the SAME conversation to reply — unlike cron schedulers that spawn fresh sessions. Also provides a wait(英文原文)

跳到安装方式

来源信息

GitHub 仓库
keyiadiannao/dsh-delay-tools
最近更新
2026年8月20日
分类
自动化与任务
GitHub stars
0
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/keyiadiannao/dsh-delay-tools
插件名:dsh-delay-tools
作者:keyiadiannao

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器3 个文件
README.md来源说明 · 只读预览

dsh-delay-tools

Delay utilities for DeepSeek Harness: two tools sharing one core concept — delay:

ModeToolWhat the agent does while waitingUser messages during the waitTypical use
Wakeschedule_reminderkeeps working; wakes up in the SAME conversation when duehandled normally"remind me in 3 minutes about X"
Gatewaitblocks the current turnqueued, processed after"wait 30 seconds, then continue", cooldowns

Why

A plain background shell timer cannot do "wake me in 3 minutes": DSH background jobs are bound to the agent turn's lifecycle and get torn down when the turn ends (ctx.jobs owner-scoped dispose — the process exits with 0xC000013A and the cancel is misreported as completed). This plugin uses a host-level timer (not bound to any turn) plus the official followup() wake channel to deliver the message back into the same conversation.

Install

dsh plugin add github:keyiadiannao/dsh-delay-tools#master

Usage

Tell the agent:

> Call the schedule_reminder tool and remind me in 30 seconds to drink water.

The agent calls the tool and returns the expected trigger time; when the delay elapses it wakes up and delivers the reminder in the same conversation. No matter how many other turns happen in between (including new messages you send), the reminder arrives on time. Multiple reminders per conversation are supported — each has its own reminder_id.

> Durability note: reminders live in process memory. They survive agent > turns (and plugin reloads cancel them cleanly), but restarting the DSH > host cancels all pending reminders. Durable persistence is on the roadmap.

Tool parameters

ParamTypeRequiredDescription
delay_msnumbernoDelay in ms, default 60000; clamped to minDelayMs..maxDelayMs
messagestringyesThe text the agent delivers to you when the delay elapses

Return value

scheduled / due_at / delay_ms / pending (how many reminders are still pending for this agent).

The second mode: wait (timed gate)

schedule_reminder means "wake later, keep working meanwhile"; wait is the opposite — it blocks the current turn, and the agent only continues after the countdown:

> Call the wait tool for 30 seconds, then continue.

wait takes only delay_ms and returns waited_ms / elapsed_until / note. Messages you send during the gate go into the inbox queue (the composer shows "N queued messages") and are processed after the countdown — which makes it a reliable trigger for testing queue/merge plugins such as dsh-queue-merge.

wait observes exec.signal per the tools contract: pressing the stop button mid-wait interrupts the gate immediately (returns note: 'Wait interrupted by the user (stop).') instead of hanging for the full delay.

Configuration

- id: dsh-delay-tools
  config:
    defaultDelayMs: 60000       # default delay when delay_ms is omitted
    maxDelayMs: 3600000         # upper bound for a single delay
    minDelayMs: 1000            # lower bound, guards against instant re-entry

How it works

user: "tell me X in 3 minutes"
  ↓
schedule_reminder(delay_ms, message)
  ↓
host setTimeout(delay).unref()      ← not bound to any turn lifetime
  ↓ (turn ends, teardown, further turns — none of it matters)
due → agent.followup(userMessage)   ← official wake channel
  ↓
agent (idle) opens a new turn → replies in the same conversation

Key points:

  • The timer lives in the plugin apply scope, not ctx.jobs (which dies

with the owning turn).

  • setTimeout().unref() lets the process exit normally when only the timer is

left — it never blocks the DSH lifecycle.

  • agent.followup() is the runtime's official wake channel: a wake submitted

while the agent is idle always opens a new turn boundary (see the runtime-types comments), so cross-turn waking is a supported semantic.

Testing

tests/ holds config-validation tests (pnpm test). End-to-end verification:

1. New session → have the agent call schedule_reminder with a 30 s delay; 2. After the agent finishes its turn, send an interrupting message; 3. ~30 s later the agent wakes and delivers the reminder → cross-turn survival confirmed.

wait interruption: have the agent call wait for 40 s, press stop mid-way → the turn ends immediately instead of hanging for the full 40 s.

Roadmap

  • cancel_reminder / list_reminders tools (per-agent, by reminder_id)
  • Durable reminder store (reminders.json + re-hydrated timers on boot), so

reminders survive a DSH host restart

  • Pending-reminder cap

License

MIT