dsh-cost-meter 1.9.28 → 1.9.29
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 +8 -8
- package/README.zh-CN.md +8 -8
- package/THIRD_PARTY_NOTICES.md +2 -0
- package/docs/update-notes-1.9.29.md +45 -0
- package/lib/client.js +2 -2
- package/lib/client.sidebar-order.js +1 -1
- package/lib/ledger-persistence.js +2 -2
- package/lib/ledger-writer-worker.js +2 -30
- package/lib/ledger-writer.js +22 -6
- package/lib/store.js +3 -1
- package/package.json +3 -2
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
|
-
[](https://github.com/Han-1413141/dsh-cost-meter)
|
|
10
10
|
[](https://www.npmjs.com/package/dsh-cost-meter)
|
|
11
11
|
[](https://dshfind.com/zh/plugins/Han-1413141/dsh-cost-meter?ref=badge)
|
|
12
12
|
[](LICENSE)
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
|
|
17
17
|
</div>
|
|
18
18
|
|
|
19
|
-
**v1.9.
|
|
19
|
+
**v1.9.29** fixes Desktop sidebar spacing, OpenDesign balance placement, two-line Today alignment and background ledger saving/disposal.
|
|
20
20
|
|
|
21
21
|
**Host floor: DSH 0.2.0** · Adaptation target: **0.2.1-rc.2** (npm `next`). Expand the compatibility notes below for exact declarations, host records and troubleshooting.
|
|
22
22
|
|
|
23
|
-
Release notes: [v1.9.
|
|
23
|
+
Release notes: [v1.9.29](docs/update-notes-1.9.29.md#english). Fully restart DSH after updating.
|
|
24
24
|
|
|
25
25
|

|
|
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.
|
|
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.29`** — review the script before running):
|
|
356
356
|
|
|
357
357
|
```powershell
|
|
358
|
-
irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.
|
|
358
|
+
irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.29/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.
|
|
364
|
+
dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.29
|
|
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.
|
|
370
|
+
dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.29.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.
|
|
435
|
+
- dsh-cost-meter@1.9.29
|
|
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
|
-
[](https://github.com/Han-1413141/dsh-cost-meter)
|
|
10
10
|
[](https://www.npmjs.com/package/dsh-cost-meter)
|
|
11
11
|
[](https://dshfind.com/zh/plugins/Han-1413141/dsh-cost-meter?ref=badge)
|
|
12
12
|
[](LICENSE)
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
|
|
17
17
|
</div>
|
|
18
18
|
|
|
19
|
-
**v1.9.
|
|
19
|
+
**v1.9.29** 修复桌面侧栏底部留白、OpenDesign 余额位置、今日消费两行对齐,以及后台账本保存和卸载卡住的问题。
|
|
20
20
|
|
|
21
21
|
**宿主要求:DSH 0.2.0 起支持** · 适配目标 **0.2.1-rc.2**(npm `next`)。完整声明、历史记录与安装排障见下方展开项。
|
|
22
22
|
|
|
23
|
-
更新说明:[v1.9.
|
|
23
|
+
更新说明:[v1.9.29](docs/update-notes-1.9.29.md#中文)。更新后完全重启 DSH。
|
|
24
24
|
|
|
25
25
|

|
|
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.
|
|
355
|
+
**PowerShell 一键脚本**(复制整行粘贴回车;自动补齐 pnpm、自动探测 git,无需克隆仓库;安装链**固定到发布 tag `v1.9.29`**,建议先下载审阅再运行):
|
|
356
356
|
|
|
357
357
|
```powershell
|
|
358
|
-
irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.
|
|
358
|
+
irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.29/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.
|
|
364
|
+
dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.29
|
|
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.
|
|
370
|
+
dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.29.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.
|
|
435
|
+
- dsh-cost-meter@1.9.29
|
|
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 上实测可用。
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -4,6 +4,8 @@ The display settings preview reuses selected SVG artwork and presentation CSS fr
|
|
|
4
4
|
|
|
5
5
|
Artwork is reused without geometry changes. Presentation styles are scoped and adapted into separate regions at normal text size. The preview uses the host's exported primitives when available.
|
|
6
6
|
|
|
7
|
+
The standalone ledger worker also bundles the home-directory resolver from @deepseek-ai/dsh-home-paths 0.2.1-rc.1, under the same DeepSeek MIT license below. It does not bundle the host runtime or credential services.
|
|
8
|
+
|
|
7
9
|
MIT License
|
|
8
10
|
|
|
9
11
|
Copyright (c) 2026 DeepSeek
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# v1.9.29 更新说明
|
|
2
|
+
|
|
3
|
+
## 中文
|
|
4
|
+
|
|
5
|
+
本次更新修复用户反馈的桌面侧栏布局、后台账本保存和插件卸载问题。
|
|
6
|
+
|
|
7
|
+
### 修复内容
|
|
8
|
+
|
|
9
|
+
- **账本保存失败:**v1.9.28 的后台线程没有继承 DSH 的模块解析环境,部分安装方式会反复报告找不到 `@deepseek-ai/dsh-home-paths`。现将线程及其依赖独立打包,可在没有宿主模块解析器的环境中运行。
|
|
10
|
+
- **卸载与重载卡住:**卸载时异步等待正在进行的写入,让宿主事件循环继续处理完成和失败消息。线程超时后终止并释放它持有的锁,再完成最终保存;提交回执仍防止重复记账。
|
|
11
|
+
- **桌面端底部空白:**费用区按内容占据高度,避免皮肤拉伸底部容器,使卡片与用户操作区保持紧邻。
|
|
12
|
+
- **OpenDesign 余额位置:**余额放在标题行右侧,下方保留 5h 和周额度,悬停提示保留完整含义。
|
|
13
|
+
- **紧凑同行布局:**今日金额与余额首行对齐,第二行 Token 数完整显示,不再被固定行高截断。
|
|
14
|
+
|
|
15
|
+
### 验证
|
|
16
|
+
|
|
17
|
+
- 后台线程在独立目录中运行;覆盖缺少宿主依赖、线程超时、持锁终止、卸载响应和用量只保存一次。
|
|
18
|
+
- 浏览器检查覆盖浅色与深色、标准/紧凑/合并/简洁布局、窄侧栏和插件隐藏后的宿主布局恢复。
|
|
19
|
+
- 使用真实 DSH 0.2.1-rc.2 宿主及模拟账号响应,验证已有的 pi-ai Codex 订阅读取、旧 RPC 清单兼容,以及多次加载、重载和取消。未查询真实供应商账号。
|
|
20
|
+
|
|
21
|
+
### 升级
|
|
22
|
+
|
|
23
|
+
在插件市场更新到 **1.9.29**,或按正在使用的环境执行:
|
|
24
|
+
|
|
25
|
+
```powershell
|
|
26
|
+
dsh plugin --profile desktop add dsh-cost-meter@1.9.29
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
网页端将 `desktop` 换成 `web`。升级后完全退出并重启对应的 DSH Desktop 或 Web 进程,确保新后台线程和宿主服务一并加载。
|
|
30
|
+
|
|
31
|
+
问题由用户通过截图和运行日志反馈,感谢提供桌面端表现、报错及重载现象。
|
|
32
|
+
|
|
33
|
+
## English
|
|
34
|
+
|
|
35
|
+
This patch fixes Desktop sidebar spacing, background ledger saves and plugin disposal.
|
|
36
|
+
|
|
37
|
+
- Bundle the ledger worker and its dependencies so it can run without the DSH module resolver. This fixes repeated missing `@deepseek-ai/dsh-home-paths` errors introduced by the v1.9.28 background writer in affected installations.
|
|
38
|
+
- Await active writes without blocking the host event loop. Terminate stalled workers, release only their own locks, and preserve pending usage through the final save. Atomic commit receipts continue to prevent duplicate billing.
|
|
39
|
+
- Keep footer cards next to user controls when a Desktop skin stretches the footer containers.
|
|
40
|
+
- Place the OpenDesign wallet balance beside the title, with the 5h and weekly quota rows below.
|
|
41
|
+
- Keep Today and Balance aligned while allowing both the amount and token count to remain fully visible.
|
|
42
|
+
|
|
43
|
+
Checks cover isolated workers, import failures, stalled workers holding locks, concurrent ledger writes, sidebar layouts and theme variants. Existing native pi-ai Codex quota and reload behavior was also verified with the real DSH 0.2.1-rc.2 runtime and simulated account responses; no live supplier account was queried.
|
|
44
|
+
|
|
45
|
+
Update to **1.9.29** through the plugin marketplace or use the command above. Use `web` instead of `desktop` for the Web profile. Fully exit and restart the relevant DSH process after upgrading.
|