- Home
- Plugins
- Workflow & Automation
- dsh-workflow-bar
dsh-workflow-bar
jaycebox/dsh-workflow-bar
A saved-workflow library: /workflow lists stored scripts and runs one through the agent workflow tool, a left-sidebar page lists, creates and edits them, and each record is a JSON file under the DSH home. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.
Install
dsh plugin --profile web add github:jaycebox/dsh-workflow-barREADME
dsh-workflow-bar
English | 中文
A saved-workflow library for DeepSeek Harness (DSH): write a workflow script once, then run it by name from the composer, and manage the whole library from a row in the left sidebar.
/workflowopens a searchable picker of saved workflows; choosing one fills the composer with the exact command./workflow <name> <input>runs a saved workflow: the script, its metadata, and your input are handed to the agent'sworkflowtool.Workflow 库in the left sidebar opens the management page — list, search, create, edit, delete, and copy the run command.- Every run ends with a summary, because the plugin adds a standing system-prompt rule instead of hoping the model remembers to report back.
Contents
- Requirements
- Install
- Quick start
- Commands
- The picker
- The management page
- Where workflows live
- The agent tool
- Configuration
- Permissions and privacy
- Limitations
- Development
- Storefront assets
- Publishing to the plugin market
- License
Requirements
- DSH
0.2.2-rc.1or newer, Web or Desktop surface (the management page is a browser UI; the commands and the tool also work headlessly). - An agent preset that mounts the
workflowtool for the run path:standardandcordisdo,ptcandminimaldo not.
Install
From npm (published as dsh-workflow-bar):
dsh plugin --profile desktop add dsh-workflow-bar
From GitHub:
dsh plugin --profile desktop add github:Jaycebox/dsh-workflow-bar
From a local checkout: Plugins → Add plugin → the directory containing
this package.json. The same path works through the agent:
plugin_manager install_bundle target="<absolute path to this directory>"
Prebuilt tarball (no build approval): every release attaches the packed package, so this also works:
dsh plugin --profile desktop add -w "https://github.com/Jaycebox/dsh-workflow-bar/releases/download/v1.0.0/dsh-workflow-bar-1.0.0.tgz"
Installation writes the bundle into the profile and survives restarts. Reload the window once so the sidebar row and the client half are in the page's module graph.
Quick start
- Reload the window; a Workflow 库 row appears in the left sidebar.
- Type
/workflowin the composer and press Enter; pick a workflow from the list (or create one from the panel's 新建 button). - Type your input after the filled command and press Enter. The agent calls
the
workflowtool with the saved script and answers with a summary.
To have the agent author a workflow for you, run
/workflow-add 并行检索百度与谷歌并比较重合度 — it lists the library first,
designs the script, and saves it through the workflow_library tool.
Commands
| Command | What it does |
|---|---|
/workflow | Opens the picker of saved workflows. Choosing one completes the composer to /workflow <name> and focuses it. |
/workflow <name> <input> | Runs a saved workflow with your input. Without input, the record's defaultInput is used when one exists. |
/workflow-list [query] | Lists the library; the optional query filters names and descriptions. |
/workflow-add <requirement> | Starts the creation flow: the agent inspects the library, designs the script, and saves it. |
Bare /workflow also prints the registered names when the picker is not
available (headless or older surfaces), so the command is useful everywhere.
The picker
/workflow + Enter (or picking the row from the / menu) opens a popup
listing every saved workflow with its description, input hint, and default
input. It is a client-side decoration over the Host command
(ctx.commandUi.decorate with a popupSelect, the same shell /model and
/permission use), so the command keeps its catalog row, argument claim, and
lifecycle logging.
A leading space after /workflow claims the argument instead of opening the
popup — that is the contract for commands that declare an input hint, and it is
how you type a name the picker does not know.
The management page
The Workflow 库 row selects a page in the main column:
- List with a filter box; each row shows the name and one-line description.
- Detail with description, when-to-use, input hint, default input, update time, the exact run command (with a copy button), and the script source.
- 新建 / 编辑 with fields for name (a lowercase slug), description, when-to-use, input hint, default input, and the script body.
- 删除 in two steps: the first click arms it for five seconds, the second removes the record. Deleting is user-only; the agent tool cannot do it.
- 返回对话 returns the main column to the Conversation.
Where workflows live
One JSON file per workflow under $DSH_HOME/workflows (default
~/.dsh/workflows), or the directory the plugin row configures:
- id: workflow-bar
name: dsh-workflow-bar
config:
directory: 'D:\workflows'
{
"version": 1,
"name": "open-bilibili",
"description": "Open a bilibili page in the existing Chrome profile",
"whenToUse": "When you want bilibili open without typing a URL",
"argsHint": "Target: home page, search words, a BV id, or a full URL",
"defaultInput": "首页",
"script": "const target = String(args.input || '').trim()\n...",
"createdAt": "2026-12-02T00:00:00.000Z",
"updatedAt": "2026-12-02T00:00:00.000Z"
}
script is the body the workflow tool executes: plain JavaScript with
top-level await, the agent(), parallel(), pipeline(), phase(), and
log() hooks, and a final JSON return value. Your input reaches it as
args.input. Nothing is generated or evaluated by this plugin — the file is
plain data you can edit by hand or keep in version control.
The agent tool
workflow_library is host-wide and visible to every agent:
| Action | Purpose |
|---|---|
list | Names, descriptions, input hints, and defaults before creating anything. |
save | Persist one workflow: name, description, script, optional whenToUse, argsHint, defaultInput, and overwrite. |
Saving an existing name fails unless overwrite is true. Deleting is
user-only on purpose: a model cannot remove your library.
Configuration
| Field | Default | Meaning |
|---|---|---|
directory | $DSH_HOME/workflows | Where workflow files are read and written. |
summarySection | true | Add the standing "summarize every workflow run" prompt section. |
Permissions and privacy
- Reads and writes only inside the workflow directory; nothing else on disk.
- No outbound network. Workflows themselves may call the tools their child agents have; that is the script's business, not this plugin's.
- Adds one local HTTP route,
POST /workflow-bar/api, used by the management page. It accepts only loopback (or a deployment-trusted host) requests with a same-originOrigin, and only a fixed list of operations (list, detail, save, remove) — it is not a generic proxy into the Host. - Registers three slash commands, one model-facing tool (
workflow_library), one prompt section, and the sidebar page.
Limitations
- It does not execute scripts itself. The workflow engine lives inside each
Agent preset, so the run path is the agent calling the
workflowtool. A preset without that tool cannot run a workflow. - Running costs model tokens: one agent turn plus whatever the workflow's own subagents consume. Browsing the panel costs nothing.
- No run history in the panel. Runs are visible in the transcript (the official workflow-run node and the tool result).
- No recursion. A workflow script cannot call another saved workflow; DSH's
workflow engine has no
workflow()hook. - UI copy is Chinese. The panel and command output use Chinese text with the host's theme tokens; display metadata is localized for the plugin page.
Development
npm run check # node --check on every module + the client smoke test
npm run test # client bundle evaluation test
test/client-smoke.mjs evaluates the browser bundle against stubs and asserts
both slot registrations and the picker. It exists because node --check cannot
catch a broken template literal that still parses: a stray backtick in the CSS
once passed the syntax check and threw only at runtime, which unregistered the
whole plugin.
Layout:
| Path | Role |
|---|---|
lib/index.js | Host half: commands, tool, prompt section, API wiring |
lib/store.js | Workflow records on disk |
lib/prompts.js | Command output and the follow-up prompts |
lib/web.js | The same-origin JSON route and its trust fence |
lib/client.js | Sidebar row, management page, /workflow picker |
test/client-smoke.mjs | Browser-bundle evaluation test |
scripts/render-assets.py | Draws the storefront icon and panel illustration |
Storefront assets
assets/icon-256.png and assets/panel-illustration.png are produced by
scripts/render-assets.py (Pillow, bundled with the DSH runtime), and
screenshots.json declares the illustration for storefronts. The illustration
is drawn, not captured — it depicts the page faithfully but is not a live
window capture; replace the file with a real one when you have it and the
declaration keeps working. The plugin's own detail page still uses the vector
docs/preview.svg, which DSH renders natively.
Publishing to the plugin market
- Push the repository.
repository,homepage, andbugsinpackage.jsonalready point atJaycebox/dsh-workflow-bar; change them only if you publish under another account. - Community market (awesome-dsh-plugin).
dshmarketand the Discover page read theplugins.jsonthat awesome-dsh-plugin/awesome-dsh-plugin generates fromdata/plugins/*.yml. Submission is one file in a pull request: copymarket/awesome-dsh-plugin.ymltodata/plugins/Jaycebox__dsh-workflow-bar.yml. Two rules bite: the repository must be at least one day old and carry thedsh-plugintopic, and a customicon:must be a GitHub-hosted raster image (SVG is refused, so the card falls back to your avatar without one). - Official DSH market index (optional, self-hosted).
npm run indexgenerates a format-1 index atmarket/index.jsonfrom the current git remote and commit. Host it anywhere public (for example this repository's raw URL) and add it under Settings → plugin sources.
Tag releases with SemVer (v1.0.0) so an entry's version and added fields
stay meaningful.
License
MIT. See LICENSE.
Related plugins
ds-bot
fei-craft/ds-bot
webnovel-writer
lingfengqaq/webnovel-writer
loopx (dsh-loopx-plugin)
loopx-project/loopx
ouroboros (dsh-plugin)
q00/ouroboros