Bundle
dsh-deepseek-balance-query
DSH 客户端插件:在侧边栏一键查询 DeepSeek(sk 开头)API Key 的账户余额。Key 仅在浏览器内直连 api.deepseek.com,不会经过本机服务。
- Source
- dumbnessrf
- stars
- 1 stars
- License
- MIT
- Updated
- Updated 13 days ago
Readme
# dsh-deepseek-balance-query DSH(DeepSeek Harness)客户端插件:在 Web 界面侧边栏底部一键查询 **DeepSeek 官方 API Key(sk 开头)** 的账户余额。 ## 功能 - 侧边栏底部新增「余额」按钮,点击弹出查询面板 - 输入 `sk-` 开头的 DeepSeek API Key,一键查询: - 账户是否可用(`is_available`) - 各币种的总余额、赠送余额、充值余额 - 可选「记住此 Key」:仅保存在浏览器 `localStorage`,默认不勾选 - 显示 Key 时自动脱敏(`sk-abc…wxyz`) - 支持 Esc / 点击遮罩关闭 ## 安全性 - Key **只**随浏览器直连 `https://api.deepseek.com/user/balance` 的请求发送 - DeepSeek 官方 API 对任意 Origin 反射 `access-control-allow-origin` 并放行 `authorization` 预检(已验证),因此无需经本机服务中转,Key 不会上传到 DSH 宿主进程 - 除非勾选「记住此 Key」,Key 不会写入任何本地存储 ## 安装 ```bash # 在仓库根目录(dsh-deepseek-balance-query/ 的上级)执行: dsh plugin --profile web add file:./dsh-deepseek-balance-query # 或直接指向绝对路径: dsh plugin --profile web add file:C:/path/to/dsh-deepseek-balance-query ``` 安装完成后**重启 harness**(关闭 DeepSeek Harness 后重新打开),刷新页面即可在侧边栏底部看到「余额」按钮。 > 若 pnpm 不可用(`dsh plugin` 提示 pnpm not found),也可手动安装: > 1. 将 `dsh-deepseek-balance-query` 目录复制到 `~/.dsh/profiles/web/node_modules/` > 2. 在 `~/.dsh/profiles/web/package.json` 的 `dependencies` 增加 `"dsh-deepseek-balance-query": "file:./node_modules/dsh-deepseek-balance-query"` > 3. 在 `dsh.profile.bundles` 数组追加 `"dsh-deepseek-balance-query"` > 4. 重启 harness ## 卸载 ```bash dsh plugin --profile web remove dsh-deepseek-balance-query ``` 然后重启 harness。 ## 结构 | 文件 | 说明 | | --- | --- | | `lib/index.js` | Node 端(空实现,仅使 Loader 条目可挂载) | | `lib/client.js` | 浏览器端 bundle(侧边栏按钮 + 悬浮面板 + 余额查询) | | `cordis.patch.yml` | 向 web profile 组合树插入 `deepseek-balance` 条目 | | `package.json` | `dsh.bundle`(patch)与 `dsh.client`(platform: web)声明 |
Install
dsh plugin --profile web add github:dumbnessrf/dsh-deepseek-balance-query
Profile: web
With the hub plugin installed, ask your agent to install it by name — it resolves the same plan shown here.
dsh plugin --profile web add github:stvlynn/dsh.fish#path:packages/dsh-plugin-hub
install dsh-deepseek-balance-query from the hub
- This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.