← 返回列表
D

@huanlin/dsh-plugin-sleep

v0.1.0 · 4 天前发布

DSH plugin exposing a single `sleep` tool that lets the model pause for a configurable number of milliseconds, honoring cancellation.

dsh-plugin

README

dsh-sleep

DSH 插件:向模型暴露一个 sleep 工具,让模型按指定毫秒数暂停执行后再返回。适合等待时间相关条件成立(服务重启、debounce 窗口、retry backoff)且没有事件型工具可用的场景。

安装

sh

从 git 安装(推荐):


dsh plugin --profile <profile> add github:huanlinoto/dsh-plugin-sleep

从本地 checkout 开发安装:


dsh plugin --profile <profile> add link:D:\Projects\deepseek-harness\dsh-sleep

预构建策略:lib/ 入库,无 prepare 脚本,github: 安装开箱即用,无需 allowBuilds

配置

在 DSH GUI 设置页或 cordis.patch.yml 中配置:

| 字段 | 类型 | 默认值 | 说明 |
|------|------|--------|------|
| maxDurationMs | number | 60000 | 单次 sleep 上限毫秒数。超过会被 clamp 到此值,并在返回中标 clamped: true。 |
| defaultDurationMs | number | 0 | 当模型省略 duration_ms 时的回退值。 |

工具

sleep

暂停 N 毫秒后返回。

参数:

| 参数 | 类型 | 必填 | 说明 |
|------|------|------|------|
| duration_ms | integer | 是 | 暂停毫秒数,必须 ≥ 0。超过 `ma

版本兼容矩阵

DSH 版本状态说明
dsh@0.1.0-rc.6 ✅ 兼容 cordis patch ✅
dsh@0.1.0 ✅ 兼容 标准 patch ✅
dsh@0.2.0 ⚠️ 待验证 待实测(API 可能在变)
dsh@0.3.0+ ❓ 未知 尚未发布

💡 兼容矩阵每周末自动跑实测,欢迎 PR 修正

元数据

License
AGPL-3.0
npm
@huanlin/dsh-plugin-sleep
Repo
Engines
{"node":">=18.0.0"}
Weekly DL
0
Monthly DL
0
dsh.bundle
{"bundle":{"patch":"./cordis.patch.yml"}}