dsh-web
zhu1090093659
DeepSeek Harness (DSH) Web 插件聚合生态 · 万物皆插件,通过创意工坊分发||DeepSeek Harness (DSH) Web Plugin Aggregation Ecosystem · Everything is a plugin, distributed via the Creative Workshop
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:JovanHE/ds-balance
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
简体中文 | English
A minimal DeepSeek account balance widget for the DeepSeek Harness (dsh) web GUI. A compact pill in the session header shows your current DeepSeek account balance, auto-refreshes, and updates on click.

DS CNY 3.65.DEEPSEEK_API_KEY from the DSH credential seam (~/.dsh/.credentials.yaml or the environment). The key travels only in the subprocess environment, never in the command line, source, or browser.dsh plugin --profile web add github:JovanHE/ds-balance
Or from a local checkout:
dsh plugin --profile web add /path/to/ds-balance
Restart dsh web after installing — client plugin discovery only runs at process start.
Zero configuration. As long as DEEPSEEK_API_KEY is set (in the DSH credential store, a .env, or the environment), the widget appears at the right of every session header.
client (browser) host (dsh process)
───────────────── ─────────────────
header pill ── GET /__ds-balance ────> route handler
│ │
└── parse JSON <────── JSON ────────────────┘
resolve DEEPSEEK_API_KEY (ctx.get("credentials"))
GET https://api.deepseek.com/user/balance
(ctx.shell / pwsh Invoke-RestMethod)
lib/index.js) resolves the key via ctx.get("credentials"), then calls the DeepSeek balance endpoint through ctx.shell — the endpoint needs an Authorization header that the fetch seam cannot carry, so it runs Invoke-RestMethod in a subprocess under an explicit danger-full-access policy (the deployment's default confinement has no usable sandbox backend on Windows, and this call only reads). It registers the /__ds-balance HTTP route via ctx.webServer.lib/client.js) registers a pill in the conversation.session.header.utilities slot and fetches /__ds-balance on its own origin, then renders the JSON. A plain same-origin fetch mints no session events, so the widget's 60s auto-refresh never pollutes the conversation or session log (dispatching a command would write command/run + command/done records on every refresh). In a bundle client the host/styles globals are not available (those are dynamic-plugin builtins), so it injects its stylesheet via document.lib/
index.js Host half: resolve key → call balance API → register /__ds-balance route
client.js Client half: header pill widget (bundle loader contract)
assets/
widget-screenshot.png Screenshot of the widget in the GUI
package.json declares dsh.bundle + dsh.client
cordis.patch.yml inserts the host plugin row
dsh) web profileDEEPSEEK_API_KEY credentialCLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: web-ui、widget。