DeepSeek Harness plugin

suanzhang-dsh

算账 (suanzhang) — DeepSeek Harness 计费插件:侧边栏余额/今日消费、算账页签按步骤费用(交易终端风格)、官方价自动同步、跨会话跨天汇总。

Jump to install

Source facts

Repository
CZ1900/suanzhang-dsh
Latest update
Aug 19, 2026
Category
Memory
GitHub stars
1
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/CZ1900/suanzhang-dsh
Plugin: suanzhang-dsh
Author: CZ1900

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer4 files
README.en.mdSource · read only
README language

suanzhang(算账)· DeepSeek Spending at a Glance

> A little "bookkeeper" for DeepSeek Harness (dsh): your balance, today's spending, and how much each model step costs — all crystal clear, no more guessing.

中文

---

Why install it?

When using DeepSeek, don't you often wonder:

  • How much balance do I have left? — Checking means digging through the web console. Annoying.
  • How much did I spend today? — You only feel it at the end of the month.
  • How much did this one step cost me? — The table only shows token counts; seeing it in RMB is what matters.
  • Where did the money go? — Which model burns the most? Which tool is the priciest?

Install suanzhang and the answers are right in front of you:

You care aboutsuanzhang gives you
Remaining balanceAlways visible in the sidebar, auto-refreshed
Today's spendRight there in the sidebar too
Cost per step in RMBPer-step cost table in the "算账" tab
Where the money wentVisualized by model, by tool, by day
How much more to chatCost forecast: avg per step × steps

What it looks like

A clean trading-terminal style (think Bloomberg):

  • Sidebar footer: 当前余额:¥xx.xx,今天用了:¥xx.xx — click it to jump straight into the 算账 tab.
  • 算账 tab: a four-cell quote bar on top (Balance / Today / Total / Cache savings) → per-step cost table below.
  • Click any step row: auto-jumps to the "Trajectory" tab and highlights that step.
  • Auto-synced official pricing: follows the DeepSeek official price page; price changes take effect automatically.

Screenshot

![suanzhang UI](docs/suanzhang.png)

> Sidebar balance & today's spend · 算账 tab quote bar + cost table · Analysis bars + cost forecast

Requirements

  • A machine with DeepSeek Harness installed (dsh web runs).
  • Your own DeepSeek API Key (configured in Harness settings).
  • Internet access (needed for balance and official pricing queries).

Installation

Option 1: Install from GitHub (recommended)

pnpm add https://github.com/CZ1900/suanzhang-dsh.git

Then edit cordis.patch.yml under your Harness profile, adding at the top:

- insert:
    - id: suanzhang
      name: suanzhang-dsh

Restart dsh web and refresh — you'll see the balance in the sidebar and the "算账" tab in the session header.

Option 2: Local install

Copy the folder into your Harness profile's node_modules:

# inside the DSH profile directory (e.g. ~/.dsh/profiles/web):
cp -r /path/to/suanzhang-dsh node_modules/

Then add the same two insert lines to cordis.patch.yml and restart.

Privacy

ActionWhere data goesUploaded?
Balance checkGET https://api.deepseek.com/user/balance (with your Key)Only to DeepSeek official
Official pricinghttps://api-docs.deepseek.com public pageNo auth, read-only
Cost/summary calculationReads your local session logsNever leaves your machine
Display / sort / chartsLocal browser computationNever leaves your machine

FAQ

Q: Does the plugin itself consume tokens? A: Zero. It never calls any model — pure local computation plus two free HTTP requests. The tokens you actually spend are from chatting in dsh, unrelated to this plugin.

Q: Will prices go stale? A: No. Official pricing auto-syncs; when DeepSeek adjusts prices the plugin follows automatically. If fetching ever fails, it falls back to built-in prices so nothing breaks.

Q: Which models are supported? A: DeepSeek V4-Flash / V4-Pro (including peak/off-peak pricing), plus deepseek-chat / deepseek-reasoner. Other models show as "未计价" (not priced).

For developers

  • Code layout: lib/index.js (Host: balance/pricing/summary/today RPCs), lib/client.js (browser UI).
  • Key constants (hard-coded in lib/index.js): API key ref defaults to DEEPSEEK_API_KEY, baseURL defaults to https://api.deepseek.com, peak hours 9:00–14:00, low-balance threshold ¥20.
  • To change the poll interval: bump 60000 (ms) in lib/client.js.

License

MIT — use it, fork it, credit it.