dsh-cost-meter 1.9.5 → 1.9.6

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
@@ -10,20 +10,20 @@ Community and feedback: [Join the WeChat group →](#community). The WeChat grou
10
10
 
11
11
  Per-conversation cost · daily totals · OpenCode Go subscription quota display · budget with usage percentage · official account balance · custom provider balance · balance progress bar · history · peak/off-peak pricing hours display (peak hours UTC 01:00–04:00, 06:00–10:00; weekends and Chinese public holidays are off-peak all day, with separate labels) · pre-switch popup & system-notification alerts for peak/off-peak changes (position / lead time / alert type configurable) · one-click price sync from the official docs · Codex-style token usage heat grid · multi-vendor model pricing (built-in 170+ model-ID catalog with auto-matching) · mainstream Coding Plan quota queries & display (Anthropic / Z.ai / MiniMax / Kimi / OpenRouter / SiliconFlow / CommandCode / SCNet / Volcano Ark / Qwen / Xiaomi MiMo / Factory Droid) plan/API dual-track billing (subscription quota vs pay-as-you-go money separated, per-1% & full-window token/equivalent-cost estimates with daily/weekly/monthly curves) · subscription plugin compatibility (Codex / ChatGPT subscription plans) · mobile layout (dsh-pocket) · quota strip above the input box (budget / Go / coding-plan usage in one row, toggleable)
12
12
 
13
- [![version](https://img.shields.io/badge/version-1.9.5-4176E6)](https://github.com/Han-1413141/dsh-cost-meter)
13
+ [![version](https://img.shields.io/badge/version-1.9.6-4176E6)](https://github.com/Han-1413141/dsh-cost-meter)
14
14
 
15
15
  **Minimum supported host: DSH 0.2.0.** The plugin declares the floor in `engines.dsh`, the host's admission gate for plugins, and no longer supports any DSH 0.1.x release; the adaptation target is the npm `next` release **0.2.1-rc.2**. Exact ranges and how the host reads them: [compatibility declaration](docs/dsh-0.2.1-compatibility.md#english).
16
16
 
17
17
  Supports [official Search/Fetch request fees](docs/web-request-fees.md#english), separately from model tokens.
18
18
 
19
- **v1.9.5** fixes Codex quota cards disappearing after an unsuccessful read: the sidebar keeps a retry entry and recovers automatically after sign-in. GitHub now monitors published interfaces of billion-context, dsh-codex-subscription and dsh-codex-connect.
19
+ **v1.9.6** restores official balances immediately after re-enabling display, adds per-source LAN HTTP permissions to CLIProxyAPI settings, and blends composer quota chips into the page background.
20
20
 
21
21
  Configuration and verification: [OpenDesign queries](docs/opendesign-billing.md), [dynamic ports / LAN / WorkBuddy2API setup](docs/custom-balance-sources.md), and [opacity fixes with performance measurements](docs/performance-2026-10-18.md).
22
22
 
23
23
 
24
24
  Desktop users: follow the [Desktop installation instructions](docs/install-troubleshooting.md#desktop-安装与更新) for the application's own CLI and `desktop` Profile.
25
25
 
26
- Release notes: [v1.9.5](docs/update-notes-1.9.5.md#english). Fully restart DSH after updating.
26
+ Release notes: [v1.9.6](docs/update-notes-1.9.6.md#english). Fully restart DSH after updating.
27
27
 
28
28
  Host records inside the declared range, and the earlier 0.1.x history, are in the [compatibility record](docs/host-compatibility.md); the per-release list lives in `package.json` (`dsh.compatibility.dshReleases`).
29
29
 
@@ -341,22 +341,22 @@ On Node.js 20, use `npm install -g pnpm@10` instead. See [pnpm installation and
341
341
  dsh plugin --profile web add dsh-cost-meter
342
342
  ```
343
343
 
344
- **PowerShell one-click script** (copy the whole line, paste, press Enter; pnpm is provisioned automatically, git is auto-detected — no clone needed; the install chain is **pinned to the release tag `v1.9.5`** — review the script before running):
344
+ **PowerShell one-click script** (copy the whole line, paste, press Enter; pnpm is provisioned automatically, git is auto-detected — no clone needed; the install chain is **pinned to the release tag `v1.9.6`** — review the script before running):
345
345
 
346
346
  ```powershell
347
- irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.5/install.ps1 | iex
347
+ irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.6/install.ps1 | iex
348
348
  ```
349
349
 
350
350
  **Or a plain command line** (the machine must already have pnpm and git; also pinned to the tag):
351
351
 
352
352
  ```sh
353
- dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.5
353
+ dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.6
354
354
  ```
355
355
 
356
356
  Without git, use the GitHub tag archive:
357
357
 
358
358
  ```sh
359
- dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.5.tar.gz
359
+ dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.6.tar.gz
360
360
  ```
361
361
 
362
362
  After installing, **restart** `dsh web` (plugin rows, the Typert manifest and the client bundle are all scanned at startup):
@@ -421,7 +421,7 @@ Workarounds:
421
421
 
422
422
  ```yaml
423
423
  minimumReleaseAgeExclude:
424
- - dsh-cost-meter@1.9.5
424
+ - dsh-cost-meter@1.9.6
425
425
  ```
426
426
 
427
427
  3. For a one-off CLI operation, forward the pnpm flag: `dsh plugin --profile desktop remove dsh-cost-meter --config.minimum-release-age=0` (or add `--trust-lockfile` when only lockfile verification fails). Both flags were verified against pnpm 11.28.5 in a temporary profile.
package/README.zh-CN.md CHANGED
@@ -10,20 +10,20 @@
10
10
 
11
11
  本会话费用 · 当日费用 · OpenCode Go 订阅额度显示 · 预算与已用百分比 · 官方账户余额 · 自定义 Provider 余额查询(可配任意 HTTP 端点) · 余额三段进度条 · 历史记录 · 峰谷计价时段显示(UTC 01:00–04:00、06:00–10:00 为峰时段;周末与中国法定假日全天按谷价,分别标注) · 峰/谷切换前弹窗与系统通知提醒(位置/提前量/提醒类型可配) · 官方价格一键同步 · 类 Codex Token 用量热图 · 多厂商多模型价格计费(内置 170+ 模型 ID 价格目录与自动匹配) · 主流 Coding Plan 额度查询与显示(Anthropic / Z.ai / MiniMax / Kimi / OpenRouter / SiliconFlow / CommandCode / SCNet / 火山方舟 / 千问 / 小米 MiMo 十一家,含 Volcano Ark AK/SK 签名与 MiMo 控制台 Cookie 查询) · Plan/API 双轨计费(订阅额度与按量金额分离统计,每 1% 额度与满窗的 token/等值金额估算及日/周/月曲线) · 订阅插件兼容(Codex / ChatGPT 订阅) · 手机端适配(dsh-pocket) · 输入框上方额度横条(预算/Go/Coding Plan 用量一条横排显示,可开关)
12
12
 
13
- [![version](https://img.shields.io/badge/version-1.9.5-4176E6)](https://github.com/Han-1413141/dsh-cost-meter)
13
+ [![version](https://img.shields.io/badge/version-1.9.6-4176E6)](https://github.com/Han-1413141/dsh-cost-meter)
14
14
 
15
15
  **最低支持宿主:DSH 0.2.0。** 插件把下限声明在 `engines.dsh`(宿主准入插件的闸门),不再支持任何 DSH 0.1.x 版本;本轮适配目标为 npm `next` 标签的 **0.2.1-rc.2**。具体范围与宿主的读取方式见[兼容声明](docs/dsh-0.2.1-compatibility.md#中文)。
16
16
 
17
17
  新增 [DeepSeek Search/Fetch API 次数费](docs/web-request-fees.md#中文),只计有结果的成功请求,并将网页抓取独立分类。
18
18
 
19
- **v1.9.5** 修复 Codex 额度查询失败后卡片消失的问题,保留点击重试入口,登录后自动恢复显示;增加 billion-context、dsh-codex-subscription、dsh-codex-connect 的 GitHub 发布包与接口监控。
19
+ **v1.9.6** 修复官方余额关闭显示后无法立即恢复的问题;补齐 CLIProxyAPI 每个来源的局域网 HTTP 权限设置;输入区额度条背景与页面保持一致。
20
20
 
21
21
  配置与验证:[OpenDesign 查询说明](docs/opendesign-billing.md)、[随机端口 / 局域网 / WorkBuddy2API 配置](docs/custom-balance-sources.md)、[透明度修复与性能测量](docs/performance-2026-10-18.md)。
22
22
 
23
23
 
24
24
  桌面端用户请按 [Desktop 安装说明](docs/install-troubleshooting.md#desktop-安装与更新),使用应用自带的 CLI 和 `desktop` Profile。
25
25
 
26
- 更新说明:[v1.9.5](docs/update-notes-1.9.5.md#中文)。更新后完全重启 DSH。
26
+ 更新说明:[v1.9.6](docs/update-notes-1.9.6.md#中文)。更新后完全重启 DSH。
27
27
 
28
28
  声明范围内的宿主记录与此前的 0.1.x 历史见[兼容记录](docs/host-compatibility.md);逐版本清单在 `package.json` 的 `dsh.compatibility.dshReleases`。
29
29
 
@@ -341,22 +341,22 @@ Node.js 20 请改用 `npm install -g pnpm@10`。版本要求见 [pnpm 官方安
341
341
  dsh plugin --profile web add dsh-cost-meter
342
342
  ```
343
343
 
344
- **PowerShell 一键脚本**(复制整行粘贴回车;自动补齐 pnpm、自动探测 git,无需克隆仓库;安装链**固定到发布 tag `v1.9.5`**,建议先下载审阅再运行):
344
+ **PowerShell 一键脚本**(复制整行粘贴回车;自动补齐 pnpm、自动探测 git,无需克隆仓库;安装链**固定到发布 tag `v1.9.6`**,建议先下载审阅再运行):
345
345
 
346
346
  ```powershell
347
- irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.5/install.ps1 | iex
347
+ irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.6/install.ps1 | iex
348
348
  ```
349
349
 
350
350
  **或直接命令行**(机器上需已有 pnpm 与 git;同样固定到 tag):
351
351
 
352
352
  ```sh
353
- dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.5
353
+ dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.6
354
354
  ```
355
355
 
356
356
  没有 git 时可用 GitHub tag 打包直链:
357
357
 
358
358
  ```sh
359
- dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.5.tar.gz
359
+ dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.6.tar.gz
360
360
  ```
361
361
 
362
362
  安装后**重启** `dsh web`(插件行、Typert 清单与客户端 bundle 均在启动时扫描):
@@ -421,7 +421,7 @@ DSH **0.2.1-rc.1 / 0.2.1-rc.2** 宿主自带 pnpm **11.28.5**,默认启用内
421
421
 
422
422
  ```yaml
423
423
  minimumReleaseAgeExclude:
424
- - dsh-cost-meter@1.9.5
424
+ - dsh-cost-meter@1.9.6
425
425
  ```
426
426
 
427
427
  3. 仅本次操作用 CLI 透传 pnpm 参数:`dsh plugin --profile desktop remove dsh-cost-meter --config.minimum-release-age=0`;若只是 lockfile 校验阶段失败,可改用 `--trust-lockfile`。这两个参数已在本机 pnpm 11.28.5 临时 Profile 上实测可用。
@@ -0,0 +1,45 @@
1
+ # v1.9.6
2
+
3
+ ## 中文
4
+
5
+ ### 官方余额重新开启后立即显示
6
+
7
+ 修复“显示位置设为关闭,退出设置,再进入改回两者都显示后,余额仍不出现”的问题。关闭时写入的状态不再阻挡重新查询,恢复显示会立即取得余额或显示查询错误,无需重启或等待刷新间隔。仅在侧栏、设置页面之间切换位置时继续沿用有效缓存。
8
+
9
+ ### CLIProxyAPI 局域网配置
10
+
11
+ 在“设置 → 费用 → 额度”中,点击 CLIProxyAPI 来源名称展开配置。每个来源现在都提供凭据白名单和“允许非回环 HTTP”开关。
12
+
13
+ 例如 Base URL 为 `http://192.168.1.100:8317` 时,凭据白名单填写 `192.168.1.100:8317`,并勾选“允许非回环 HTTP”,然后保存该来源的 Management Key 并启用。HTTPS 来源只需配置准确的主机与端口白名单;HTTP 会明文传输凭据,开关说明保留此提示。授权分别属于各个来源,添加其他来源不会继承。
14
+
15
+ 感谢 [@snhun](https://github.com/snhun) 在 [#321](https://github.com/Han-1413141/dsh-cost-meter/issues/321) 报告局域网配置缺少入口,并建议为新增来源分别提供配置。
16
+
17
+ ### 输入区额度组件背景
18
+
19
+ 输入框上方的预算、Go、套餐与 Codex 额度组件改用透明背景,与所在页面保持一致;文字、进度条和交互状态继续使用 DSH 主题颜色。
20
+
21
+ ### 本地验证
22
+
23
+ 使用已构建客户端与生产宿主服务,在真实 Chrome 中执行关闭余额、退出设置、重新进入并恢复显示的完整过程;刷新间隔设为 60 分钟,恢复后立即显示余额。CLIProxyAPI 使用本机局域网 HTTP 模拟管理服务,验证配置保存、重新进入、真实 HTTP 查询、两个来源权限独立,以及缺少白名单或 HTTP 授权时在发送凭据前拒绝请求。数据和密钥为测试值,不查询用户账户,不调用模型。
24
+
25
+ 安装更新后,完全退出 DSH(包括托盘)再打开以加载新版插件。以后切换余额显示无需重启。
26
+
27
+ ## English
28
+
29
+ ### Immediate balance display recovery
30
+
31
+ Re-enabling official balance display now queries immediately instead of reusing a disabled snapshot until its refresh interval expires. Closing and reopening settings no longer requires a DSH restart. Switching between sidebar and settings placements retains valid cached data.
32
+
33
+ ### CLIProxyAPI LAN settings
34
+
35
+ Each source now exposes its exact credential host allowlist and non-loopback HTTP permission. For `http://192.168.1.100:8317`, enter `192.168.1.100:8317` in that source's allowlist and enable non-loopback HTTP. HTTP sends credentials in plaintext, as indicated by the control. Permissions remain independent between sources. Thanks to [@snhun](https://github.com/snhun) for reporting the missing controls and suggesting per-source settings in [#321](https://github.com/Han-1413141/dsh-cost-meter/issues/321).
36
+
37
+ ### Composer quota backgrounds
38
+
39
+ Quota chips above the composer use a transparent background to blend into their containing page while retaining theme text, progress bars and interaction states.
40
+
41
+ ### Validation
42
+
43
+ A real Chrome test connects the built client to the production host service, exercises closing and reopening settings with a 60-minute balance cache, and queries a local LAN HTTP gateway. It verifies persisted source configuration, independent permissions, and rejection before credential transmission when either permission is missing. All account data and credentials are synthetic; no model calls are made.
44
+
45
+ Fully quit DSH, including its tray process, and reopen after installing this update. Subsequent balance display toggles do not require restarting.