dsh-tool-workflow-plus: Adding Persistent Saved Workflow Library for Official Workflow Tool

Preface

When using the official @deepseek-ai/dsh-tool-workflow in DeepSeek Harness (DSH) to run multi-agent orchestration, a common practice is to hand the entire script to the model for execution during every session. The official README explicitly states that saved or nested workflows are not supported, meaning callers must repeatedly provide the script. If a specific orchestration has been validated and you wish to rerun it with different parameters next time, you need to persist the script and metadata in storage accessible to the process, and provide a tool surface for list/get/delete/run operations. The following section introduces how the community plugin dsh-tool-workflow-plus fills this gap as a drop-in fork.

What is this

dsh-tool-workflow-plus is published by maintainer shuxidemosheng. The npm package name and plugin name are both dsh-tool-workflow-plus, categorized under workflows. It verbatim ports the model surface of the official workflow tool 0.2.1-alpha.2 (parameter schema, run lifecycle, session events, UI folding). The only increment is the addition of a persistent saved workflow library on ctx.storageDomain, corresponding to the quintet of workflow_save, workflow_list, workflow_get, workflow_delete, and workflow_run_saved. The model can write validated orchestration scripts to the library, and in subsequent sessions, use workflow_run_saved with new args to rerun them directly without resending the entire script.

Community directory page: shuxidemosheng/dsh-tool-workflow-plus. Source code and documentation: GitHub Repository. License is MIT; package.json indicates version 0.1.0, requiring Node >=24 and DSH >=0.2.0-rc.2.

Core Features

The Saved Workflow Quintet

Upon installation, in addition to the fork body workflow, the model can utilize the following tools (tool surface summary from documentation):

Tool Function
workflow Equivalent to the official one; discipline regarding the use of the saved library is appended to the description. If the official tool with the same name is already registered, the fork yields automatically.
workflow_save Stores { meta, script }, with the key being meta.name; duplicate names are rejected by default, requiring overwrite: true to replace.
workflow_list Lists all records (name, description, whenToUse, phases, script size, sorted by update time descending, excluding the script body).
workflow_get Retrieves the complete record (including script) for review or modification before saving again.
workflow_delete Deletes by name.
workflow_run_saved Launches the engine using the stored script and meta, injecting new args; supports run_in_background.

The script contract remains consistent with the official version: bare JS body (no filesystem, network, or Node API access), meta is pure JSON, and args are injected as the global args. During the saving phase, the shape of the meta is validated and aligned with engine rules; scripts containing an export const meta block are rejected to avoid the “saves successfully but won’t run” scenario.

Persistence and UI

  • The storage domain is workflow_saved (table workflows, per-record layout); records are persisted under dshHomePath('storages') within the standard base bundle (backend: json), surviving across sessions.
  • Initiated runs are written to the tool-workflow/* durable session events (same name as the official version), which the client dsh-client-ui-workflow-run can render as usual.
  • For deployments without the storage trio mounted: plugin activation will not fail, but calling saved tools will return errors specifically identifying the missing components.

Coexistence or Takeover with Official Tools

By default, only this plugin’s patch is inserted: if the official workflow name is already occupied, the fork yields and logs a warning, while the saved quintet remains available. If you wish the fork to take over the workflow name, you can disable the official tool-workflow in the profile patch (note that in some web/desktop deployments, the official line is within an agent preset group, which a profile patch might not reach; in such environments, simply maintain coexistence).

Installation and Activation

Execute in Git Bash (command from the repository README):

dsh plugin add dsh-tool-workflow-plus

Alternatively, add dsh-tool-workflow-plus to the bundle dependencies in the profile and reload.

Optional configuration is passed via the config line in the patch; unknown keys will cause an immediate startup error:

Key Default Description
toolName 'workflow' Registration name for the fork body.
savedTools true Whether to register the saved quintet.
enableRunInBackground true Toggle for run_in_background (requires ctx.jobs).
maxResultChars 50000 Truncation limit for rendered results.

Typical Usage

The following steps are derived from the model-perspective example in the README, illustrating a closed loop of “Run successfully → Save to library → Rerun”.

  1. After the first successful run, call workflow_save, passing in meta and script:
{
  "meta": {
    "name": "code-audit",
    "description": "Audit a batch of files, then perform a round of adversarial verification",
    "whenToUse": "When user requests large-scale code audit",
    "phases": [{ "title": "scan" }, { "title": "verify" }]
  },
  "script": "const files = args.files\nconst found = await pipeline(files,\n  f => agent(`Audit ${f}, output list of issues`, { phase: 'scan' }),\n  (issues, f) => agent(`Adversarial verification: ${JSON.stringify(issues)}`, { phase: 'verify' })\n)\nreturn found"
}

On success, it returns a result like {"kind":"saved","name":"code-audit","overwritten":false,...}.

  1. Subsequently, in any session, use workflow_run_saved with new parameters to rerun:
{ "name": "code-audit", "args": { "files": ["src/a.ts", "src/b.ts"] } }

The tool description emphasizes the discipline: check the library with workflow_list before writing long scripts; use workflow_save after a successful run; saving with the same name requires explicit overwrite: true (preserving the original createdAt).

Scenarios and Notes

Suitable for:

  • Repeatedly asking the model to write similar multi-agent orchestrations, hoping to persist them after one successful run and reuse them in subsequent sessions;
  • Hoping to replace or supplement the official workflow tool with a version featuring a saved library (drop-in);
  • Deployments without the official workflow plugin, but requiring an equivalent implementation with a library.

Not suitable for:

  • Needs for visual orchestration, governance, recovery, or other heavy-duty capabilities—the documentation points to independent workflow layer projects; this plugin intentionally does not cover these;
  • Only requiring fixed templates without model runtime writing—consider lighter template-based plugins;
  • Concurrent execution of large numbers of saved workflows—the storage domain only handles storage and retrieval; scheduling still depends on the engine and ctx.jobs.

Security and Permissions: The plugin runs under the current DSH process permissions; saved scripts are user assets. Before installation, please read the source code and MIT license to ensure the storage path and profile combinations comply with your environment. The DSH community directory (such as SkillHub) is an independent site and has no official affiliation with DeepSeek / High-Flyer.

Conclusion

dsh-tool-workflow-plus complements the official workflow tool with a persisted saved workflow library, utilizing a quintet of tools to complete storage, listing, retrieval, deletion, and parameterized rerunning, aligning with the official run lifecycle and UI events. For installation commands, configuration options, and FAQs, refer to the GitHub README; for the community index, see the SkillHub Directory Page.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye