deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
PROJECT README
在 DeepSeek Harness (dsh) 底部状态栏实时显示 DeepSeek 账户余额。
Real-time DeepSeek account balance in the DSH bottom status bar (the band under the composer, next to the shipped stats line).
DEEPSEEK_API_KEY 凭据(与自带 llm-deepseek 适配器同一引用),无需再填 Keyllm-deepseek 设置里的 baseURL(自定义网关也能用)
需要 DSH 0.1.0-rc.x(Web profile)。
在 DSH 的 web profile 目录(通常 ~/.dsh/profiles/web)里把本包加为依赖:
cd ~/.dsh/profiles/web
npm install dsh-plugin-deepseek-balance
# 或 pnpm add dsh-plugin-deepseek-balance
# 本地开发:npm install /path/to/dsh-plugin-deepseek-balance 或 pnpm add ../dsh-plugin-deepseek-balance
编辑同一个 profile 下的 cordis.patch.yml(没有就新建),插入一行:
- insert:
- id: deepseek-balance
name: dsh-plugin-deepseek-balance
dsh --profile web
打开 Web UI,composer 下方的状态带上就会出现 DeepSeek ¥xxx · 可用。
无需配置。Key 来源(按顺序):
DEEPSEEK_API_KEY(推荐,通过 credentials 服务写入)DEEPSEEK_API_KEY 环境变量┌─────────────┐ ┌──────────────────────┐
│ Browser │ │ dsh Host process │
│ client.js │ GET │ webServer route │
│ (composer │ ─────► │ /dsh-deepseek- │
│ .dock slot) │ ◄───── │ balance │
└─────────────┘ JSON │ │ │
│ ├─ credentials │
│ │ .resolve( │
│ │ DEEPSEEK_ │
│ │ API_KEY) │
│ ▼ │
│ fetch │
│ {baseURL}/user/ │
│ balance │
└──────────────────────┘
lib/index.js):注册同源 HTTP 路由 /dsh-deepseek-balance,通过 credentials seam 解析 API Key(按请求实时读取,改了 Key 无需重启),调用 DeepSeek GET /user/balance,10 秒内缓存结果。lib/client.js):注册进 conversation.composer.dock 槽位,用 timer service 每 30 秒轮询路由,点击立即刷新。dsh.client 声明让 web 端自动加载 client bundle),不需要 Remote/typert 代码生成。# 仓库结构
lib/index.js # Host half(Cordis plugin,纯 Node ESM)
lib/client.js # Client half(web bundle,__ModuleLoader__ 格式)
改动后重新安装到 profile(或 npm link)并重启 dsh 即可。
推送到 GitHub 后,发布到 npm 供用户直接安装:
# 推送前先改包名(GitHub 同名仓库惯例)
# package.json 里把 "name" 改为 "@<你的GitHub用户名>/dsh-plugin-deepseek-balance"
git remote add origin git@github.com:<你的GitHub用户名>/dsh-plugin-deepseek-balance.git
git push -u origin main
npm login
npm publish
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。