dsh-plugin-loop
提供 `/loop` 斜杠命令的 DSH 插件,用于定时循环触发 Agent 任务(类似于 Claude Code 的 /loop 30m)。
AI 分析
核心用途是实现类似 Claude Code 的定时循环任务。适合需要设定固定时间间隔(如 30 分钟)让 Agent 自动循环执行特定目标的用户。
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:XiaoWind/dsh-plugin-loop说明文档
阅读完整 README ↗Usage
| Command | Result |
|---|---|
/loop 30m | Start a loop: tick now, then once every 30 minutes. Keeps any current objective. |
/loop 30m fix the tests | Start a 30-minute loop toward an objective. |
/loop fix the tests | Start a loop toward an objective at the default interval. |
/loop 1h30m | Combined durations are supported. |
/loop or /loop status | Show the running loop. |
/loop stop | Stop the loop. |
/loop help | Show help. |
Intervals are a whitespace-free sequence of `` tokens where
unit is one of ms, s, m, h, d — for example 90s, 30m, 1h30m,
2h.
A leading duration token is the interval and the remainder is the objective; with no leading duration, the whole input is the objective and the default interval applies.
Semantics
- First tick is immediate. Each later tick fires
intervalafter the agent returns to idle, so a running turn is never interrupted. - Process-local state. The loop lives in memory for the lifetime of the live
agent and is not persisted across restarts or session resumes. If you want a
durable objective with "keep going until done" semantics, pair this with
DSH's built-in
/goaland the goal round driver. - Manual stop. The loop runs until you run
/loop stop, the agent is disposed, or the plugin is unloaded. There is no automatic completion detection.
Configuration
Set config.defaultIntervalMs (milliseconds) to change the interval used by a
bare /loop with no leading duration token. The default is
600000 (10 minutes).