vlln/dsh-loop

DSH 插件:定时循环(/loop 命令 + loop 工具 + 活动状态条)。官方 bundle 插件,dsh plugin --profile web add 安装

Bundle 已验证 MIT JavaScript 未知
Bundle 已验证

已收录

4

Workflow

Bundle 已验证

版本未知
语言JavaScript
许可证MIT
在 GitHub 查看

功能介绍

定时循环:`/loop` 命令 + loop 工具 + 活动状态条。

适合

  • 适合按固定间隔轮询 PR、部署、队列或外部状态的流程。
  • 适合 Agent 可自行调整或停止循环的构建、修复、测试及维护周期。
  • 适合在同一会话中并行运行多个独立定时提示,并查看其活动状态。

不适合

  • 不适合必须跨 DSH 进程重启保留的持久计划,因为循环只存在于当前进程。
  • 不适合无需重复触发的一次性任务,此时循环没有实际价值。
  • 不适合要求 DSH 停止或不可用时仍保证执行的工作流。

README

loop

中文 | English

Scheduled loop plugin: /loop command + loop tool (self-adjusting by the model) + active status bar on the chat page, with support for multiple concurrent loops

license

Delivers a prompt to the current agent at a fixed interval — ideal for polling, PR babysitting, and build-fix-test cycles. Aligned with Claude Code’s /loop semantics, multiple loops can run concurrently in a single session. Delivered as an official bundle plugin (dsh.bundle + dshClient channel), 0 patch.

Preview

loop status bar (real run screenshot: multiple loops collapse into a count bar, expanding lists them one by one)

Features

Tool (registered via defineTool, the model can self-adjust on every turn):

Tool Description
loop start (start a new loop) / stop (stop a specific one or all) / status / list (list loops in the current session)

Commands (user side):

Command Description
/loop [interval] <prompt> Start a new loop (interval 5m/30s/1h/2d or a bare number = minutes; bare /loop uses the built-in maintenance prompt)
/loop list List all loops in the current session (with ids)
/loop stop <id> / /loop stop Stop a specific loop / stop all

UI (dock slot above the input box on the chat page):

Feature Description
Active status bar Single loop: ● ⟳ looping · <prompt> · 5m · next in 23s; multiple loops collapse into a count bar “N loops running · expand”, click to expand the list

Installation

Recommended: one-line install from a git source (build artifacts are committed, so a git source does not trigger a build):

dsh plugin --profile web add "github:vlln/dsh-loop#main"   # one-line git source (build artifacts committed)
# or npm source: dsh plugin --profile web add @vlln/dsh-loop@0.3.0

Or from a local directory (when you have the source): git clone, then cd dsh-loop && dsh plugin --profile web add ..

After installing, restart web for it to take effect (bundles are composed at startup); afterwards you can disable/enable it from the “Plugins” panel on the settings page (takes effect at runtime + persisted).

Usage

# User side
/loop 5m check PRs on the deploy branch   # delivered every 5 minutes
/loop list                                # loop-1: every 5m — check PRs on the deploy branch
/loop stop loop-1                         # stop a specific one
/loop stop                                # stop all

# Model side (loop tool)
loop action=start prompt="fix flaky test" interval="2m"
loop action=status
loop action=stop loop_id="loop-2"

Loops live in the current harness process and disappear when the process exits (not persisted across restarts, consistent with Claude Code /loop).

Development

pnpm install
pnpm run build      # tsdown: Node half (lib/index.mjs) + client bundle (lib/client.js)
  • Node half: src/index.mjs (commands/tool/loops status route /plugins/dsh-loop/loops)
  • client: src/client/index.tsx (dock slot status bar)

License

MIT License (example plugin of the DSH ecosystem).

常见问题常见问题

在启用了 DSH 的终端中执行已验证命令 dsh plugin --profile default add github:vlln/dsh-loop。命令会解析公开 package 元数据,并保持插件与本页展示的目录身份一致。