deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
PROJECT README
A minimal, single-purpose DeepSeek API balance widget for the DSH web sidebar — it shows one number and nothing else.
¥xx.xx on the right), aligned with the Settings
button.¥xx.xx) at the top, then the balance warning legend
(< 50 yellow · < 30 orange · < 10 red → dashed border on the button), the
peak/off-peak billing rule (two rows: peak/off-peak hours), and a merged
refresh rule + refresh time on one line, with the plugin version
(dsh-dsbal v0.4.3) right-aligned at the bottom. The card tracks the
button width: as wide as the button column when the sidebar is expanded
(capped at 360px), a fixed 240px when collapsed, following live while the
sidebar animates.#e5484d during peak, brand blue #4d6bfe off-peak) and the exact
amount is read from the top of the hover card. Expanded, the icon stays
neutral and the 梁文峰/梁文谷 pill alone carries the state.localStorage for 24h, and falls back to the bundled
2025/2026 table when offline or not yet fetched.Install directly from GitHub (currently recommended):
dsh plugin --profile web add github:flyingfishzxf/dsh-dsbal
Or, after the package is published to npm:
dsh plugin --profile web add dsh-dsbal
For local development, you can install from a local path:
dsh plugin --profile web add file:/path/to/dsh-dsbal
After installing, restart
dsh weband hard-refresh the browser so the new bundle is loaded.
dsBalance Remote service. fetch first
resolves the DeepSeek API key through the credential seam (DEEPSEEK_API_KEY
by default) and calls GET {baseURL}/user/balance through the shell — the
web.fetch seam cannot carry an Authorization header:curl with ${DEEPSEEK_API_KEY} expansion.node -e (OpenSSL-based fetch). The sandboxed PowerShell
shell cannot complete any schannel TLS (curl and .NET both fail with
SEC_E_NO_CREDENTIALS), while Node's fetch is unaffected. The request
explicitly runs unconfined (danger-full-access): the Windows ACL sandbox
runner breaks for wide deployment workspaces (e.g. starting dsh web from
a home directory), which would otherwise make balance fetching depend on
the host's start directory. The command is fixed and plugin-authored (URL
from settings, key from credentials), so this is safe; POSIX stays
confined.env layer, so the secret
never appears in the command string or logs.deepseekAccount.getBalance() asks the Platform for the same
recharge and granted wallets the official Settings → Account page shows. This
is what makes the plugin work on the DSH desktop app, which signs in to the
DeepSeek account Platform (OAuth) and stores no DEEPSEEK_API_KEY at all — the
key-only path could there only report "API key not configured". The account
path runs in-process, so it needs no shell, no curl/node, no TLS and no
sandbox. A configured API key still takes precedence, so existing installs are
unaffected.The plugin honours the llm-deepseek settings section, exactly like the
DeepSeek model adapter. That section is keyed by Loader entry id on current
hosts (include:llm-deepseek), so the lookup accepts both the entry id and the
bare namespace:
apiKeyEnv — credential reference (default DEEPSEEK_API_KEY).baseURL — API base (default https://api.deepseek.com).curl on the host. Windows: node on the host (API-key path only).shell.execute(...).result() execution surface and the settings.describe()
section lookup, and falls back to the pre-0.1.7 shell.run() /
settings.get() APIs, so one bundle keeps working across that host update.DEEPSEEK_API_KEY by default), queried via GET /user/balance; with no key
configured, the balance of the signed-in account, queried through the account
Platform. It does not show other providers' or other accounts' balances, and
it cannot combine or convert between accounts.curl on POSIX, node on Windows for the API-key path
(see Requirements); the account path has none.Not listed yet. The list is maintained in awesome-dsh-plugin as one YAML file per plugin.
To add this plugin:
Make sure the repository meets the requirements:
dsh-plugin topic added on GitHub (repo Settings → General →
Topics; CI checks it).Fork awesome-dsh-plugin.
Add data/plugins/flyingfishzxf__dsh-dsbal.yml:
url: https://github.com/flyingfishzxf/dsh-dsbal
name: flyingfishzxf/dsh-dsbal
category: usage
description:
en: 'Shows the DeepSeek API account balance in the DSH Web sidebar with 30s auto-refresh, click-to-refresh, hover details, and low-balance threshold warnings.'
zh: '在 DSH Web 侧边栏显示 DeepSeek API 账户余额:30 秒自动刷新、点击刷新、悬停查看明细、余额不足阈值告警。'
The market description must state what the plugin does without superlatives (they get sent back) — the "minimal" positioning lives in this README, not in the market entry.
Regenerate the READMEs and commit them along with the YAML file:
npm ci
node scripts/generate-readme.mjs
Open a pull request.
The market (dshmarket) picks it up automatically after the PR is merged.
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。