DSH (DeepSeek Harness) adopts a plugin-based architecture, allowing community developers to extend the Web interface. To address the need to define reusable workflows in agent development, the weibaohui/dsh-process plugin integrates “Process” (Process, a multi-stage, multi-step agent workflow template) into dsh web. It provides features such as browsing, editing, validation, import/export, AI generation, and visual form editing, and supports agents directly invoking the tool library to read Processes and advance stage by stage.
Core Features¶
Dual-library browsing
Supports two Process libraries: My Library (default ~/.ntd/processes, writable) and Built-in Library (default ~/.ntd/bundled/processes, read-only). The plugin recursively scans subdirectories, and the sidebar entry displays real-time “My | Built-in” counts. The root directory configuration can be modified through the dsh settings service.
Three detail views
The Process detail page provides three views:
* Overview: displays metadata, limits, exception triggers, and the diagnostic checklist.
* Structure: displays stages → steps in a tree, including prompt, executor, expert, skill, gate, flow, and all other fields.
* YAML: with line numbers and syntax highlighting; supports clicking diagnostic information to jump to and highlight the line.
Editing and validation
* YAML editor: supports line numbers and 300ms debounced validation. Errors block saving; warnings are only marked with a yellow label. Supports ⌘/Ctrl+S to save.
* Optimistic locking: if the file is modified externally, saving returns a 409 conflict, prompting “Reload / Still Overwrite”.
* Validation rules: checks syntax errors, missing name, empty phases, duplicate step IDs, invalid on_gate_fail or goto: references, etc.; warns about unknown keys, unknown expert/skill references, etc.
Visual form editing
In “✎ Edit” mode, you can switch between the “Form” and “YAML” views. The form includes all fields: basic information, limits, stages, steps, gates, etc. Modifying form fields syncs to YAML in real time; modifying YAML also reflects in the form in real time. Supports cascading rename (changing a step ID automatically updates references), and adding/removing stages/steps/gates.
Agent collaboration
The plugin provides four tools for agents:
* process_list: list Processes in My Library.
* process_get: get Process details.
* process_validate: validate a Process.
* process_save: save a Process.
The system prompt guides the agent to advance according to the Process stage by stage, delivering one step at a time.
Execution by Process
Switch to “Execute” at the top of the panel to start a real run:
* Driver: each step launches a fresh dsh session to execute the instruction.
* Gate: an independent review session scores against the threshold; if it fails, it can be reworked or skipped according to configuration.
* Board: displays the run list, stage groups, and step cards (attempt count, rework count, Token usage, real-time output).
* Token statistics: the host reports usage per session, accumulating to calculate step consumption.
* Artifact collection: records diff change statistics and text for file write operations (write/edit), supporting dual-view inspection.
Installation and Activation¶
Install using the official plugin command:
dsh plugin --profile web add @weibaohui/dsh-process
After installation, restart dsh web and refresh the page. A “Process” entry will appear below “New Session” in the sidebar. The plugin reads and writes Process directories under ~/.ntd by default and requires no additional configuration.
Typical Usage¶
- Browse: click “Process” in the sidebar to open the full-screen Process library; select a Process in the left column, and switch among the Overview, Structure, and YAML tabs on the right to view it.
- Edit: click “✎ Edit”. You can validate as you write in the YAML editor, or switch to form mode for visual editing. Built-in Library entries display “⧉ Copy to My Library”.
- Manage: use “+ New ▾” to create a blank Process (with a commented skeleton) or copy one from the Built-in Library; use “⬆ Import” to drag and drop multiple files, or “⬇ Export” to download a single file or the entire library as a ZIP.
- AI generation: on the Process detail page, click “⚡ AI Generate”, enter the requirement and complexity; after the AI produces the YAML, it is validated, previewed, and written to My Library.
- Execute: in any session, ask the agent to execute a task, for example
Execute this requirement using the lightweight-task ProcessorUse process_save to save this workflow as a Process.
Data and Security¶
- Data source: Process files are the data source; there is no independent database. All write operations are limited to My Library; the Built-in Library always returns 403.
- Path whitelist: rejects
.., absolute paths, and dot directories, ensuring file-operation safety. - Optimistic locking and conflicts: modifications by external editors cause a 409 error; you must manually choose to reload or overwrite.
- Execution isolation: during execution, each step launches a fresh dsh session, ensuring an independent execution environment.
Applicable Scenarios¶
Suitable for developers who need to define, reuse, and run complex agent workflows in DSH Web. It combines YAML configuration with visual operations and, through the tool interface, allows agents to autonomously invoke Processes, reducing workflow management costs.