dsh-cost-meter 1.9.37 → 1.9.38

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.37-4176E6)](https://github.com/Han-1413141/dsh-cost-meter)
9
+ [![version](https://img.shields.io/badge/version-1.9.38-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.37** adds single-conversation and overall billing exports (CSV / JSON), and orders quota windows consistently. Volcano Coding Plan now shows only its supported 5h, weekly and monthly windows.
19
+ **v1.9.38** adds dsh-xdpool WorkBuddy credits: CN/global accounts, source selection and current/all/selected balances, with matching WorkBuddy billing classification.
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.37](docs/update-notes-1.9.37.md#english). Fully restart DSH after updating.
23
+ Release notes: [v1.9.38](docs/update-notes-1.9.38.md#english). Fully restart DSH after updating.
24
24
 
25
25
  ![Promo art](docs/promo.en.png)
26
26
 
@@ -132,6 +132,8 @@ The `extract` rules accept four forms: a numeric constant, a dot path string, `a
132
132
 
133
133
  ### WorkBuddy credits example (local plugin route)
134
134
 
135
+ The dedicated **WorkBuddy credits** quota card now supports dsh-xdpool. Select **Credit source → dsh-xdpool** when using multiple connectors; current, all and selected accounts work across CN/global pools. See the [integration notes](docs/update-notes-1.9.38.md#english).
136
+
135
137
  With `dsh-workbuddy-connect` installed, its web status route already returns the aggregated credit total — no credential needs to be copied:
136
138
 
137
139
  ```json
@@ -352,22 +354,22 @@ On Node.js 20, use `npm install -g pnpm@10` instead. See [pnpm installation and
352
354
  dsh plugin --profile web add dsh-cost-meter
353
355
  ```
354
356
 
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.37`** — review the script before running):
357
+ **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.38`** — review the script before running):
356
358
 
357
359
  ```powershell
358
- irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.37/install.ps1 | iex
360
+ irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.38/install.ps1 | iex
359
361
  ```
360
362
 
361
363
  **Or a plain command line** (the machine must already have pnpm and git; also pinned to the tag):
362
364
 
363
365
  ```sh
364
- dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.37
366
+ dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.38
365
367
  ```
366
368
 
367
369
  Without git, use the GitHub tag archive:
368
370
 
369
371
  ```sh
370
- dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.37.tar.gz
372
+ dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.38.tar.gz
371
373
  ```
372
374
 
373
375
  After installing, **restart** `dsh web` (plugin rows, the Typert manifest and the client bundle are all scanned at startup):
@@ -432,7 +434,7 @@ Workarounds:
432
434
 
433
435
  ```yaml
434
436
  minimumReleaseAgeExclude:
435
- - dsh-cost-meter@1.9.37
437
+ - dsh-cost-meter@1.9.38
436
438
  ```
437
439
 
438
440
  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.37-4176E6)](https://github.com/Han-1413141/dsh-cost-meter)
9
+ [![version](https://img.shields.io/badge/version-1.9.38-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.37** 新增单个对话和总体费用导出(CSV / JSON),统一额度窗口顺序;火山 Coding Plan 只显示实际支持的 5h、周、月。
19
+ **v1.9.38** 支持 dsh-xdpool 的国内/国际 WorkBuddy 积分、多账号筛选与来源选择,并同步适配对应路由的 API / Plan 归属。
20
20
 
21
21
  **宿主要求:DSH 0.2.0 起支持** · 适配目标 **0.2.1-rc.2**(npm `next`)。完整声明、历史记录与安装排障见下方展开项。
22
22
 
23
- 更新说明:[v1.9.37](docs/update-notes-1.9.37.md#中文)。更新后完全重启 DSH。
23
+ 更新说明:[v1.9.38](docs/update-notes-1.9.38.md#中文)。更新后完全重启 DSH。
24
24
 
25
25
  ![宣传图](docs/promo.png)
26
26
 
@@ -131,6 +131,8 @@ CLIProxyAPI 网关来源卡片可勾选「只显示 Gemini 额度」,仅影响
131
131
 
132
132
  ### WorkBuddy 积分示例(本机插件路由)
133
133
 
134
+ “费用 → 额度”的 **WorkBuddy 积分** 卡现已支持 dsh-xdpool。多个连接插件同时使用时,可将“积分来源”选为 dsh-xdpool;支持国内/国际池的当前、全部或勾选账号。详见[适配说明](docs/update-notes-1.9.38.md#中文)。
135
+
134
136
  已安装 `dsh-workbuddy-connect` 时,其 Web 状态路由直接返回聚合积分,无需复制任何凭据:
135
137
 
136
138
  ```json
@@ -352,22 +354,22 @@ Node.js 20 请改用 `npm install -g pnpm@10`。版本要求见 [pnpm 官方安
352
354
  dsh plugin --profile web add dsh-cost-meter
353
355
  ```
354
356
 
355
- **PowerShell 一键脚本**(复制整行粘贴回车;自动补齐 pnpm、自动探测 git,无需克隆仓库;安装链**固定到发布 tag `v1.9.37`**,建议先下载审阅再运行):
357
+ **PowerShell 一键脚本**(复制整行粘贴回车;自动补齐 pnpm、自动探测 git,无需克隆仓库;安装链**固定到发布 tag `v1.9.38`**,建议先下载审阅再运行):
356
358
 
357
359
  ```powershell
358
- irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.37/install.ps1 | iex
360
+ irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.38/install.ps1 | iex
359
361
  ```
360
362
 
361
363
  **或直接命令行**(机器上需已有 pnpm 与 git;同样固定到 tag):
362
364
 
363
365
  ```sh
364
- dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.37
366
+ dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.38
365
367
  ```
366
368
 
367
369
  没有 git 时可用 GitHub tag 打包直链:
368
370
 
369
371
  ```sh
370
- dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.37.tar.gz
372
+ dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.38.tar.gz
371
373
  ```
372
374
 
373
375
  安装后**重启** `dsh web`(插件行、Typert 清单与客户端 bundle 均在启动时扫描):
@@ -432,7 +434,7 @@ DSH **0.2.1-rc.1 / 0.2.1-rc.2** 宿主自带 pnpm **11.28.5**,默认启用内
432
434
 
433
435
  ```yaml
434
436
  minimumReleaseAgeExclude:
435
- - dsh-cost-meter@1.9.37
437
+ - dsh-cost-meter@1.9.38
436
438
  ```
437
439
 
438
440
  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,31 @@
1
+ # v1.9.38:dsh-xdpool 的 WorkBuddy 积分适配
2
+
3
+ ## 中文
4
+
5
+ 在“费用 → 额度”开启并展开“WorkBuddy 积分”,即可读取同一 DSH 中的 dsh-xdpool 账号积分,无需复制登录凭据。已验证 dsh-xdpool 2.4.6 的发布包接口。
6
+
7
+ “积分来源”支持自动识别、WorkBuddy 连接插件和 dsh-xdpool。自动识别优先读取 dsh-connect-workbuddy 的账号列表,其次读取 XD Pool;旧连接插件的状态接口与明文登录文件兼容方式继续保留。多个插件同时使用时,选择 dsh-xdpool 并刷新即可指定来源。
8
+
9
+ “统计账号”继续支持当前账号、全部账号和勾选账号。XD Pool 的当前账号按其状态接口返回的 activeAccountId 确定,国内和国际分别读取。账号 ID 区分地区和插件来源,已有的连接插件账号筛选不会误选同 ID 的池账号。
10
+
11
+ 积分读取失败、冷却期间未返回积分或已移除的勾选账号显示未知值,完整汇总显示“—”;已读取的积分可在账号列表查看。观测减少量沿用现有统计规则:充值或赠送不算减少,过期可能算减少,积分不折算为货币账单。
12
+
13
+ xdpool 和 xdpool-global 两条 WorkBuddy 路由按现有 WorkBuddy 的 API / Plan 设置归类,并尊重手动覆盖。升级时仅修正账本的 API / Plan 归属,保留总金额、Token、调用和历史汇率;其他聚合、扫码及组合路由不据此归入 WorkBuddy。
14
+
15
+ 兼容验证执行了发布包中的实际状态路由与序列化函数,并检查国内/国际账号、来源选择、失败及冷却状态、双端 codec、保存后重开和窄屏设置界面。积分查询使用同一宿主的 GET 状态接口,不执行切号、签到、自动化或模型测试。
16
+
17
+ 需求建议来自 [@qiyeren 的 issue #404](https://github.com/Han-1413141/dsh-cost-meter/issues/404);接口来源为 [@XDTrees 维护的 dsh-xdpool](https://github.com/XDTrees/dsh-xdpool)。
18
+
19
+ ## English
20
+
21
+ Enable **WorkBuddy credits** under cost settings → quotas to read dsh-xdpool accounts from the same DSH host. No credential copying is required. Compatibility was checked against the published dsh-xdpool 2.4.6 status route and serializers.
22
+
23
+ **Credit source** supports Automatic, WorkBuddy connectors and dsh-xdpool. Automatic uses dsh-connect-workbuddy account lists first, then XD Pool. Select dsh-xdpool and refresh when multiple connectors are installed. Existing legacy connector/file compatibility remains available.
24
+
25
+ Current, all and selected accounts are supported. Current uses the pool's activeAccountId per region. Account IDs include region and source so selections and observed credit decreases do not mix different plugins. Missing, failed or unavailable cooling balances remain unknown, and incomplete totals display a dash.
26
+
27
+ Only xdpool and xdpool-global belong to WorkBuddy billing. Existing API / Plan settings and explicit overrides apply. Historical classification repairs preserve recorded totals, tokens, calls and FX. Other aggregate, OAuth and combo routes are not treated as WorkBuddy credits.
28
+
29
+ Tests cover the published status implementation, source selection, partial data, codecs, persistence and narrow layouts. Integration only reads local GET status endpoints; it does not switch accounts, claim rewards, run automation or probe models.
30
+
31
+ Requested by [@qiyeren in issue #404](https://github.com/Han-1413141/dsh-cost-meter/issues/404), using the public interface maintained by [@XDTrees](https://github.com/XDTrees/dsh-xdpool).