Preface¶
The subagent bundled with DeepSeek Harness (DSH) runs Harness’s own agent. If you want to hand specific work to a headless process of the local ZCode CLI — an independent process, independent quota, independent session — and view output, terminate, or resume it uniformly from within the DSH interface, you need a dedicated dispatch and monitoring pipeline.
DSH Dispatch Console (repo Shuffle-1992/dsh-dispatch, maintained by Shuffle-1992, categorized as workflow in the community) is a DSH plugin built for the above needs: task rows appear in a floating panel at the bottom-right corner of the page, along with a single-writer file lock, a usage ledger, and a channel fallback chain; it also supports both paid plans and ZCode Start Plan (activity-granted quota) quota forms, the latter routed through a hosted official agent via app-server.
The following introduces its positioning, capabilities, and key installation and configuration points.
What Is This¶
In one sentence: dispatch prompt, task files, or target descriptions to the local ZCode (and other CLI engine capabilities mentioned in the README), monitor and manage these jobs within DSH, and share the same set of actions with the panel through the agent tool dispatch.
The trade-offs with the sister project dsh-connect-zcode are clearly explained in the README: the dispatch console’s semantics are “independent ZCode process + ZCode’s own tools + independent session/quota” — if you want the agent to autonomously work with tools, prefer the dispatch console; if you want interactive conversations within DSH and to reuse the DSH toolchain, use the provider channel there.
Core Features¶
The capabilities listed in the materials are as follows (details not present in the README are not expanded).
| Capability | Description |
|---|---|
| Dispatch | Supports four modes: build / edit / plan / yolo |
| Single-writer mutual exclusion | repo / memory file locks + in-process FIFO: tasks with the same lock are serialized, conflicts queue up without erroring |
| Real-time monitoring | Status, elapsed time, context usage, exit code, lock holder; can tail recent output |
| Resume / rerun | Resend the original prompt with --resume in the same session, or send a new instruction in the same session |
| Channels and fallback chain | Switch plan channels / models; on quota exhaustion or unavailability, hand off and rerun via the fallback chain |
| Free quota (Start Plan) | Channel names look like account:<family>-start-plan; reuses the panel, ledger, pausing, and fallback pipeline with paid plans |
| Usage aggregation | Local ledger 5-hour rolling / this week / today, plus plan remaining quota (marked available:false when the data source is unavailable) |
| Dispatch master switch | Cross-session truth file: when false, the runner, plugin, and bridge must not dispatch at all |
| Agent tool | Registers dispatch, same implementation as the panel |
The plugin itself lives in the monorepo’s dispatch/ subdirectory; Host-side changes require restarting DSH, while Client-side (client.js) only needs a page refresh.
Installation and Activation¶
This project does not publish to npm; installation must use the GitHub spec with #path:dispatch (there is no plugin package.json at the root, and omitting the subpath would yield a placeholder package).
First replace web with your profile name (dsh plugin list can look it up), and restart DSH after installation:
dsh plugin --profile web add "github:Shuffle-1992/dsh-dispatch#path:dispatch"
Runtime environment (from package.json): Node >=22.12.0, DSH >=0.2.0-rc.2 <0.3.0-0; the README notes development and verification on DSH desktop version 0.2.0-rc.2.
For local development, you can use link:<repo>/dispatch in the profile’s dependencies and add dsh-dispatch to bundles; machine-specific paths should be written in the profile’s cordis.patch.yml, not into the plugin repo.
Configuration Points¶
If either runnerPath or workRoot is empty, no dispatcher is created: the panel falls back to demo, and the agent tool returns a readable error (deliberately does not silently guess paths).
Override the example by id in ~/.dsh/profiles/<profile>/cordis.patch.yml:
- id: dispatch
name: "dsh-dispatch"
config:
demo: false
maxConcurrent: 3
runnerPath: '<宿主项目>\scripts\collab\zcode-run.mjs'
ledgerPath: '<宿主项目>\collab\logs\dispatch-runs.jsonl'
workRoot: '<本插件目录>\.data'
switchPath: '<宿主项目>\collab\dispatch.switch.json'
| Field | Default | Description |
|---|---|---|
demo |
false |
UI demo mode, does not touch the dispatcher |
maxConcurrent |
3 |
Upper limit of concurrently running runs |
runnerPath |
'' |
Absolute path to the runner script |
ledgerPath |
'' |
Ledger dispatch-runs.jsonl; left empty, usage aggregation is skipped |
workRoot |
'' |
Work root for locks, state, logs, etc.; left empty, falls back to the plugin’s .data/ |
switchPath |
'' |
Dispatch master switch file; left empty, the switch is unwritable |
Credentials are not stored in the plugin, but read from ZCode’s ~/.zcode/v2/config.json. If “Authentication failed / 401” appears, the README points out it may be related to the Key being written only to credentials.json after OAuth re-login without being written back to config.json; handling steps and tools are in the repo’s dispatch/README.md and dsh-connect-zcode’s scripts/sync-key-to-config.mjs.
Typical Usage¶
CLI Dispatch (independent bin, shares core with the plugin)¶
The free quota channel can use --provider start-plan or a full account id:
zcd dispatch --kind prompt --prompt "只回复 OK" --provider start-plan
zcd dispatch --kind task --task <任务包> --provider account:bigmodel-start-plan --mode yolo
Start Plan limitations (README summary): does not support --resume / --target / --memory-bench; official MCP is unavailable inside the hosted process; --cwd must belong to the same host project as ledgerPath for usage aggregation.
Agent Tool dispatch¶
One tool, mapping to panel operations via action:
dispatch | list | kill | dismiss | tail | quota | status | switch | channels | channel | retry | fallback
When dispatching, use action=dispatch, kind=prompt|task|target and the corresponding content fields; optional model, provider, mode, timeoutMin, resume, etc. The README requires: whenever the request is “hand the task to an agent to do it”, prefer action=dispatch whenever the dispatch console is usable; only fall back to DSH subagent when the switch is off, runner/workRoot is unconfigured, or the user explicitly requests that the current session do it itself — and explain the reason.
Use Cases and Notes¶
Who it’s for: users already using ZCode CLI locally who want to batch-dispatch coding tasks to ZCode headless processes within DSH sessions in a monitorable way, and need locks, ledgers, channel fallback, and Start Plan free quota all in the same panel.
Security and permissions: the plugin runs with the permissions of the current DSH process, launches child processes, and reads/writes your configured workRoot, ledgerPath, and lock files. Before installing, read the repo source and the MIT License, and confirm that paths and runner script sources are trusted.
Ecosystem note: DSH community plugin directories (such as the dsh-dispatch page on SkillHub) are independent sites with no official affiliation with DeepSeek / High-Flyer; “everything is a plugin” is Harness’s product philosophy; all facts in this article come from the aforementioned GitHub README and package manifest.
Conclusion¶
Through the above steps, you can install dsh-dispatch in Harness, configure the runner and working directory on the host project, dispatch ZCode tasks via the floating panel and the dispatch tool, and rely on the ledger and fallback chain for predictable retries under quota and lock conflict scenarios.
- Directory page: https://www.skillhub.cn/plugins/Shuffle-1992/dsh-dispatch
- Source and full documentation: https://github.com/Shuffle-1992/dsh-dispatch