deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
PROJECT README
实时显示 DeepSeek API 账户余额的 DeepSeek Harness(dsh web)插件。 Real-time DeepSeek API account balance readout for the DeepSeek Harness web GUI.
在会话输入框下方的读数带(conversation.composer.dock)显示:
API 余额 CNY 18.22 · 可用 · 14:32:05 更新
DEEPSEEK_API_KEY),不出宿主进程| 文件 | 平台 | 作用 |
|---|---|---|
lib/index.js |
Host | 注册精确路由 GET /api/abal-balance;每次请求实时解析凭证并 curl https://api.deepseek.com/user/balance |
lib/client.js |
Client (web) | 手工编写的 window.__ModuleLoader__.load 格式 bundle(dsh web 的标准客户端包格式,无需构建管线);在输入框读数带渲染余额,每 30s fetch 刷新 |
lib/client.d.ts |
— | 客户端类型占位 |
依赖的宿主服务:webServer、credentials、shell、sandboxPolicy(均为 dsh 标准服务)。
客户端侧仅依赖 react(种子模块)与 slots 服务。
说明:curl 调用以
danger-full-access策略运行 —— 它是只读网络请求、无文件副作用,绕过平台沙箱 runner 是刻意的(在 Windows ACL 受限令牌下该请求已验证会失败)。
本仓库声明了 dsh.bundle manifest,可直接用 GitHub 依赖安装(推荐):
dsh plugin --profile web add github:02Muller25/dsh-api-balance
或手动放置:
$DSH_HOME/profiles/node_modules/api-balance/(完整目录,含 package.json、cordis.patch.yml 与 lib/)。cordis.patch.yml 追加(必须是 insert 块 —— 补丁语义只允许新增行,普通条目只能覆盖已有行;仓库根目录已附一份可直接参考):- insert:
- id: api-balance
name: 'api-balance'
disabled: true,重启profiles/node_modules/api-balance/,重启localStorage(键 dsh.api-balance.refresh)lib/index.js 中 credentials.resolve('DEEPSEEK_API_KEY')lib/index.js 中 BALANCE_URLpnpm install,手动放入 node_modules 的包可能被清理,需重新放置或改为正式依赖安装。localStorage;手动模式点击「刷新」即时刷新MIT © 2026 02Muller25
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。