dsh-cost-meter 1.9.65 → 1.9.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  <p align="center">Cost tracking and subscription quotas for DeepSeek Harness</p>
4
4
 
5
5
  <p align="center">
6
- <a href="https://github.com/Han-1413141/dsh-cost-meter/releases/latest"><img src="https://img.shields.io/badge/version-1.9.65-4176E6?style=flat-square" alt="version"></a>
6
+ <a href="https://github.com/Han-1413141/dsh-cost-meter/releases/latest"><img src="https://img.shields.io/badge/version-1.9.66-4176E6?style=flat-square" alt="version"></a>
7
7
  <a href="https://www.npmjs.com/package/dsh-cost-meter"><img src="https://img.shields.io/npm/dm/dsh-cost-meter?label=downloads&style=flat-square&color=4176E6" alt="npm monthly downloads"></a>
8
8
  <a href="https://github.com/Han-1413141/dsh-cost-meter/stargazers"><img src="https://img.shields.io/github/stars/Han-1413141/dsh-cost-meter?label=stars&style=flat-square&color=D9A400" alt="GitHub stars"></a>
9
9
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" alt="MIT license"></a>
@@ -42,20 +42,20 @@ Restart `dsh web` after installation or updates. **Desktop** uses its bundled CL
42
42
  The PowerShell installer checks pnpm and Git and uses the `web` profile by default:
43
43
 
44
44
  ```powershell
45
- irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.65/install.ps1 | iex
45
+ irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.66/install.ps1 | iex
46
46
  ```
47
47
 
48
48
  Install a pinned Git tag:
49
49
 
50
50
  ```sh
51
- dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.65
51
+ dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.66
52
52
  ```
53
53
 
54
54
  See [installation and updates](docs/install.en.md) for uninstalling or installing without Git.
55
55
 
56
56
  </details>
57
57
 
