DeepSeek Harness Plugin

vlln/dsh-loop

Stars ★ 7 Downloads (30d) 1,185 Category Workflow & Automation Added 2026-08-13 npm @vlln/dsh-loop

Recurring loops: `/loop` command + loop tool + activity status bar.

Install

# from npm (prebuilt)

dsh plugin --profile web add @vlln/dsh-loop

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:vlln/dsh-loop

Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).

README

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

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

/loop replies (the command-palette title/description, list / usage / stop output) follow the UI language: the client half relays its active locale to the plugin, so they render in Chinese or English to match the interface. Headless runs with no client in sight keep English.

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
/ menu row Typing / in the composer shows the ⟳ icon at the left of the /loop row (same position and size as every other command row), with a localized title ("Loop" / "循环")

Settings

The plugin ships a settings card on Settings → Plugins → this bundle's page (official plugins.bundle.config slot, keyed by the bundle package name @vlln/dsh-loop; the settings namespace is dsh-loop, the id of the entry that exports the Config schema). Each tool gets its own row with an official-looking Switch:

Setting Default Effect
Whether to inject the loop tool into the model on When off, the loop tool is not registered for agents: the model can no longer see or call it (tools.schemas has no loop). The /loop command (user side) and the status bar are unaffected.

The card fields are driven by the client LOOP_TOOL_FIELDS table, mirrored one-to-one by the Node-side tool definition table — adding a tool means adding one entry on each side, and the settings card grows a new switch row automatically.

Changes apply as soon as you save (the schema's leaves are marked .volatile(): the host commits in place without remounting the entry and emits loader/volatile-update) — the plugin re-reads the snapshot and registers/unregisters the affected tools on the fly, so new sessions pick it up without a restart. Tool schemas are resolved live at every session/prompt assembly (there is no per-session snapshot): in-flight sessions also see the change from their next turn, and turning a tool off drops it from tools.schemas immediately, so a model that called it earlier can no longer reach it (they can only reconcile that through the turn record). The /loop command (user side) and the status bar are unaffected.

Installation

Recommended: one-line install from npm (build artifacts ship in the package, no build triggered):

dsh plugin --profile web add @vlln/dsh-loop
# to track the latest commit instead: dsh plugin --profile web add "github:vlln/dsh-loop#main"

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

Compatibility

dsh version Status
0.2.0-rc.2 ✅ Verified (migrated against 0.2.0 on 2026-10-03; command surface re-checked 2026-10-15)
Other versions ⚠️ Unverified — if the /loop menu row loses its icon and localized title after a dsh upgrade (the command itself still works), upstream renamed an internal client command-surface method and the plugin silently falls back to the official fallback look

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).

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.