dsh-user-agent
Manifest validRewrites 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
@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
Versions
| Latest version | Published | Size |
|---|---|---|
| 0.1.0 | — | — |
| 0.1.0-dev.32502982088 | — | — |
Comments
Loading…
Similar plugins
by QiE2035
为 DeepSeek Harness 的自定义 LLM API 请求注入 HTTP Headers(典型用途:改写 user-agent,例如网关要求 UA 带指定品牌字样)。
★ 3
MIT
TypeScript
Sep 11, 2026
dsh plugin --profile web add dsh-llm-headersby uckkk
User-Agent 解析:浏览器/系统/设备/引擎/爬虫识别
★ 0
MIT
JavaScript
Aug 19, 2026
dsh plugin --profile web add dsh-useragentReusable subagent definitions managed from a Settings page and dispatched through a single delegate_agent tool; ships with a built-in read-only Explorer preset and a nested-delegation policy toggle.
★ 0
dsh plugin --profile web add dsh-custom-subagentsby Bay-Zeddie
在 dsh Web 设置页里编辑原生 AGENTS.md 的面板:链上每层可点选编辑,三种生效范围,并可视化官方指令预算。
★ 1
MIT
JavaScript
Oct 1, 2026
dsh plugin --profile web add dsh-agent-instructionsby better-er
DSH Web 暂停插件:agent 完成一轮工具交互、正要发出下一次模型请求之前在 agent/pre-step 处拉门暂停,保持 composer 输入框可用,人类在主输入框按回车放行,空草稿为无感继续、带字作为插话一并放行;此暂停不打断任何在途 API 调用,模型上下文完整、无感知。纯插件自包含,不改 DSH 源码。
★ 18
↓ 138/wk
MIT
TypeScript
Oct 2, 2026
dsh plugin --profile web add dsh-pauseby Aliuyanfeng
Personalization for the agent: a Web UI panel (about-you, reply style & tone, traits for headings/lists and emoji, output language, custom instructions) and `/soul` commands, with nickname/occupation/
★ 4
↓ 755/wk
MIT
JavaScript
Oct 10, 2026
dsh plugin --profile web add dsh-soul