Preface¶
The DeepSeek Harness (DSH) plugin ecosystem is designed to address development and operations needs in specific scenarios. When handling external resource downloads, manually configuring curl or aria2 often requires additional environment setup. The @leisureyu/dsh-smart-dl plugin solves this problem: it has aria2 built in and can be installed and configured with a single command, supporting accelerated multithreaded downloads for large files, resumable downloads, and content verification.
Plugin Overview¶
- Plugin Name:
@leisureyu/dsh-smart-dl - Maintainer: LeiSureYu
- Category: Networking Tool
- Core Value: Zero configuration, built-in aria2, automatic fallback to system curl, supports resumable downloads and content verification.
Installation and Enablement¶
The installation process requires the DSH plugin management command.
- In the DSH UI sidebar, select “Plugins”.
- Click “Add Plugin” and paste the package name
@leisureyu/dsh-smart-dl. - Click “Install”. After installation completes, restart DSH once.
You can also run it directly from the command line:
dsh plugin --profile web add @leisureyu/dsh-smart-dl
For the desktop version (DeepSeek Harness 0.2.0 and later), it is recommended to use the CLI path bundled with the desktop version for installation:
& "$env:LOCALAPPDATA\Programs\DeepSeek Harness\resources\runtime\cli\bin\dsh.cmd" plugin --profile desktop add @leisureyu/dsh-smart-dl
After installation, no additional configuration is required. The aria2 binary is installed with the plugin via npm’s optionalDependencies mechanism.
Core Features¶
This plugin provides the following capabilities:
- Multithreaded Downloads: Uses the built-in
aria2cfor multi-connection downloads to accelerate large file transfers. - Automatic Fallback: If the target server does not support multithreading, automatically falls back to the system-provided
curlfor single-threaded downloads. - Resumable Downloads: Supports resuming after an interruption by using the same
urlandoutput. - Progress Panel: In profiles with a Web interface (
web/desktop), a real-time progress panel is displayed in the bottom-right corner (file name, percentage, speed, and remaining time). - Progress Query: Provides the
download_statustool for read-only querying of the progress status of the most recent task. - Batch Downloads: Supports downloading multiple files at once via the
targetsparameter. You can setmaxBandwidthto limit the total bandwidth for the batch andtimeoutMsto set a timeout for each item. - SHA-256 Verification: Supports passing the
sha256parameter to perform a byte-by-byte integrity check after download. - Custom Request Headers: Supports
UserAgent,Referer, and customHeaders. - Mirror Auto-Selection: When
mirror: "auto"is set, the plugin selects a mirror from the built-in candidate list that matches the origin of the original URL. - Cross-Platform Support: Supports Windows x64/arm64 and Linux x64/arm64.
Typical Usage¶
After installation, the plugin registers two tools: smart_download and download_status.
Single-File Download¶
The simplest usage is to pass the URL directly. To ensure file integrity, it is recommended to also pass sha256. If the download URL is a GitHub URL, you can use mirror: "auto" to automatically select a mirror.
smart_download(
url: "https://github.com/owner/repo/releases/download/v1.4.0/tool.zip",
sha256: "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
mirror: "auto"
)
Batch Download¶
Use the targets array to download multiple files at once.
smart_download(
targets: ["url1", "url2"],
maxBandwidth: 1024,
timeoutMs: 5000
)
Notes¶
- macOS Limitation: The plugin can be installed and used on macOS, but due to platform limitations, its underlying download logic always uses single-threaded
curl. - Progress Panel Limitation: The progress panel only works in profiles with a Web interface (
web/desktop). In CLI-only profiles, the UI panel cannot be displayed, but command-line functionality is unaffected. - Permission Notice: The plugin runs with the permissions of the current DSH process. Before installation, review the source code and license to ensure they comply with your usage policies.