dsh-cost-meter 1.9.50 → 1.9.52

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.50-4176E6)](https://github.com/Han-1413141/dsh-cost-meter)
9
+ [![version](https://img.shields.io/badge/version-1.9.52-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.50** fixes billion-context input-only context estimates being billed as model calls, and automatically corrects affected receipted history with a backup.
19
+ **v1.9.52** adapts to DSH 0.2.2-alpha.3, fixes missing native-search usage for isolated Web services on the updated Cordis runtime, and extends the host peer ranges.
20
20
 
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.
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.50](docs/update-notes-1.9.50.md#english). Fully restart DSH after updating.
23
+ Release notes: [v1.9.52](docs/update-notes-1.9.52.md#english). Fully restart DSH after updating.
24
24
 
25
25
  ![Promo art](docs/promo.en.png)
26
26
 
@@ -34,7 +34,7 @@ Per-conversation cost · daily totals · OpenCode Go subscription quota display
34
34
  <details>
35
35
  <summary>Compatibility, configuration and troubleshooting</summary>
36
36
 
37
- **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).
37
+ **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 **0.2.2-alpha.3**. Exact ranges and how the host reads them: [compatibility declaration](docs/dsh-0.2.2-compatibility.md#english).
38
38
 
39
39
  Supports [official Search/Fetch request fees](docs/web-request-fees.md#english), separately from model tokens.
40
40
 
@@ -356,22 +356,22 @@ On Node.js 20, use `npm install -g pnpm@10` instead. See [pnpm installation and
356
356
  dsh plugin --profile web add dsh-cost-meter
357
357
  ```
358
358
 
359
- **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.50`** — review the script before running):
359
+ **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.52`** — review the script before running):
360
360
 
361
361
  ```powershell
362
- irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.50/install.ps1 | iex
362
+ irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.52/install.ps1 | iex
363
363
  ```
364
364
 
365
365
  **Or a plain command line** (the machine must already have pnpm and git; also pinned to the tag):
366
366
 
367
367
  ```sh
368
- dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.50
368
+ dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.52
369
369
  ```
370
370
 
371
371
  Without git, use the GitHub tag archive:
372
372
 
373
373
  ```sh
374
- dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.50.tar.gz
374
+ dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.52.tar.gz
375
375
  ```
376
376
 
377
377
  After installing, **restart** `dsh web` (plugin rows, the Typert manifest and the client bundle are all scanned at startup):
@@ -436,7 +436,7 @@ Workarounds:
436
436
 
437
437
  ```yaml
438
438
  minimumReleaseAgeExclude:
439
- - dsh-cost-meter@1.9.50
439
+ - dsh-cost-meter@1.9.52
440
440
  ```
441
441
 
442
442
  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.50-4176E6)](https://github.com/Han-1413141/dsh-cost-meter)
9
+ [![version](https://img.shields.io/badge/version-1.9.52-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.50** 修复 billion-context 将上下文输入估计值作为模型调用计费的问题,并在启动时备份、纠正有入账凭据的历史误计记录。
19
+ **v1.9.52** 适配 DSH 0.2.2-alpha.3,修复新 Cordis 下隔离 Web 服务的原生搜索漏计,并补齐宿主依赖范围。
20
20
 
21
- **宿主要求:DSH 0.2.0 起支持** · 适配目标 **0.2.1-rc.2**(npm `next`)。完整声明、历史记录与安装排障见下方展开项。
21
+ **宿主要求:DSH 0.2.0 起支持** · 适配目标 **0.2.2-alpha.3**。完整声明、历史记录与安装排障见下方展开项。
22
22
 
23
- 更新说明:[v1.9.50](docs/update-notes-1.9.50.md#中文)。更新后完全重启 DSH。
23
+ 更新说明:[v1.9.52](docs/update-notes-1.9.52.md#中文)。更新后完全重启 DSH。
24
24
 
25
25
  ![宣传图](docs/promo.png)
26
26
 
@@ -34,7 +34,7 @@
34
34
  <details>
35
35
  <summary>兼容、配置与排障说明</summary>
36
36
 
37
- **最低支持宿主:DSH 0.2.0。** 插件把下限声明在 `engines.dsh`(宿主准入插件的闸门),不再支持任何 DSH 0.1.x 版本;本轮适配目标为 npm `next` 标签的 **0.2.1-rc.2**。具体范围与宿主的读取方式见[兼容声明](docs/dsh-0.2.1-compatibility.md#中文)。
37
+ **最低支持宿主:DSH 0.2.0。** 插件把下限声明在 `engines.dsh`(宿主准入插件的闸门),不再支持任何 DSH 0.1.x 版本;本轮适配目标为 **0.2.2-alpha.3**。具体范围与宿主的读取方式见[兼容声明](docs/dsh-0.2.2-compatibility.md#中文)。
38
38
 
39
39
  新增 [DeepSeek Search/Fetch API 次数费](docs/web-request-fees.md#中文),只计有结果的成功请求,并将网页抓取独立分类。
40
40
 
@@ -356,22 +356,22 @@ Node.js 20 请改用 `npm install -g pnpm@10`。版本要求见 [pnpm 官方安
356
356
  dsh plugin --profile web add dsh-cost-meter
357
357
  ```
358
358
 
359
- **PowerShell 一键脚本**(复制整行粘贴回车;自动补齐 pnpm、自动探测 git,无需克隆仓库;安装链**固定到发布 tag `v1.9.50`**,建议先下载审阅再运行):
359
+ **PowerShell 一键脚本**(复制整行粘贴回车;自动补齐 pnpm、自动探测 git,无需克隆仓库;安装链**固定到发布 tag `v1.9.52`**,建议先下载审阅再运行):
360
360
 
361
361
  ```powershell
362
- irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.50/install.ps1 | iex
362
+ irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.52/install.ps1 | iex
363
363
  ```
364
364
 
365
365
  **或直接命令行**(机器上需已有 pnpm 与 git;同样固定到 tag):
366
366
 
367
367
  ```sh
368
- dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.50
368
+ dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.52
369
369
  ```
370
370
 
371
371
  没有 git 时可用 GitHub tag 打包直链:
372
372
 
373
373
  ```sh
374
- dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.50.tar.gz
374
+ dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.52.tar.gz
375
375
  ```
376
376
 
377
377
  安装后**重启** `dsh web`(插件行、Typert 清单与客户端 bundle 均在启动时扫描):
@@ -436,7 +436,7 @@ DSH **0.2.1-rc.1 / 0.2.1-rc.2** 宿主自带 pnpm **11.28.5**,默认启用内
436
436
 
437
437
  ```yaml
438
438
  minimumReleaseAgeExclude:
439
- - dsh-cost-meter@1.9.50
439
+ - dsh-cost-meter@1.9.52
440
440
  ```
441
441
 
442
442
  3. 仅本次操作用 CLI 透传 pnpm 参数:`dsh plugin --profile desktop remove dsh-cost-meter --config.minimum-release-age=0`;若只是 lockfile 校验阶段失败,可改用 `--trust-lockfile`。这两个参数已在本机 pnpm 11.28.5 临时 Profile 上实测可用。
@@ -1,5 +1,7 @@
1
1
  # DSH 兼容性:最低 0.2.0(目标 0.2.1-rc.2)
2
2
 
3
+ > 本文保留 0.2.1 历史验证。当前目标、依赖范围和 Cordis 调整见 [DSH 0.2.2-alpha.3 兼容说明](dsh-0.2.2-compatibility.md)。
4
+
3
5
  ## 中文
4
6
 
5
7
  本轮把插件的最低兼容要求从 DSH `0.1.x` 提升到 **0.2.0**,适配目标为 npm `next` 标签的 **0.2.1-rc.2**(上一轮目标 `0.2.1-rc.1` 同样在真实宿主上验证过)。日常计费、价格、历史金额与界面布局不变。
@@ -0,0 +1,31 @@
1
+ # DSH 0.2.2-alpha.3 兼容性
2
+
3
+ ## 中文
4
+
5
+ 适配目标为官方 [dsh-v0.2.2-alpha.3](https://github.com/deepseek-ai/deepseek-harness/releases/tag/dsh-v0.2.2-alpha.3),插件版本为 1.9.52。实际安装的 npm 依赖是 `@deepseek-ai/cordis@4.0.6-alpha.2`、`cordis-plugin-loader@1.0.7-alpha.2` 和 `cordis-plugin-include@1.0.11-alpha.2`;这些是 DeepSeek 发布的包版本,与发布说明中列出的上游 Cordis 基线版本不同。
6
+
7
+ ### 需要调整的部分
8
+
9
+ - **原生搜索计费**:新 Cordis 把服务提供记录从 `fiber.store` 分离到 `fiber.provisions`。旧实现无法发现比费用插件更早加载的隔离 Web 服务,搜索请求因此漏计。现在读取新提供记录,并把清理操作绑定到服务提供者;旧宿主继续使用原接口。已覆盖先后加载、隔离会话、依赖插件卸载、服务重载和费用插件卸载。
10
+ - **宿主依赖范围**:两个 DSH peer 增加 `>=0.2.2-0 <0.3.0-0` 分支。宿主的 `includePrerelease` 判定原本已接受 alpha.3,但 npm 默认语义会拒绝旧范围中的 0.2.2 预发布版。修复后可复用当前宿主模块。
11
+ - **持续兼容检查**:next-host 固定到 alpha.3,客户端加载器矩阵加入 alpha.3;隔离计费测试明确加载目标宿主的 Cordis。Web 工具测试使用新版原生执行器、工具可用性选择和批量调用,保留旧宿主的单调用路径。
12
+
13
+ `engines.dsh`、商城范围和最低版本继续为 `>=0.2.0-rc.1 <0.3.0-0`。没有改动定价、峰谷规则、凭据保存格式或已有历史金额。
14
+
15
+ ### 已验证
16
+
17
+ - Windows / Node.js 24:真实 alpha.3 准入、打包安装、Web 启动、两个宿主 peer 文件复用、三次合成调用和 SCNet 快照读取。
18
+ - 新 Cordis 的冷启动、热加载、延迟 RPC 注册、卸载重载、凭据保存/清除/刷新,以及主会话、隔离子会话和后台调用计费。
19
+ - 真实原生搜索与 Web Fetch 工具:本地 HTTP 响应、成功请求计费、空响应/失败不计费、历史记录和卸载清理;原生搜索同时在 0.2.1-rc.2 下通过。
20
+ - alpha.3 的客户端模块加载器:HTTPS 与 `dsh-app://`,主入口和 13 个分块,原生及 dsh-loader 1.3.5 前后加载组合。
21
+ - 完整 `test/verify.mjs` 回归,以及真实 Session、TokenMeter 和投影注册器的上下文计费检查。
22
+
23
+ 以上使用隔离 Profile 和合成用量,没有调用付费模型;未安装或验证完整 Windows/macOS Desktop 外壳。更新费用插件后完全重启 DSH 即可,不需要迁移账本或重新配置。
24
+
25
+ ## English
26
+
27
+ Version 1.9.52 targets the official DSH 0.2.2-alpha.3 release. Its published dependency versions are Cordis 4.0.6-alpha.2, Loader 1.0.7-alpha.2 and Include 1.0.11-alpha.2.
28
+
29
+ The new Cordis service-provision records required a billing fix: isolated Web services mounted before the cost plugin were missed by the old `fiber.store` scan. The plugin now observes `fiber.provisions`, with cleanup owned by the provider, and retains the old-host path. Both host peer ranges explicitly accept 0.2.2 prereleases under npm's default semver rules.
30
+
31
+ The pinned host and client-loader CI coverage now include alpha.3. Local validation covers packed installation, Web startup, shared host modules, billing, RPC, credentials, lifecycle cleanup, real tool execution with local HTTP responses and the full regression suite. The minimum supported host and pricing rules stay unchanged. Full Electron Desktop shells and paid requests were not exercised. Update the plugin and fully restart DSH; no ledger migration is required.
@@ -0,0 +1,28 @@
1
+ # v1.9.51 — 峰谷显示自动跟随系统时区
2
+
3
+ ## 中文
4
+
5
+ 峰谷开始时间、切换时间和设置内的时段说明默认按当前设备的系统时区显示。使用远程 DSH 时,自动模式读取打开界面的设备/浏览器时区。
6
+
7
+ 在以下任一入口调整:
8
+
9
+ - **费用设置 → 峰谷设置 → 峰谷显示时区**。
10
+ - **费用设置 → 显示 → 峰谷时段 → 峰谷显示时区**。
11
+
12
+ 默认选项为“跟随系统”,旁边显示识别到的 IANA 时区名称。也可以手动选择 `Asia/Shanghai`、`America/New_York` 等时区,修改后立即预览并自动保存;选择“跟随系统”可恢复自动识别。
13
+
14
+ 显示会自动处理夏令时、跨日期和非整小时偏移;一个时段跨越夏令时切换点时,两端时间额外标注 UTC 偏移。峰谷计费、厂商日历、倒计时以及历史账本日期仍按原规则计算,调整显示时区不触发历史费用重算。
15
+
16
+ 感谢 [@jt-at-home](https://github.com/jt-at-home) 在 [#460](https://github.com/Han-1413141/dsh-cost-meter/issues/460) 报告峰谷时间固定为北京时间的问题,并提出本地时区显示和配置选择需求。
17
+
18
+ 验证覆盖配置校验、客户端与宿主保存恢复、美国夏令时开始/结束、跨日、印度与尼泊尔偏移、计价历史隔离,以及真实浏览器内的系统识别、设置选择、预览和窄屏布局。
19
+
20
+ ## English
21
+
22
+ Peak-period start/switch times and the schedule summary now default to the current device's system timezone. With a remote DSH host, automatic mode uses the timezone of the browser displaying the interface.
23
+
24
+ Choose **Cost settings → Peak / off-peak settings → Peak display timezone**, or **Display → Peak / off-peak → Peak display timezone**. Keep **System timezone** for automatic detection, or select an IANA zone such as `America/New_York`. Changes preview immediately and save automatically.
25
+
26
+ Dates, daylight saving and fractional UTC offsets are handled automatically. When a period spans a daylight-saving transition, both endpoint labels include their UTC offsets. Provider billing calendars, countdowns and ledger day boundaries retain their existing rules; changing this display setting does not reprice history.
27
+
28
+ Thanks to [@jt-at-home](https://github.com/jt-at-home) for the report and timezone-selection request in [#460](https://github.com/Han-1413141/dsh-cost-meter/issues/460).
@@ -0,0 +1,19 @@
1
+ # v1.9.52 — 适配 DSH 0.2.2-alpha.3
2
+
3
+ ## 中文
4
+
5
+ - 修复新版 Cordis 下,先于费用插件加载的隔离 Web 服务原生搜索漏计;兼容旧宿主,并保留正确的卸载与重载清理。
6
+ - 补齐 0.2.2 预发布版宿主依赖范围,避免 npm 选择不匹配的宿主依赖。
7
+ - 持续检查加入 alpha.3 的真实安装启动、RPC、计费、工具执行和客户端模块加载。
8
+
9
+ 更新插件后完全重启 DSH,无需修改已有设置或迁移账本。完整验证记录见 [0.2.2 兼容说明](dsh-0.2.2-compatibility.md)。
10
+
11
+ 适配依据:[DeepSeek Harness 官方发布说明](https://github.com/deepseek-ai/deepseek-harness/releases/tag/dsh-v0.2.2-alpha.3)。
12
+
13
+ ## English
14
+
15
+ - Fix missing native-search usage when isolated Web services mount before the cost plugin on the updated Cordis runtime; preserve old-host support and lifecycle cleanup.
16
+ - Extend host peer ranges to accept 0.2.2 prereleases under npm semantics.
17
+ - Pin alpha.3 coverage for installation, Web startup, RPC, billing, tool execution and client module loading.
18
+
19
+ Update the plugin and fully restart DSH. Existing settings and ledgers need no migration. See the [compatibility record](dsh-0.2.2-compatibility.md#english).