58
- Current release **v1.9.65**: [release notes](docs/update-notes-1.9.65.md#english) · [troubleshooting](docs/install-troubleshooting.md)
58
+ Current release **v1.9.66**: [release notes](docs/update-notes-1.9.66.md#english) · [troubleshooting](docs/install-troubleshooting.md)
59
59
 
60
60
  ## Feature overview
61
61
 
package/README.zh-CN.md CHANGED
@@ -3,7 +3,7 @@
3
3
  <p align="center">DeepSeek Harness 费用统计与订阅额度插件</p>
4
4
 
5
5
  <p align="center">
6
- <a href="https://github.com/Han-1413141/dsh-cost-meter/releases/latest"><img src="https://img.shields.io/badge/version-1.9.65-4176E6?style=flat-square" alt="version"></a>
6
+ <a href="https://github.com/Han-1413141/dsh-cost-meter/releases/latest"><img src="https://img.shields.io/badge/version-1.9.66-4176E6?style=flat-square" alt="version"></a>
7
7
  <a href="https://www.npmjs.com/package/dsh-cost-meter"><img src="https://img.shields.io/npm/dm/dsh-cost-meter?label=downloads&style=flat-square&color=4176E6" alt="npm monthly downloads"></a>
8
8
  <a href="https://github.com/Han-1413141/dsh-cost-meter/stargazers"><img src="https://img.shields.io/github/stars/Han-1413141/dsh-cost-meter?label=stars&style=flat-square&color=D9A400" alt="GitHub stars"></a>
9
9
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" alt="MIT license"></a>
@@ -42,20 +42,20 @@ dsh plugin --profile web add dsh-cost-meter
42
42
  PowerShell 脚本自动检查 pnpm 和 Git,默认安装到 `web` Profile:
43
43
 
44
44
  ```powershell
45
- irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.65/install.ps1 | iex
45
+ irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.66/install.ps1 | iex
46
46
  ```
47
47
 
48
48
  固定 Git tag 安装:
49
49
 
50
50
  ```sh
51
- dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.65
51
+ dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.66
52
52
  ```
53
53
 
54
54
  更新、卸载及无 Git 的安装方法见[安装说明](docs/install.md)。
55
55
 
56
56
  </details>
57
57
 
58
- 当前版本 **v1.9.65**:[更新说明](docs/update-notes-1.9.65.md#中文) · [安装排障](docs/install-troubleshooting.md)
58
+ 当前版本 **v1.9.66**:[更新说明](docs/update-notes-1.9.66.md#中文) · [安装排障](docs/install-troubleshooting.md)
59
59
 
60
60
  ## 功能总览
61
61
 
@@ -0,0 +1,56 @@
1
+ # 官方余额的凭据来源
2
+
3
+ DSH 的账号登录模式使用推理令牌,它与开放平台 API Key 是不同凭据:把推理令牌当作 `Authorization: Bearer` 发给 `/user/balance` 会返回 401。旧版插件只读取模型设置指定的凭据名,在该名称被宿主进程环境覆盖时无法选用凭据库里的开放平台 Key([#201](https://github.com/Han-1413141/dsh-cost-meter/issues/201))。
4
+
5
+ ## 已登录的官方账号(DSH 桌面版)
6
+
7
+ 登录官方账号后,无需另行保存 API Key。未选择其他余额账号、未配置余额专用 Key 或模型 Key 时,插件通过宿主 `deepseekAccount` 服务读取与「设置 → 账号」同源的钱包,包含充值钱包与赠送钱包,再沿用插件自身的多币种挑选规则。凭据由宿主账号服务持有并负责鉴权,插件不接触 token,也不直接请求 `platform.deepseek.com`。账号服务缺席或明确退出时,该来源不可用;已登录账号的查询失败会显示错误。
8
+
9
+ 模型 Key 与登录账号可以属于不同账户。未选择其他余额账号、也未配置专用 Key 时,模型 Key 优先于登录账号钱包。
10
+
11
+ ## 余额专用 API Key
12
+
13
+ 从 1.7.46 起,也可以在「设置 → 费用 → 官方账户余额」的「余额专用 API Key」中填写开放平台 Key,点击「保存」,再点击「刷新余额」。密钥通过现有凭据接口写入 DSH 凭据库中的 `DEEPSEEK_BALANCE_API_KEY`,不写入插件配置、账本或安装目录,不回传到浏览器。输入框保存后清空,只显示是否配置及来源。也可以在启动 DSH 的环境中设置同名变量;该变量遵循宿主的只读环境优先规则。
14
+
15
+ Desktop 使用相同的费用设置页与宿主凭据接口。更新时使用 Desktop 自带 CLI 的 `--profile desktop`,然后完全退出并重新打开 Desktop;[桌面端安装步骤](install-troubleshooting.md#desktop-安装与更新)包含命令来源与重装禁用状态的处理。
16
+
17
+ ## 查询规则
18
+
19
+ 1. 手动选择了其他余额账号时,只使用所选账号的 Key 请求 `https://api.deepseek.com/user/balance`。Key 缺失或查询失败时直接显示错误。
20
+ 2. 使用默认余额账号且配置了专用 Key 时,只使用该 Key 请求官方余额,与模型的 `baseURL`、`apiKeyEnv` 及账号登录状态无关。
21
+ 3. 未配置专用 Key,但配置了模型 API Key 时,用模型 Key 查询余额。支持 DeepSeek 官方 HTTPS 根地址、版本路径以及 `/anthropic`、`/anthropic/v1`;实际余额请求始终发往 `/user/balance`。中转或代理地址不受支持,不发送请求,也不改查登录账号的钱包。
22
+ 4. 没有模型 API Key 时,经宿主账号服务读取账号钱包,即使模型设置暂时不可读。手动刷新会重新读取失败的模型设置。账号服务缺席或明确退出时,该来源不可用;已登录但查询失败时显示账号侧错误,自动查询按刷新间隔重试。
23
+ 5. 专用 Key 返回 401 时显示认证失败及配置方法,不改用其他账户重试。自动查询遵守刷新间隔,手动刷新可立即重试。
24
+ 6. 保存或清除专用 Key 会作废旧余额、取消在途请求并重新建立对账基准;不修改模型凭据。清除后按上面的顺序重新选择来源。
25
+
26
+ 当前余额凭据更换、清除,以及所用模型路由的 `apiKeyEnv` 或 `baseURL` 变化,会作废余额缓存、在途响应与对账基准。无关模型配置不影响手动选择的余额账号或专用 Key。账号退出、凭据失效及账号服务替换同样会清除旧状态。插件只读取宿主公开的配置描述与生命周期事件;重新挂载时,为所有余额来源重新建立对账基准。
27
+
28
+ ## 已保存的 Key 返回 401
29
+
30
+ “已配置,来源为 file”表示 DSH 凭据库里有这个值,不表示开放平台仍接受它。HTTP 401 表示当前请求的凭据未通过官方认证;仅凭状态码无法区分 Key 被撤销、保存内容不完整或凭据类型不对。重新保存相同内容不会改变服务端认证结果,最小化窗口也不会使无效 Key 恢复。
31
+
32
+ 请在 DeepSeek 开放平台确认 Key 状态。旧 Key 已丢失、无法核对时,创建新 Key,保存到“余额专用 API Key”,然后点击“刷新余额”。输入框保存后清空是隐藏密钥的正常行为,不是凭据丢失。不要在 issue 中上传 Key、凭据文件或请求头。
33
+
34
+ [#502](https://github.com/Han-1413141/dsh-cost-meter/issues/502#issuecomment-6877106296) 的报告者 @7WhiteChocolate 确认换用新建 Key 后恢复。旧 Key 未保留,具体失效原因没有得到验证;本次没有把该问题归因于窗口恢复或插件更新,也没有改变余额来源顺序。
35
+
36
+ ## 验证
37
+
38
+ 验证使用合成凭据和 HTTP 响应,覆盖真实 DSH 凭据 provider 的「进程环境优先于凭据文件」行为、保存/清除、缓存取消、迟到响应、对账基准以及 Host/Client codec。专项回归还覆盖账号与模型 Key 的来源优先级、旧版设置接口与新版配置描述、模型路由切换、官方 Messages 地址、账号异常脱敏、刷新节流、对账基准持久化及客户端错误渲染。
39
+
40
+ ## English
41
+
42
+ DSH account login uses an inference token, which is not an Open Platform API key: sending it as `Authorization: Bearer` to `/user/balance` returns 401. Older plugin versions read only the credential name named by the model settings, so a host-provided environment variable of that name could shadow a stored Open Platform key ([#201](https://github.com/Han-1413141/dsh-cost-meter/issues/201)).
43
+
44
+ **Signed-in official account (DSH Desktop).** No additional API key is needed. When no other balance account is selected and no dedicated or model Key is configured, the plugin reads the same wallet as **Settings → Account** (topped-up plus bonus) through the host `deepseekAccount` service, then applies its multi-currency selection. The host account service holds and uses the credential; the plugin never sees the token and never requests `platform.deepseek.com` directly. A missing account service or an explicit sign-out makes this source unavailable; a failed query for a signed-in account produces an error.
45
+
46
+ The model Key and the signed-in account can belong to different accounts. When no other balance account is selected and no dedicated key is configured, a model key takes priority over the signed-in account’s wallet.
47
+
48
+ Alternatively, since 1.7.46, enter an Open Platform key in **Settings → Cost → Account balance → Balance API key**, save it, then refresh the balance. DSH stores it as `DEEPSEEK_BALANCE_API_KEY`; the plugin never stores it in its config or ledger, or returns it to the browser. The same environment variable is supported under the host's normal credential priority rules.
49
+
50
+ Query priority is **manually selected balance account → dedicated Key → model Key → signed-in account**. A manually selected account or dedicated Key uses the fixed official HTTPS balance endpoint. A missing or invalid selected Key produces an error. Model settings support the official root, version paths, `/anthropic`, and `/anthropic/v1`. Balance requests use `https://api.deepseek.com/user/balance`. A relay or proxy `baseURL` produces an unsupported-endpoint error without sending the Key or querying the signed-in wallet. Account-query failures remain visible, and automatic retries follow the refresh interval. Saving or clearing the dedicated Key leaves model credentials intact. Account-login inference tokens cannot query the Open Platform balance endpoint directly.
51
+
52
+ Changes to the active balance credential or its model route (`apiKeyEnv` or `baseURL`) invalidate cached and in-flight balances and clear reconciliation baselines. Unrelated model changes leave manually selected accounts and dedicated Keys unchanged. Account sign-out, expiry, and account-service replacement also clear old state. The plugin reads public configuration descriptions and lifecycle events. Every balance source establishes a new reconciliation baseline when the plugin mounts again.
53
+
54
+ When no model API key is resolved, an unavailable model settings service does not block the signed-in account wallet. Manual refresh retries an unavailable route; a resolved model Key still requires a verified official endpoint.
55
+
56
+ **A stored key returns HTTP 401.** “Configured, source: file” only confirms that DSH has a stored value. HTTP 401 means that the official API rejected the credential; the status alone cannot distinguish a revoked key, an incomplete value or the wrong credential type. Check the key in the DeepSeek Open Platform. If the old value is unavailable, create a new key, save it as the dedicated balance key and refresh. Clearing the input after saving hides the secret; it does not delete the stored credential. Never post keys, credential files or request headers in an issue. In [#502](https://github.com/Han-1413141/dsh-cost-meter/issues/502#issuecomment-6877106296), @7WhiteChocolate confirmed that a new key restored the balance. The reason the old key stopped working was not established.
@@ -90,3 +90,9 @@ node test/codex-subscription-published.mjs
90
90
  3.2.4 新增权限限制的公开错误分类,在登录完成后清理账号额度缓存,并在失败冷却结束后重新获取额度。新增检查覆盖普通 403、设备及购买限制说明经 RPC 传递、错误正文脱敏、登录未完成及完成后的缓存处理,以及缓存仍在有效期内时强制刷新失败、冷却结束后的正常重读。所有输入使用合成数据,外部请求数为 0。
91
91
 
92
92
  兼容基线更新为 3.2.4,两个既有宿主的 CI 矩阵均加入该实际发布包。
93
+
94
+ ### 2026-11-15:billion-context 0.1.214
95
+
96
+ 处理 github-actions[bot] 在 [#504](https://github.com/Han-1413141/dsh-cost-meter/issues/504) 报告的五个接入函数变化。新版拆分首字节与响应体超时,调整摘要日志、错误响应清理,以及原生请求的代理选项和预填充请求头处理。
97
+
98
+ SHA-512 校验、静态契约检查和实际发布包回归通过:原生及代理计费、四种协议、摘要、重试、缓存、父子会话、API/Plan、历史回放、重启、取消、预填充及本地拒绝请求,另验证原版 CLI 自动接入。测试仅使用合成数据和本机服务,外部模型请求为 0,上游源文件保持原样。本版无需修改计费适配器,基线和 CI 增加 0.1.214。
@@ -0,0 +1,25 @@
1
+ # v1.9.66
2
+
3
+ ## 中文
4
+
5
+ - 验证 billion-context 0.1.214 的真实发布包,更新兼容基线并加入持续集成。覆盖原生及代理计费、摘要、重试、缓存、历史回放与原版 CLI 自动接入。
6
+ - 补充官方余额 HTTP 401 的排查说明:凭据文件中有值不等于 Key 通过认证,说明旧 Key 无法核对时如何更换。
7
+
8
+ 本版不改变余额来源顺序,不自动更新 billion-context,也不修改已记录的费用。
9
+
10
+ 感谢 [@7WhiteChocolate](https://github.com/7WhiteChocolate) 在 [#502](https://github.com/Han-1413141/dsh-cost-meter/issues/502#issuecomment-6877106296) 补充新 Key 恢复余额的结果;兼容验证由 [#504](https://github.com/Han-1413141/dsh-cost-meter/issues/504) 的自动监控报告触发。
11
+
12
+ ## English
13
+
14
+ - Verify the actual billion-context 0.1.214 package, update the compatibility baseline and add it to CI. Coverage includes native/proxy billing, summaries, retries, cache usage, history replay and automatic integration with the original CLI.
15
+ - Document official-balance HTTP 401 troubleshooting, including the distinction between a stored credential and a key accepted by the API, and replacing an unavailable old key.
16
+
17
+ This release preserves balance source priority and recorded costs, and does not automatically upgrade billion-context.
18
+
19
+ ## 升级 / Upgrade
20
+
21
+ ```sh
22
+ dsh plugin --profile web add dsh-cost-meter@latest
23
+ ```
24
+
25
+ 更新后重启 DSH。Desktop 用户参见 [安装与更新](https://github.com/Han-1413141/dsh-cost-meter/blob/v1.9.66/docs/install-troubleshooting.md#desktop-安装与更新)。
package/package.json CHANGED
@@ -1,288 +1,290 @@
1
- {
2
- "name": "dsh-cost-meter",
3
- "version": "1.9.65",
4
- "description": "DeepSeek Harness 会话费用统计插件:本会话成本、当日费用、历史记录与官方价格同步,支持多厂商多模型价格计费(内置 170+ 模型 ID 价格目录与自动匹配)、主流 Coding Plan 订阅额度查询与显示(16 家,含 WorkBuddy 官方积分、OpenDesign 工作区查询、含小米 MiMo Token Plan 控制台 Cookie 查询、SCNet Token Plan 本地 Credits 计量与火山方舟 Volcano Ark Coding Plan AK/SK 签名查询)、自定义 Provider 余额查询(可配任意 HTTP 端点)与余额进度条、峰谷计价时段显示与切换前弹窗/系统通知提醒(位置/提前量/类型可配),界面中英双语。Session cost tracking plugin for DeepSeek Harness: per-conversation cost, daily totals, history and official price sync, with multi-vendor model pricing (built-in 170+ model-ID catalog with auto-matching), Coding Plan quota queries & display for 16 vendors (incl. WorkBuddy official credits, OpenDesign workspace queries, Xiaomi MiMo Token Plan via console cookie, local credits metering for the SCNet Token Plan and Volcano Ark Coding Plan via AK/SK signature), plan/API dual-track billing with per-1% & full-window Token Plan usage estimates, custom provider balance lookup (configurable HTTP endpoint) and balance progress bar, plus peak/off-peak pricing display with pre-switch popup & system-notification alerts (position / lead time / type configurable), in a bilingual (Chinese/English) UI.",
5
- "type": "module",
6
- "main": "lib/bootstrap.js",
7
- "bin": {
8
- "dsh-cost-meter": "./lib/billing-storage-cli.js",
9
- "dsh-cost-meter-repair-sessions": "./lib/repair-sessions-cli.js"
10
- },
11
- "exports": {
12
- ".": {
13
- "default": "./lib/bootstrap.js"
14
- },
15
- "./client": {
16
- "default": "./lib/client.js"
17
- },
18
- "./typert": {
19
- "default": "./lib/typert.host.js"
20
- },
21
- "./package.json": "./package.json",
22
- "./locale/*.json": "./locale/*.json"
23
- },
24
- "dsh": {
25
- "bundle": {
26
- "patch": "./cordis.patch.yml"
27
- },
28
- "client": {
29
- "platform": "web"
30
- },
31
- "compatibility": {
32
- "dsh": ">=0.2.0-rc.1 <0.3.0-0",
33
- "dshReleases": {
34
- "0.2.0-rc.1": "compatible",
35
- "0.2.0-rc.2": "compatible",
36
- "0.2.1-alpha.5": "compatible",
37
- "0.2.1-rc.1": "compatible",
38
- "0.2.1-rc.2": "compatible",
39
- "0.2.2-alpha.3": "compatible"
40
- }
41
- }
42
- },
43
- "dshhub": {
44
- "schemaVersion": 1,
45
- "displayName": "dsh-cost-meter",
46
- "summary": "DeepSeek Harness 会话费用统计:本会话费用、预算图框、官方余额、自定义 Provider 余额查询、Coding Plan 额度查询、历史记录,支持峰谷计价(切换前弹窗与系统通知提醒)与官方价格一键同步。",
47
- "categories": [
48
- "费用",
49
- "Web UI",
50
- "观测"
51
- ],
52
- "surfaces": [
53
- "host",
54
- "web"
55
- ],
56
- "capabilities": {
57
- "provides": [
58
- "service:cost-meter"
59
- ]
60
- },
61
- "compatibility": {
62
- "dsh": ">=0.2.0-rc.1 <0.3.0-0",
63
- "node": ">=20"
64
- },
65
- "permissions": {
66
- "network": [
67
- "https://chatgpt.com",
68
- "https://api.deepseek.com",
69
- "https://api-docs.deepseek.com",
70
- "https://open.volcengineapi.com",
71
- "https://ark.cn-beijing.volces.com",
72
- "https://opencode.ai",
73
- "https://api.anthropic.com",
74
- "https://api.z.ai",
75
- "https://open.bigmodel.cn",
76
- "https://www.minimaxi.com",
77
- "https://www.minimax.cn",
78
- "https://www.minimax.io",
79
- "https://api.kimi.com",
80
- "https://api.moonshot.cn",
81
- "https://openrouter.ai",
82
- "https://api.siliconflow.cn",
83
- "https://api.commandcode.ai",
84
- "https://api.cline.bot",
85
- "https://api.factory.ai",
86
- "https://ax.ac.sugon.com",
87
- "https://platform.qianwenai.com",
88
- "https://platform-home.qianwenai.com",
89
- "https://business.aliyuncs.com",
90
- "https://tokenrhythm.studio",
91
- "https://platform.xiaomimimo.com",
92
- "https://console.bce.baidu.com",
93
- "https://www.codebuddy.cn",
94
- "https://www.workbuddy.ai",
95
- "https://amr-api.open-design.ai",
96
- "https://api.frankfurter.dev"
97
- ]
98
- }
99
- },
100
- "files": [
101
- "docs/web-request-fees.md",
102
- "locale",
103
- "lib",
104
- "cordis.patch.yml",
105
- "docs/provider-pricing.json",
106
- "docs/subscription-catalog.json",
107
- "docs/catalog-2026-10-28.md",
108
- "docs/billing-statistics.md",
109
- "docs/billion-context-billing.md",
110
- "docs/opendesign-billing.md",
111
- "docs/custom-balance-sources.md",
112
- "docs/performance-2026-10-18.md",
113
- "docs/performance-2026-10-18.json",
114
- "docs/update-notes-2026-10-15.md",
115
- "docs/ledger-lock-recovery.md",
116
- "docs/external-usage.md",
117
- "docs/qwen-cli-quota.md",
118
- "docs/factory-quota.md",
119
- "docs/baidu-token-plan.md",
120
- "docs/session-sidebar-recovery.md",
121
- "docs/provider-pricing-2026-10.md",
122
- "docs/openrouter-prices.md",
123
- "docs/context-costs-design.md",
124
- "docs/context-costs-preview.png",
125
- "docs/cost-share-overview.png",
126
- "docs/call-detail-preview.png",
127
- "docs/step-billing-preview.png",
128
- "docs/maintenance-review-2026-10-10.md",
129
- "THIRD_PARTY_NOTICES.md",
130
- "docs/display-settings.md",
131
- "docs/update-notes-1.8.28.md",
132
- "docs/update-notes-1.8.29.md",
133
- "docs/context-stream-diagnostics.md",
134
- "docs/exchange-rates.md",
135
- "docs/update-notes-1.8.30.md",
136
- "docs/idle-performance.md",
137
- "docs/pricing-history-storage.md",
138
- "docs/custom-model-prices.md",
139
- "docs/update-notes-1.8.31.md",
140
- "docs/update-notes-1.8.32.md",
141
- "docs/update-notes-1.8.33.md",
142
- "docs/update-notes-1.8.34.md",
143
- "docs/update-notes-1.8.35.md",
144
- "docs/update-notes-1.8.36.md",
145
- "docs/update-notes-1.9.0.md",
146
- "docs/update-notes-1.9.1.md",
147
- "docs/update-notes-1.9.2.md",
148
- "docs/better-session.md",
149
- "docs/model-history-repricing.md",
150
- "docs/tokenrhythm-balance.md",
151
- "docs/dsh-0.2.1-compatibility.md",
152
- "docs/dsh-0.2.2-compatibility.md",
153
- "docs/pnpm-supply-chain-policy.md",
154
- "docs/update-notes-1.9.3.md",
155
- "docs/update-notes-1.9.4.md",
156
- "docs/update-notes-1.9.5.md",
157
- "docs/update-notes-1.9.6.md",
158
- "docs/update-notes-1.9.7.md",
159
- "docs/update-notes-1.9.8.md",
160
- "docs/update-notes-1.9.9.md",
161
- "docs/plugin-compatibility-watch.md",
162
- "docs/update-notes-1.9.10.md",
163
- "docs/update-notes-1.9.11.md",
164
- "docs/update-notes-1.9.12.md",
165
- "docs/update-notes-1.9.13.md",
166
- "docs/update-notes-1.9.14.md",
167
- "docs/update-notes-1.9.15.md",
168
- "docs/update-notes-1.9.16.md",
169
- "docs/update-notes-1.9.17.md",
170
- "docs/update-notes-1.9.18.md",
171
- "docs/update-notes-1.9.19.md",
172
- "docs/update-notes-1.9.20.md",
173
- "docs/update-notes-1.9.21.md",
174
- "docs/update-notes-1.9.22.md",
175
- "docs/update-notes-1.9.23.md",
176
- "docs/update-notes-1.9.24.md",
177
- "docs/update-notes-1.9.25.md",
178
- "docs/update-notes-1.9.26.md",
179
- "docs/update-notes-1.9.27.md",
180
- "docs/update-notes-1.9.28.md",
181
- "docs/update-notes-1.9.29.md",
182
- "docs/update-notes-1.9.30.md",
183
- "docs/settings-pages.md",
184
- "docs/update-notes-1.9.31.md",
185
- "docs/update-notes-1.9.32.md",
186
- "docs/update-notes-1.9.33.md",
187
- "docs/billing-storage.md",
188
- "docs/update-notes-1.9.34.md",
189
- "docs/update-notes-1.9.35.md",
190
- "docs/update-notes-1.9.36.md",
191
- "docs/update-notes-1.9.37.md",
192
- "docs/update-notes-1.9.38.md",
193
- "docs/update-notes-1.9.39.md",
194
- "docs/update-notes-1.9.40.md",
195
- "docs/update-notes-1.9.41.md",
196
- "docs/update-notes-1.9.42.md",
197
- "docs/update-notes-1.9.43.md",
198
- "docs/update-notes-1.9.44.md",
199
- "docs/update-notes-1.9.45.md",
200
- "docs/update-notes-1.9.46.md",
201
- "docs/update-notes-1.9.47.md",
202
- "docs/update-notes-1.9.48.md",
203
- "docs/provider-peak-schedules.md",
204
- "docs/billion-context-peer-discovery.md",
205
- "docs/official-price-sync-safety.md",
206
- "docs/update-notes-1.9.51.md",
207
- "docs/update-notes-1.9.52.md",
208
- "docs/update-notes-1.9.53.md",
209
- "docs/update-notes-1.9.54.md",
210
- "docs/update-notes-1.9.55.md",
211
- "docs/update-notes-1.9.56.md",
212
- "docs/update-notes-1.9.57.md",
213
- "docs/update-notes-1.9.58.md",
214
- "docs/billing-review-2026-11-02.md",
215
- "docs/billing-currency.md",
216
- "docs/native-search-billing.md",
217
- "docs/features.md",
218
- "docs/features.en.md",
219
- "docs/billing.md",
220
- "docs/billing.en.md",
221
- "docs/install.md",
222
- "docs/install.en.md",
223
- "docs/architecture.md",
224
- "docs/architecture.en.md",
225
- "docs/custom-balance-sources.en.md",
226
- "docs/cliproxyapi-quota.md",
227
- "docs/images",
228
- "docs/promo.png",
229
- "docs/promo.en.png",
230
- "docs/update-notes-1.9.59.md",
231
- "docs/catalog-2026-11-05.md",
232
- "docs/update-notes-1.9.60.md",
233
- "docs/local-savings.md",
234
- "docs/update-notes-1.9.61.md",
235
- "docs/update-notes-1.9.62.md",
236
- "docs/update-notes-1.9.63.md",
237
- "docs/update-notes-1.9.64.md",
238
- "docs/update-notes-1.9.65.md"
239
- ],
240
- "dependencies": {
241
- "acorn": "8.15.0",
242
- "zod": "4.6.6"
243
- },
244
- "peerDependencies": {
245
- "@deepseek-ai/dsh-credentials": ">=0.2.0-rc.1 <0.3.0-0 || >=0.2.1-0 <0.3.0-0 || >=0.2.2-0 <0.3.0-0",
246
- "@deepseek-ai/dsh-home-paths": ">=0.2.0-rc.1 <0.3.0-0 || >=0.2.1-0 <0.3.0-0 || >=0.2.2-0 <0.3.0-0"
247
- },
248
- "repository": {
249
- "type": "git",
250
- "url": "git+https://github.com/Han-1413141/dsh-cost-meter.git"
251
- },
252
- "homepage": "https://github.com/Han-1413141/dsh-cost-meter#readme",
253
- "keywords": [
254
- "deepseek",
255
- "deepseek-harness",
256
- "dsh",
257
- "dsh-plugin",
258
- "client-plugin",
259
- "cost",
260
- "usage",
261
- "billing",
262
- "budget",
263
- "i18n",
264
- "bilingual",
265
- "zh",
266
- "en",
267
- "language"
268
- ],
269
- "license": "MIT",
270
- "engines": {
271
- "node": ">=20",
272
- "dsh": ">=0.2.0-rc.1 <0.3.0-0"
273
- },
274
- "os": [
275
- "darwin",
276
- "linux",
277
- "win32"
278
- ],
279
- "scripts": {
280
- "build": "node scripts/build.mjs",
281
- "test": "node test/verify.mjs"
282
- },
283
- "devDependencies": {
284
- "@deepseek-ai/dsh-credentials": "0.2.1-rc.4",
285
- "@deepseek-ai/dsh-home-paths": "0.2.1-rc.4",
286
- "esbuild": "^0.28.2"
287
- }
288
- }
1
+ {
2
+ "name": "dsh-cost-meter",
3
+ "version": "1.9.66",
4
+ "description": "DeepSeek Harness 会话费用统计插件:本会话成本、当日费用、历史记录与官方价格同步,支持多厂商多模型价格计费(内置 170+ 模型 ID 价格目录与自动匹配)、主流 Coding Plan 订阅额度查询与显示(16 家,含 WorkBuddy 官方积分、OpenDesign 工作区查询、含小米 MiMo Token Plan 控制台 Cookie 查询、SCNet Token Plan 本地 Credits 计量与火山方舟 Volcano Ark Coding Plan AK/SK 签名查询)、自定义 Provider 余额查询(可配任意 HTTP 端点)与余额进度条、峰谷计价时段显示与切换前弹窗/系统通知提醒(位置/提前量/类型可配),界面中英双语。Session cost tracking plugin for DeepSeek Harness: per-conversation cost, daily totals, history and official price sync, with multi-vendor model pricing (built-in 170+ model-ID catalog with auto-matching), Coding Plan quota queries & display for 16 vendors (incl. WorkBuddy official credits, OpenDesign workspace queries, Xiaomi MiMo Token Plan via console cookie, local credits metering for the SCNet Token Plan and Volcano Ark Coding Plan via AK/SK signature), plan/API dual-track billing with per-1% & full-window Token Plan usage estimates, custom provider balance lookup (configurable HTTP endpoint) and balance progress bar, plus peak/off-peak pricing display with pre-switch popup & system-notification alerts (position / lead time / type configurable), in a bilingual (Chinese/English) UI.",
5
+ "type": "module",
6
+ "main": "lib/bootstrap.js",
7
+ "bin": {
8
+ "dsh-cost-meter": "./lib/billing-storage-cli.js",
9
+ "dsh-cost-meter-repair-sessions": "./lib/repair-sessions-cli.js"
10
+ },
11
+ "exports": {
12
+ ".": {
13
+ "default": "./lib/bootstrap.js"
14
+ },
15
+ "./client": {
16
+ "default": "./lib/client.js"
17
+ },
18
+ "./typert": {
19
+ "default": "./lib/typert.host.js"
20
+ },
21
+ "./package.json": "./package.json",
22
+ "./locale/*.json": "./locale/*.json"
23
+ },
24
+ "dsh": {
25
+ "bundle": {
26
+ "patch": "./cordis.patch.yml"
27
+ },
28
+ "client": {
29
+ "platform": "web"
30
+ },
31
+ "compatibility": {
32
+ "dsh": ">=0.2.0-rc.1 <0.3.0-0",
33
+ "dshReleases": {
34
+ "0.2.0-rc.1": "compatible",
35
+ "0.2.0-rc.2": "compatible",
36
+ "0.2.1-alpha.5": "compatible",
37
+ "0.2.1-rc.1": "compatible",
38
+ "0.2.1-rc.2": "compatible",
39
+ "0.2.2-alpha.3": "compatible"
40
+ }
41
+ }
42
+ },
43
+ "dshhub": {
44
+ "schemaVersion": 1,
45
+ "displayName": "dsh-cost-meter",
46
+ "summary": "DeepSeek Harness 会话费用统计:本会话费用、预算图框、官方余额、自定义 Provider 余额查询、Coding Plan 额度查询、历史记录,支持峰谷计价(切换前弹窗与系统通知提醒)与官方价格一键同步。",
47
+ "categories": [
48
+ "费用",
49
+ "Web UI",
50
+ "观测"
51
+ ],
52
+ "surfaces": [
53
+ "host",
54
+ "web"
55
+ ],
56
+ "capabilities": {
57
+ "provides": [
58
+ "service:cost-meter"
59
+ ]
60
+ },
61
+ "compatibility": {
62
+ "dsh": ">=0.2.0-rc.1 <0.3.0-0",
63
+ "node": ">=20"
64
+ },
65
+ "permissions": {
66
+ "network": [
67
+ "https://chatgpt.com",
68
+ "https://api.deepseek.com",
69
+ "https://api-docs.deepseek.com",
70
+ "https://open.volcengineapi.com",
71
+ "https://ark.cn-beijing.volces.com",
72
+ "https://opencode.ai",
73
+ "https://api.anthropic.com",
74
+ "https://api.z.ai",
75
+ "https://open.bigmodel.cn",
76
+ "https://www.minimaxi.com",
77
+ "https://www.minimax.cn",
78
+ "https://www.minimax.io",
79
+ "https://api.kimi.com",
80
+ "https://api.moonshot.cn",
81
+ "https://openrouter.ai",
82
+ "https://api.siliconflow.cn",
83
+ "https://api.commandcode.ai",
84
+ "https://api.cline.bot",
85
+ "https://api.factory.ai",
86
+ "https://ax.ac.sugon.com",
87
+ "https://platform.qianwenai.com",
88
+ "https://platform-home.qianwenai.com",
89
+ "https://business.aliyuncs.com",
90
+ "https://tokenrhythm.studio",
91
+ "https://platform.xiaomimimo.com",
92
+ "https://console.bce.baidu.com",
93
+ "https://www.codebuddy.cn",
94
+ "https://www.workbuddy.ai",
95
+ "https://amr-api.open-design.ai",
96
+ "https://api.frankfurter.dev"
97
+ ]
98
+ }
99
+ },
100
+ "files": [
101
+ "docs/web-request-fees.md",
102
+ "locale",
103
+ "lib",
104
+ "cordis.patch.yml",
105
+ "docs/provider-pricing.json",
106
+ "docs/subscription-catalog.json",
107
+ "docs/catalog-2026-10-28.md",
108
+ "docs/billing-statistics.md",
109
+ "docs/billion-context-billing.md",
110
+ "docs/opendesign-billing.md",
111
+ "docs/custom-balance-sources.md",
112
+ "docs/performance-2026-10-18.md",
113
+ "docs/performance-2026-10-18.json",
114
+ "docs/update-notes-2026-10-15.md",
115
+ "docs/ledger-lock-recovery.md",
116
+ "docs/external-usage.md",
117
+ "docs/qwen-cli-quota.md",
118
+ "docs/factory-quota.md",
119
+ "docs/baidu-token-plan.md",
120
+ "docs/session-sidebar-recovery.md",
121
+ "docs/provider-pricing-2026-10.md",
122
+ "docs/openrouter-prices.md",
123
+ "docs/context-costs-design.md",
124
+ "docs/context-costs-preview.png",
125
+ "docs/cost-share-overview.png",
126
+ "docs/call-detail-preview.png",
127
+ "docs/step-billing-preview.png",
128
+ "docs/maintenance-review-2026-10-10.md",
129
+ "THIRD_PARTY_NOTICES.md",
130
+ "docs/display-settings.md",
131
+ "docs/update-notes-1.8.28.md",
132
+ "docs/update-notes-1.8.29.md",
133
+ "docs/context-stream-diagnostics.md",
134
+ "docs/exchange-rates.md",
135
+ "docs/update-notes-1.8.30.md",
136
+ "docs/idle-performance.md",
137
+ "docs/pricing-history-storage.md",
138
+ "docs/custom-model-prices.md",
139
+ "docs/update-notes-1.8.31.md",
140
+ "docs/update-notes-1.8.32.md",
141
+ "docs/update-notes-1.8.33.md",
142
+ "docs/update-notes-1.8.34.md",
143
+ "docs/update-notes-1.8.35.md",
144
+ "docs/update-notes-1.8.36.md",
145
+ "docs/update-notes-1.9.0.md",
146
+ "docs/update-notes-1.9.1.md",
147
+ "docs/update-notes-1.9.2.md",
148
+ "docs/better-session.md",
149
+ "docs/model-history-repricing.md",
150
+ "docs/tokenrhythm-balance.md",
151
+ "docs/dsh-0.2.1-compatibility.md",
152
+ "docs/dsh-0.2.2-compatibility.md",
153
+ "docs/pnpm-supply-chain-policy.md",
154
+ "docs/update-notes-1.9.3.md",
155
+ "docs/update-notes-1.9.4.md",
156
+ "docs/update-notes-1.9.5.md",
157
+ "docs/update-notes-1.9.6.md",
158
+ "docs/update-notes-1.9.7.md",
159
+ "docs/update-notes-1.9.8.md",
160
+ "docs/update-notes-1.9.9.md",
161
+ "docs/plugin-compatibility-watch.md",
162
+ "docs/update-notes-1.9.10.md",
163
+ "docs/update-notes-1.9.11.md",
164
+ "docs/update-notes-1.9.12.md",
165
+ "docs/update-notes-1.9.13.md",
166
+ "docs/update-notes-1.9.14.md",
167
+ "docs/update-notes-1.9.15.md",
168
+ "docs/update-notes-1.9.16.md",
169
+ "docs/update-notes-1.9.17.md",
170
+ "docs/update-notes-1.9.18.md",
171
+ "docs/update-notes-1.9.19.md",
172
+ "docs/update-notes-1.9.20.md",
173
+ "docs/update-notes-1.9.21.md",
174
+ "docs/update-notes-1.9.22.md",
175
+ "docs/update-notes-1.9.23.md",
176
+ "docs/update-notes-1.9.24.md",
177
+ "docs/update-notes-1.9.25.md",
178
+ "docs/update-notes-1.9.26.md",
179
+ "docs/update-notes-1.9.27.md",
180
+ "docs/update-notes-1.9.28.md",
181
+ "docs/update-notes-1.9.29.md",
182
+ "docs/update-notes-1.9.30.md",
183
+ "docs/settings-pages.md",
184
+ "docs/update-notes-1.9.31.md",
185
+ "docs/update-notes-1.9.32.md",
186
+ "docs/update-notes-1.9.33.md",
187
+ "docs/billing-storage.md",
188
+ "docs/update-notes-1.9.34.md",
189
+ "docs/update-notes-1.9.35.md",
190
+ "docs/update-notes-1.9.36.md",
191
+ "docs/update-notes-1.9.37.md",
192
+ "docs/update-notes-1.9.38.md",
193
+ "docs/update-notes-1.9.39.md",
194
+ "docs/update-notes-1.9.40.md",
195
+ "docs/update-notes-1.9.41.md",
196
+ "docs/update-notes-1.9.42.md",
197
+ "docs/update-notes-1.9.43.md",
198
+ "docs/update-notes-1.9.44.md",
199
+ "docs/update-notes-1.9.45.md",
200
+ "docs/update-notes-1.9.46.md",
201
+ "docs/update-notes-1.9.47.md",
202
+ "docs/update-notes-1.9.48.md",
203
+ "docs/provider-peak-schedules.md",
204
+ "docs/billion-context-peer-discovery.md",
205
+ "docs/official-price-sync-safety.md",
206
+ "docs/update-notes-1.9.51.md",
207
+ "docs/update-notes-1.9.52.md",
208
+ "docs/update-notes-1.9.53.md",
209
+ "docs/update-notes-1.9.54.md",
210
+ "docs/update-notes-1.9.55.md",
211
+ "docs/update-notes-1.9.56.md",
212
+ "docs/update-notes-1.9.57.md",
213
+ "docs/update-notes-1.9.58.md",
214
+ "docs/billing-review-2026-11-02.md",
215
+ "docs/billing-currency.md",
216
+ "docs/native-search-billing.md",
217
+ "docs/features.md",
218
+ "docs/features.en.md",
219
+ "docs/billing.md",
220
+ "docs/billing.en.md",
221
+ "docs/install.md",
222
+ "docs/install.en.md",
223
+ "docs/architecture.md",
224
+ "docs/architecture.en.md",
225
+ "docs/custom-balance-sources.en.md",
226
+ "docs/cliproxyapi-quota.md",
227
+ "docs/images",
228
+ "docs/promo.png",
229
+ "docs/promo.en.png",
230
+ "docs/update-notes-1.9.59.md",
231
+ "docs/catalog-2026-11-05.md",
232
+ "docs/update-notes-1.9.60.md",
233
+ "docs/local-savings.md",
234
+ "docs/update-notes-1.9.61.md",
235
+ "docs/update-notes-1.9.62.md",
236
+ "docs/update-notes-1.9.63.md",
237
+ "docs/update-notes-1.9.64.md",
238
+ "docs/update-notes-1.9.65.md",
239
+ "docs/update-notes-1.9.66.md",
240
+ "docs/balance-credentials.md"
241
+ ],
242
+ "dependencies": {
243
+ "acorn": "8.15.0",
244
+ "zod": "4.6.6"
245
+ },
246
+ "peerDependencies": {
247
+ "@deepseek-ai/dsh-credentials": ">=0.2.0-rc.1 <0.3.0-0 || >=0.2.1-0 <0.3.0-0 || >=0.2.2-0 <0.3.0-0",
248
+ "@deepseek-ai/dsh-home-paths": ">=0.2.0-rc.1 <0.3.0-0 || >=0.2.1-0 <0.3.0-0 || >=0.2.2-0 <0.3.0-0"
249
+ },
250
+ "repository": {
251
+ "type": "git",
252
+ "url": "git+https://github.com/Han-1413141/dsh-cost-meter.git"
253
+ },
254
+ "homepage": "https://github.com/Han-1413141/dsh-cost-meter#readme",
255
+ "keywords": [
256
+ "deepseek",
257
+ "deepseek-harness",
258
+ "dsh",
259
+ "dsh-plugin",
260
+ "client-plugin",
261
+ "cost",
262
+ "usage",
263
+ "billing",
264
+ "budget",
265
+ "i18n",
266
+ "bilingual",
267
+ "zh",
268
+ "en",
269
+ "language"
270
+ ],
271
+ "license": "MIT",
272
+ "engines": {
273
+ "node": ">=20",
274
+ "dsh": ">=0.2.0-rc.1 <0.3.0-0"
275
+ },
276
+ "os": [
277
+ "darwin",
278
+ "linux",
279
+ "win32"
280
+ ],
281
+ "scripts": {
282
+ "build": "node scripts/build.mjs",
283
+ "test": "node test/verify.mjs"
284
+ },
285
+ "devDependencies": {
286
+ "@deepseek-ai/dsh-credentials": "0.2.1-rc.4",
287
+ "@deepseek-ai/dsh-home-paths": "0.2.1-rc.4",
288
+ "esbuild": "^0.28.2"
289
+ }
290
+ }