[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-116457":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":12,"contributorsCount":12,"subscribersCount":12,"size":12,"stars1d":14,"stars7d":15,"stars30d":15,"stars90d":12,"forks30d":12,"starsTrendScore":16,"compositeScore":17,"rankGlobal":9,"rankLanguage":9,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":9,"pushedAt":30,"updatedAt":31,"readmeContent":32,"aiSummary":33,"trendingCount":12,"starSnapshotCount":12,"syncStatus":34,"lastSyncTime":35,"discoverSource":36},116457,"dsh-download-server","Jestions-dev\u002Fdsh-download-server","Jestions-dev","DLS — DSH Download Server: a global, session-aware, persistent download queue for DeepSeek Harness.",null,"JavaScript",330,0,51,64,247,325,90,"MIT License",false,"main",true,[23,24,25,26,27,28,29],"aria2","deepseek-harness","download","downloader","dsh","dsh-plugin","queue","2026-11-15 06:45:31","2026-11-23 09:30:23","# dsh-dl-server\n\nEnglish | [中文](README.zh.md)\n\n**DLS** — DSH Download Server\nA persistent download queue for DeepSeek Harness.\n\n> Downloads should not live inside a session.\n\n---\n\n## Install\n\n### From the UI (recommended)\n\n```\nSettings → Plugins → Install a third-party plugin → Add plugin\n```\n\nType **`dsh-dl-server@0.4.0`**, confirm, then **restart DSH once**.\n\n### From the command line\n\n```sh\ndsh plugin add dsh-dl-server@0.4.0\n```\n\n> **Pin the version.** `0.1.0` declared `@deepseek-ai\u002Fdsh-storage-domain` as a regular dependency, so pnpm installed a second copy inside the plugin; the injected service then no longer matched the host and the plugin never mounted (every service stayed `pending`). `0.1.1` moves it to `peerDependencies`.\n>\n> pnpm also caches registry metadata — without an explicit version you may still resolve an older release.\n\n> `dsh` must be on your PATH. The desktop build ships one at\n> `…\\DeepSeek Harness\\resources\\runtime\\cli\\bin\\dsh.cmd`; if you have never added it, use the UI path.\n\n**Requires DSH 0.2.1-rc.5 or newer.**\n**aria2 is optional but strongly recommended** — install it for 16-way segmented downloading. Without it the plugin falls back to a single-stream transfer: same features, roughly a tenth of the speed. The plugin warns at startup and reports the reason through `download_status`, so a slow first install is not a mystery.\n\n| Platform | Install aria2 |\n| --- | --- |\n| Windows | `winget install aria2.aria2` |\n| Ubuntu \u002F Debian | `sudo apt install aria2` |\n| Fedora | `sudo dnf install aria2` |\n| Arch | `sudo pacman -S aria2` |\n| macOS | `brew install aria2` |\n\n\n---\n\n## Why\n\nMost DSH downloaders are one tool function that blocks until the file lands. They make downloads **fast**; they don't solve three things:\n\n- the download dies when the session or the turn ends\n- there is no queue, no pause, no resume\n- nothing survives a restart\n\nDLS is the **queue layer**, not the transport layer.\n\n```\nJobs live in DSH, not in a session.\n```\n\nA download started in one session is visible to every other session — progress, destination, everything. But only the session that started it can pause, resume, or cancel it.\n\n---\n\n## The seven tools\n\n| Tool | What it does |\n| --- | --- |\n| `download_enqueue` | Queue a job, **return immediately** with a job id |\n| `download_status` | Inspect the queue or a single job (`J#1042`) |\n| `download_wait` | Block until a job reaches a terminal state, with a timeout |\n| `download_pause` | Pause, **keeping the bytes already on disk** |\n| `download_resume` | Continue from the last checkpoint |\n| `download_cancel` | Cancel, optionally dropping the partial file |\n| `download_cleanup` | Drop records (the default scope leaves downloaded files alone) |\n\n## New in 0.2.0\n\n| | |\n| --- | --- |\n| **Mirror expansion** | GitHub Releases \u002F HuggingFace \u002F raw.githubusercontent \u002F PyPI URLs gain a fallback mirror automatically. The original always stays first. |\n| **Mirror cooldown** | Two consecutive failures on one host parks it for 10 minutes instead of retrying it on every job. |\n| **Size-aware concurrency** | Under 1 MB skips aria2 entirely; 1–8 MB runs 4 connections; only 8 MB and up gets 16. |\n| **Session fairness** | When two sessions queue at once they share the slots instead of one of them taking the whole queue. |\n| **Cumulative disk budget** | Enqueue counts what already-queued jobs still need, so a batch cannot quietly fill the disk. |\n| **Failures are no longer silent** | Checkpoint write errors are counted and surfaced in `download_status` under `storage`; an unwritable destination is refused before the transfer starts. |\n\n## New in 0.3.0\n\n| | |\n| --- | --- |\n| **Queue de-duplication** | One destination is never downloaded twice. A finished job is reused while its file is still on disk; a different source claiming the same path fails with `dest-in-use`. |\n| **Mirror self-verification** | Before a mirror is used, it is HEADed once: the length must equal the origin's, and when the origin advertises an ETag the mirror's must match too. |\n\n> A mirror is a third party and serves whatever it likes. Length plus ETag catches a cached older build or an HTML error page; it does **not** catch a poisoned copy. Only `sha256` proves content, which is why mirrors are a fallback and not a guarantee.\n\n## New in 0.4.0\n\n| | |\n| --- | --- |\n| **Custom request headers** | `download_enqueue` takes an optional `headers` object — `Referer`, `Cookie`, `User-Agent`, anything the host wants. Sent on the origin probe, on every mirror probe, on the aria2 download and on the single-stream fallback. |\n| **Validated at enqueue** | Line breaks, control characters, illegal names, more than 32 headers, and transport-owned names (`Range`, `Host`, `Content-Length`, …) are rejected with `header-invalid` **before** any bytes move. |\n| **Redacted in output** | Values may be session cookies. Job output lists names only (`\"requestHeaders\": [\"Referer\"]`); the values stay in the transfer layer and the local store. |\n\nWhy it matters: some URLs are correct and still refuse to download. Bilibili's media CDN answers **403 to any request without `Referer: https:\u002F\u002Fwww.bilibili.com`** — no number of mirrors helps. This is the same reason `curl -H` exists.\n\n```\ndownload_enqueue  urls=[...]  dest=...  headers={\"Referer\": \"https:\u002F\u002Fwww.bilibili.com\"}\n```\n\nResume still works: headers are persisted with the job, so a download interrupted by a DSH restart sends them again.\n\n## Example\n\n```\nYou:   download these two PDFs into D:\\Papers and tell me when they're done\n```\n\nThe agent calls `download_enqueue` twice and gets `J#10` \u002F `J#11` back, then `download_wait`.\n\nBecause enqueue returns immediately, it can fire off ten downloads without waiting for any of them.\n\n---\n\n## Measured\n\nSame machine, same file:\n\n| Setup | Throughput |\n| --- | --- |\n| TUNA mirror · single connection | 43.98 MB\u002Fs |\n| TUNA mirror · 16 threads (another plugin) | 54.20 MB\u002Fs |\n| TUNA mirror · **DLS** | **61.08 MB\u002Fs** (saturates a 500 Mbps link) |\n| HuggingFace · single-stream fallback | 1.00 MB\u002Fs |\n| HuggingFace · **DLS** | **6.96 MB\u002Fs** (7×) |\n\nThe last row is the point: **on a per-connection-throttled host, segmentation beats bandwidth.**\n\n---\n\n## Behaviour worth knowing\n\n- **Ownership is per session.** Any session on the machine can *see* every job; only the owner can mutate one.\n- **`cleanup(scope=\"all\")` deletes files.** The default `allWithoutFiles` only drops records.\n- **Checkpoints live in DSH storage**, not as lock files dropped into your home directory — the plugin does not depend on `TMPDIR` or the working directory.\n- **When aria2 is unavailable** the transport degrades to a single Node stream. No features lost, some speed lost — and the plugin says so instead of staying quiet, because a silent 10× slowdown looks like a bug.\n\n---\n\n## Docs\n\n- [SPEC.md](SPEC.md) — the 565-line design doc: comparison with four sibling plugins, what was borrowed from PCL2, and the v1 trade-offs\n- [CONTRIBUTING.md](CONTRIBUTING.md) — layout, how to run the tests, what not to touch\n- [SECURITY.md](SECURITY.md) — how to report a vulnerability, and what counts as one\n\n## Roadmap\n\nThe roadmap names product stages (`v1`, `v1.1`, `v1.2`, `v1.3`, `v2`); npm versions follow semver. They do not map one-to-one — use this table:\n\n| npm | Roadmap | Content | Status |\n| --- | --- | --- | --- |\n| `0.1.x` | v1 | queue + persistence + seven tools + aria2 transport | released |\n| `0.2.x` | v1.1 | mirrors \u002F mirror cooldown \u002F size-aware concurrency \u002F session fairness \u002F disk budget \u002F loud failures | released |\n| `0.3.x` | v1.2 | queue de-duplication \u002F mirror self-verification | released |\n| `0.4.x` | v1.3 | custom request headers (`Referer` \u002F `Cookie` \u002F `User-Agent`) on every attempt, validated at enqueue, redacted in output | released |\n| `0.4.1` | patch | missing aria2 is now a loud, actionable warning instead of a silent speed cliff; `download_status` reports the channel | released |\n| `1.0.0` | v2 | shell interception \u002F torrents \u002F own segmented engine \u002F content addressing | planned |\n| `1.1.x` | v3 | user panel + callbacks into the agent | planned |\n\n**Why 0.x lasts until v2:** `1.0.0` means \"the tool names and config keys will not change incompatibly\". Only v2 touches the transport and the tool set, so that is where 1.0 belongs.\n\n**You never have to do the conversion yourself** — install the latest and you get the newest milestone.\n\n## License\n\nMIT\n","DLS（DSH Download Server）是一个为 DeepSeek Harness（DSH）设计的全局、会话无关、持久化的下载任务队列服务。它将下载任务从临时会话中解耦，支持排队、暂停\u002F恢复、取消、状态查询与自动镜像回退等核心能力；底层可选集成 aria2 实现多段并发下载，无 aria2 时降级为单流传输。项目采用 JavaScript 编写，以插件形式嵌入 DSH，适用于需长期运行、高可靠性及跨会话协同的模型\u002F数据集下载场景，如 AI 开发环境中的大文件拉取与离线部署。",2,"2026-11-24 04:53:34","CREATED_QUERY"]