dsh-token-plan-monitor
by YOYOYOAKE
DeepSeek Harness 插件,用于在侧边栏底部 API 余额或 Token Plan 用量。
DeepSeek Harness plugin that shows API balance or Token Plan usage at the bottom of the sidebar.
安装
dsh plugin --profile web add github:YOYOYOAKE/dsh-token-plan-monitorGitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试
安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗
安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。
README
DeepSeek Harness 插件,用于在侧边栏底部 API 余额或 Token Plan 用量。
目前支持:
- DeepSeek Platform 余额
- OpenCode Go

安装
dsh plugin --profile web add @yoyoyoake/dsh-token-plan-monitor
使用
DeepSeek Platform
自动读取 DeepSeek API Key 查询余额。
OpenCode Go
需要在 DeepSeek Harness 设置中额外配置用量查询参数:
WorkSpace ID:从 URL 中复制;Cookie:从 DevTools 中获取。
开发
项目结构
├── package.json # 插件 manifest:dsh.bundle / dsh.client;prepare 会自动构建 lib/
├── cordis.patch.yml # 组合补丁层,声明插件行
├── tsconfig.host.json # 宿主端 ESM 构建配置
├── tsconfig.client.json # 客户端 CommonJS 构建配置
├── build.mjs # 将编译后的客户端包装成浏览器 module-loader bundle
├── lib/ # 构建产物,由 prepare 自动生成
├── docs/ # 文档
└── src/
├── index.ts # 宿主端:settings 持久化、自动检测、缓存、HTTP 端点
├── client.ts # 客户端:侧边栏用量卡片 + 设置页
├── types.ts # UsageProvider 契约与 wire 类型
├── shims.d.ts # @deepseek-ai/dsh-settings 环境类型
└── providers/ # 每个供应商一个文件
├── deepseek.ts # DeepSeek Platform 余额查询
└── opencode.ts # OpenCode Go Token Plan 用量查询
添加新的提供商
- 新建
src/providers/my-vendor.ts - 实现
UsageProvider<T>:id/name/descriptionconfigFields:设置页需要填写的特殊参数credentialRefs:候选凭据名usageConfigFields:哪些参数填好后才能发起查询matchesModel():判断是否对应 DSH 中的某个 providerfetchUsage():调用供应商 APIrenderLines():把结果渲染成卡片行
- 在
src/index.ts的PROVIDERS数组中追加一行 - 重新构建并安装:
npm run build
dsh plugin --profile web add .
常用开发命令
npm install # 安装编译期依赖,并触发 prepare 构建 lib/
npm run typecheck # 类型检查
npm run build # 构建宿主端 + 客户端 bundle
开发时修改源码后重新执行 npm run build,刷新浏览器即可看到效果;cordis.patch.yml 会被 profile 的补丁监视器热重载。
License
MIT.
原始 README: https://github.com/YOYOYOAKE/dsh-token-plan-monitor/blob/main/README.md ↗
同类插件
查看全部 →
dsh-anchored-standard
两阶段 DeepSeek Harness 预设:先 Minimal 对齐的 bootstrap,再切完整 Standard 工具(Project2 98/99)

PicGo-Core
极致的图片上传引擎,CLI 与 API 双支持

awesome-deepseek-harness
DeepSeek Harness(DSH)及其优秀社区插件的精选指南。

awesome-deepseek-harness
DeepSeek Harness (DSH)生态系统:来自dsh-external/hub和公共dsh-plugin主题的精选插件、工具和基础设施。

AI-Novel-Writer
本地优先 AI 小说创作工作台,提供 Windows/macOS 桌面版与 DeepSeek Harness 插件开发预览,支持角色、大纲、章节蓝图、审稿修稿和本地模型。

mcp-for-stata
MCP-for-Stata:把 Stata 集成进你的 agent