dsh-cost-meter 1.9.55 → 1.9.56

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
@@ -6,7 +6,7 @@
6
6
 
7
7
  **Session cost tracking plugin for the DeepSeek Harness web GUI (bilingual UI)**
8
8
 
9
- [![version](https://img.shields.io/badge/version-1.9.55-4176E6)](https://github.com/Han-1413141/dsh-cost-meter)
9
+ [![version](https://img.shields.io/badge/version-1.9.56-4176E6)](https://github.com/Han-1413141/dsh-cost-meter)
10
10
  [![npm](https://img.shields.io/npm/v/dsh-cost-meter?label=npm)](https://www.npmjs.com/package/dsh-cost-meter)
11
11
  [![dshfind](https://dshfind.com/api/badge/Han-1413141/dsh-cost-meter?metric=downloads&lang=en)](https://dshfind.com/zh/plugins/Han-1413141/dsh-cost-meter?ref=badge)
12
12
  [![license](https://img.shields.io/badge/license-MIT-green)](LICENSE)
@@ -16,11 +16,11 @@
16
16
 
17
17
  </div>
18
18
 
19
- **v1.9.55** unifies the clickable session-cost entry with native statistics, preserves saved cost positions and custom currency amounts, and centers percentages in quota rings.
19
+ **v1.9.56** keeps fee reads inside the two-second ledger save window, combining frequent updates into fewer background transactions while showing current usage.
20
20
 
21
21
  **Host floor: DSH 0.2.0** · Adaptation target: **0.2.2-alpha.3**. Expand the compatibility notes below for exact declarations, host records and troubleshooting.
22
22
 
23
- Release notes: [v1.9.55](docs/update-notes-1.9.55.md#english). Fully restart DSH after updating.
23
+ Release notes: [v1.9.56](docs/update-notes-1.9.56.md#english). Fully restart DSH after updating.
24
24
 
25
25
  ![Promo art](docs/promo.en.png)
26
26
 
@@ -352,22 +352,22 @@ On Node.js 20, use `npm install -g pnpm@10` instead. See [pnpm installation and
352
352
  dsh plugin --profile web add dsh-cost-meter
353
353
  ```
354
354
 
355
- **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.55`** — review the script before running):
355
+ **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.56`** — review the script before running):
356
356
 
357
357
  ```powershell
358
- irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.55/install.ps1 | iex
358
+ irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.56/install.ps1 | iex
359
359
  ```
360
360
 
361
361
  **Or a plain command line** (the machine must already have pnpm and git; also pinned to the tag):
362
362
 
363
363
  ```sh
364
- dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.55
364
+ dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.56
365
365
  ```
366
366
 
367
367
  Without git, use the GitHub tag archive:
368
368
 
369
369
  ```sh
370
- dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.55.tar.gz
370
+ dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.56.tar.gz
371
371
  ```
372
372
 
373
373
  After installing, **restart** `dsh web` (plugin rows, the Typert manifest and the client bundle are all scanned at startup):
@@ -432,7 +432,7 @@ Workarounds:
432
432
 
433
433
  ```yaml
434
434
  minimumReleaseAgeExclude:
435
- - dsh-cost-meter@1.9.55
435
+ - dsh-cost-meter@1.9.56
436
436
  ```
437
437
 
438
438
  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
@@ -6,7 +6,7 @@
6
6
 
7
7
  **DeepSeek Harness 会话费用统计插件(界面中英双语)**
8
8
 
9
- [![version](https://img.shields.io/badge/version-1.9.55-4176E6)](https://github.com/Han-1413141/dsh-cost-meter)
9
+ [![version](https://img.shields.io/badge/version-1.9.56-4176E6)](https://github.com/Han-1413141/dsh-cost-meter)
10
10
  [![npm](https://img.shields.io/npm/v/dsh-cost-meter?label=npm)](https://www.npmjs.com/package/dsh-cost-meter)
11
11
  [![dshfind](https://dshfind.com/api/badge/Han-1413141/dsh-cost-meter?metric=downloads&lang=zh)](https://dshfind.com/zh/plugins/Han-1413141/dsh-cost-meter?ref=badge)
12
12
  [![license](https://img.shields.io/badge/license-MIT-green)](LICENSE)
@@ -16,11 +16,11 @@
16
16
 
17
17
  </div>
18
18
 
19
- **v1.9.55** 统一会话费用入口与官方统计样式,保留已有费用位置和自定义货币配置,修复套餐圆环的百分比居中。
19
+ **v1.9.56** 修复费用查询提前保存账本的问题,在两秒窗口内合并频繁更新,减少重复后台事务,费用继续实时显示。
20
20
 
21
21
  **宿主要求:DSH 0.2.0 起支持** · 适配目标 **0.2.2-alpha.3**。完整声明、历史记录与安装排障见下方展开项。
22
22
 
23
- 更新说明:[v1.9.55](docs/update-notes-1.9.55.md#中文)。更新后完全重启 DSH。
23
+ 更新说明:[v1.9.56](docs/update-notes-1.9.56.md#中文)。更新后完全重启 DSH。
24
24
 
25
25
  ![宣传图](docs/promo.png)
26
26
 
@@ -352,22 +352,22 @@ Node.js 20 请改用 `npm install -g pnpm@10`。版本要求见 [pnpm 官方安
352
352
  dsh plugin --profile web add dsh-cost-meter
353
353
  ```
354
354
 
355
- **PowerShell 一键脚本**(复制整行粘贴回车;自动补齐 pnpm、自动探测 git,无需克隆仓库;安装链**固定到发布 tag `v1.9.55`**,建议先下载审阅再运行):
355
+ **PowerShell 一键脚本**(复制整行粘贴回车;自动补齐 pnpm、自动探测 git,无需克隆仓库;安装链**固定到发布 tag `v1.9.56`**,建议先下载审阅再运行):
356
356
 
357
357
  ```powershell
358
- irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.55/install.ps1 | iex
358
+ irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.56/install.ps1 | iex
359
359
  ```
360
360
 
361
361
  **或直接命令行**(机器上需已有 pnpm 与 git;同样固定到 tag):
362
362
 
363
363
  ```sh
364
- dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.55
364
+ dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.56
365
365
  ```
366
366
 
367
367
  没有 git 时可用 GitHub tag 打包直链:
368
368
 
369
369
  ```sh
370
- dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.55.tar.gz
370
+ dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.56.tar.gz
371
371
  ```
372
372
 
373
373
  安装后**重启** `dsh web`(插件行、Typert 清单与客户端 bundle 均在启动时扫描):
@@ -432,7 +432,7 @@ DSH **0.2.1-rc.1 / 0.2.1-rc.2** 宿主自带 pnpm **11.28.5**,默认启用内
432
432
 
433
433
  ```yaml
434
434
  minimumReleaseAgeExclude:
435
- - dsh-cost-meter@1.9.55
435
+ - dsh-cost-meter@1.9.56
436
436
  ```
437
437
 
438
438
  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,21 @@
1
+ # v1.9.56 — 账本读取与写入合并
2
+
3
+ ## 中文
4
+
5
+ - 修复费用查询提前触发账本保存的问题。磁盘 revision 未变时,费用查询读取当前内存,原定两秒计时器合并期间的更新,减少重复快照、Worker 启动与磁盘写入。
6
+ - 待写数据缺少计时器且没有后台事务时安排保存。其他进程更新账本后立即合并,显式提交和退出时完成保存。
7
+ - 隔离复现中,同样八次更新与读取的后台事务从八次合并为一次。真实临时账本的调用数、Token 和费用一致,回归覆盖跨进程同步、提前退出和写入期间的新调用。
8
+
9
+ 感谢 [@XHPAN](https://github.com/XHPAN) 提供源码定位、隔离复现、真实临时文件对照和保留写入窗口的修复建议。[原始报告 #470](https://github.com/Han-1413141/dsh-cost-meter/issues/470)
10
+
11
+ 更新后完全重启 DSH。
12
+
13
+ ## English
14
+
15
+ - Fee reads observe current in-memory usage while the original two-second timer combines pending ledger updates. This reduces repeated snapshots, worker starts and disk transactions.
16
+ - Pending data without a timer or active writer receives a save deadline. Sibling-process writes reconcile immediately, and explicit flush and shutdown persist pending usage.
17
+ - The isolated regression combines eight update/read transactions into one. Real temporary-ledger checks preserve call counts, tokens and cost, including cross-process reconciliation and early shutdown.
18
+
19
+ Thanks to [@XHPAN](https://github.com/XHPAN) for the diagnosis, reproduction, temporary-file comparison and proposed scheduling fix. [Original report #470](https://github.com/Han-1413141/dsh-cost-meter/issues/470)
20
+
21
+ Fully restart DSH after updating.