Plugin directory / Developer / dsh-user-agent
dsh-user-agent
Verified · install-tested on dsh dsh-plugins
What it does
Rewrites the User-Agent sent by every outgoing HTTP request (LLM API calls and other global-fetch traffic) to a value of your choice, configured live from a dedicated UA 设置 (User-Agent) tab in the Web settings. 为 dsh 发出的所有出站 HTTP 请求(LLM API 调用等走全局 fetch 的流量)改写 User-Agent,并可在 Web 设置的 UA 设置 选项卡中实时配置。
Works — verified, early-stage project
Rewrites the User-Agent sent by every outgoing HTTP request (LLM API calls and other global-fetch traffic) to a value of your choice, configured live from a dedicated UA 设置 (User-Agent) tab in the Web settings. 为 dsh 发出的所有出站 HTTP 请求(LLM API 调用等走全局 fetch 的流量)改写 User-Agent,并可在 Web 设置的 UA 设置 选项卡中实时配置。 It installs cleanly and boots without issues in our testing. It's early-stage but functional.
“Verified” means our automated CI actually ran dsh plugin add in a clean profile and it booted — nothing more. Feature descriptions and version compatibility are the author’s claims. This is not a security audit and not an endorsement of third-party code.
README
@dsh-plugin/dsh-user-agent
A DeepSeek Harness plugin that rewrites the User-Agent sent by every outgoing HTTP request (LLM API calls and other global-fetch traffic) to a value of your choice, configured live from a dedicated UA 设置 (User-Agent) tab in the Web settings.
Features
- Rewrite anything that uses global
fetch— including the DeepSeek / OpenAI-compatible adapter calls fromdsh-llm-deepseek, web search, and tools that fetch over HTTP. The configured UA overrides the caller's own header (e.g. dsh-llm's attribution baseline). - Live settings page — a
settings.sectiontab in the Web GUI Settings panel: toggle rewriting on/off and edit the User-Agent string. Changes apply to the very next request, no restart. - Standard settings integration — the value lives in the
dsh-user-agentuser-settings namespace, so it persists across sessions and is editable by any settings-aware surface. - Clean lifecycle — wraps
globalThis.fetchonly while the plugin runs; the original fetch is captured once and restored on stop / update / removal. Read-only fallback wheneverfetchis unavailable.
Install
The package is a dsh bundle plugin (dsh.bundle.patch), installable with the standard dsh plugin add command:
dsh plugin add @dsh-plugin/dsh-user-agent
# or, with a specific profile
dsh plugin --profile web add @dsh-plugin/dsh-user-agent
Then open Settings → UA 设置 in the Web GUI: flip the switch on, type the User-Agent you want, and hit 保存 (Save).
Configuration
Plugin entry (cordis.patch.yml / profile override) — the values act as the composition base layer and are merged with the user-settings section:
| Field | Type | Default | Meaning |
|---|---|---|---|
enabled |
boolean |
true |
Master switch; when off the wrapper is a pass-through. |
userAgent |
string |
DeepSeek-Harness/0.1 (+https://github.com/deepseek-ai/dsh) |
The User-Agent applied to every rewritten request. |
How it works
- The host half wraps
globalThis.fetch. On each call it reads the current config (resolved settings scope, or the composition entry when no settings service is mounted), and when enabled with a non-empty UA it builds a newHeadersand forcesuser-agentbefore delegating to the original fetch. - The browser half registers the
settings.sectiontab and reads/writes the namespace through the connection's ApiProxy (api.settings.describe/update), the same seam the aux/mainline DSH plugins use.
Development
npm install # dev deps + auto-installed peers
npm run build # tsc (host + client) + strip client module-ification artifact
npm test # node --test
npm pack --dry-run # inspect published contents
npm publish
.github/workflows/npm-publish.yml runs quality checks (matrix OS) and publishes:
- pushes to
main→X.Y.Z-dev.<run-id>under thenextdist-tag; - tags
vX.Y.Z(matchingpackage.json) → publishX.Y.Ztolatestwith provenance.
License
MIT
Install
Install the catalog once, then DeepSeek Harness can find and install any plugin from this site automatically:
dsh plugin add dshbase-catalog Then say "install dsh-user-agent for me" — your agent finds it in the directory and installs it. Docs: dshbase-catalog · verified packs.
This plugin is GitHub source (not published to npm) — install it straight from the repo:
Web profile:
dsh plugin --profile web add github:dsh-plugins/dsh-user-agent Headless (CLI) profile:
dsh plugin --profile headless add github:dsh-plugins/dsh-user-agent Test report
Verified: L1 install + L2 load + L3 runtime from GitHub source on dsh 0.1.0-rc.6.