dsh-cost-meter 1.9.34 → 1.9.36

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.34-4176E6)](https://github.com/Han-1413141/dsh-cost-meter)
9
+ [![version](https://img.shields.io/badge/version-1.9.36-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.34** fixes billion-context idle scanning stalls and adds storage statistics, preview/confirm cleanup, 7/30-day retention and a CLI. Completed streams are compressed while billing history is retained. [Storage guide](docs/billing-storage.md).
19
+ **v1.9.36** fixes billion-context idle scanning stalls and adds storage statistics, preview/confirm cleanup, 7/30-day retention and a CLI. Completed streams are compressed while billing history is retained. [Storage guide](docs/billing-storage.md).
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.34](docs/update-notes-1.9.34.md#english). Fully restart DSH after updating.
23
+ Release notes: [v1.9.36](docs/update-notes-1.9.36.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.34`** — 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.36`** — review the script before running):
356
356
 
357
357
  ```powershell
358
- irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.34/install.ps1 | iex
358
+ irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.36/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.34
364
+ dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.36
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.34.tar.gz
370
+ dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.36.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.34
435
+ - dsh-cost-meter@1.9.36
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.34-4176E6)](https://github.com/Han-1413141/dsh-cost-meter)
9
+ [![version](https://img.shields.io/badge/version-1.9.36-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.34** 修复 billion-context 空闲扫描卡顿,新增计费历史存储统计、清理预览与确认、7/30 天保留和 CLI;压缩旧流并保留费用明细。[存储管理说明](docs/billing-storage.md)。
19
+ **v1.9.36** 修复 billion-context 空闲扫描卡顿,新增计费历史存储统计、清理预览与确认、7/30 天保留和 CLI;压缩旧流并保留费用明细。[存储管理说明](docs/billing-storage.md)。
20
20
 
21
21
  **宿主要求:DSH 0.2.0 起支持** · 适配目标 **0.2.1-rc.2**(npm `next`)。完整声明、历史记录与安装排障见下方展开项。
22
22
 
23
- 更新说明:[v1.9.34](docs/update-notes-1.9.34.md#中文)。更新后完全重启 DSH。
23
+ 更新说明:[v1.9.36](docs/update-notes-1.9.36.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.34`**,建议先下载审阅再运行):
355
+ **PowerShell 一键脚本**(复制整行粘贴回车;自动补齐 pnpm、自动探测 git,无需克隆仓库;安装链**固定到发布 tag `v1.9.36`**,建议先下载审阅再运行):
356
356
 
357
357
  ```powershell
358
- irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.34/install.ps1 | iex
358
+ irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.36/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.34
364
+ dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.36
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.34.tar.gz
370
+ dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.36.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.34
435
+ - dsh-cost-meter@1.9.36
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 上实测可用。
@@ -42,4 +42,4 @@ This patch adds the complete cost settings to plugin details, sharing the compon
42
42
  - Use the CNY conversion rate for CNY-priced external calls and legacy pricing repair, regardless of the display currency.
43
43
  - Update frozen CNY/EUR amounts alongside repaired USD costs, retaining recorded FX rates and unrelated amounts. Reconcile complete model currency totals even when USD totals already match; missing legacy currency fields do not imply zero.
44
44
 
45
- No new full-ledger repricing task is introduced. Tests cover currencies, idempotence, partial legacy rows, concurrent/failed saves, slot lifecycle and responsive read-only rendering with synthetic data. Update to **1.9.31** and restart DSH.
45
+ No new full-ledger repricing task is introduced. Tests cover currencies, idempotence, partial legacy rows, concurrent/failed saves, slot lifecycle and responsive read-only rendering with synthetic data. Update to **1.9.31** and restart DSH.
@@ -0,0 +1,17 @@
1
+ # v1.9.35:火山方舟计费与余额提示
2
+
3
+ 火山方舟的 `deepseek-v4-1-flash-260910`、`deepseek-v4-1-flash-261017` 等日期快照现在可以自动匹配主模型价格。精确模型报价优先;精确匹配模式和不同日期快照之间的隔离保持原样。
4
+
5
+ `volcengine`、`ark` 及其 `llm-` 包装渠道在使用 DeepSeek 峰谷价格时,按火山的工作日日历选档:北京时间周一至周五 09:00–12:00、14:00–18:00 为峰时,其余为谷时,不额外豁免中国法定节假日。DeepSeek 官方渠道继续使用自己的节假日规则。当前标准版价格沿用已有 DeepSeek 价格表;本版没有新增经济版、缓存存储时长计费或火山账户余额查询。
6
+
7
+ 侧栏峰谷进度优先跟随当前会话的渠道;无法取得会话投影时,通过宿主公开的 `agentDefaultModel.currentSelection()` 读取默认渠道。旧宿主没有该服务时保留原有显示。切换提醒与进度条共用同一日历。
8
+
9
+ 余额卡现在直接显示“DeepSeek 余额”,表示 DeepSeek 官方开放平台账户余额。它不代表火山方舟或其他渠道的余额。已有的官方端点白名单保持原样,对账和余额进度中的今日消费仍只累计官方渠道。
10
+
11
+ 余额悬停提示改成短行,保留总额、赠送与充值、异常提醒和点击刷新。搜索提示例如“今日 2 次搜索未完整计入统计”,不再展示网络实现等技术说明。具体缺失原因和运行环境仍保存在本地搜索覆盖诊断文件中。
12
+
13
+ 旧价格版本继续保留记录时的匹配和日历规则。更新不会自动改写历史金额;需要补算之前未匹配的快照或修正节假日金额时,在价格设置中手动重算对应模型。
14
+
15
+ 来源与致谢:[@littleyellowbicycle](https://github.com/littleyellowbicycle) 在 [#399](https://github.com/Han-1413141/dsh-cost-meter/issues/399) 提供快照模型名的复现、定位及补丁建议,在 [#400](https://github.com/Han-1413141/dsh-cost-meter/issues/400) 提供火山日历差异和金额对照,在 [#401](https://github.com/Han-1413141/dsh-cost-meter/issues/401) 提出余额来源标识和多渠道对账建议。
16
+
17
+ 官方依据(核对日期:2026-10-24):[火山模型价格](https://console.volcengine.com/ark/region:cn-beijing/docs/model-pricing)、[DeepSeek-V4.1-Flash 模型与日期版本](https://console.volcengine.com/ark/region:cn-beijing/docs/deepseek-v4-1-flash)。
@@ -0,0 +1,11 @@
1
+ # v1.9.36:余额名称选项与输入区额度位置
2
+
3
+ 余额卡默认显示“余额”。在“费用 → 显示 → 侧栏”中选择“官方余额”,开启“显示余额来源(DeepSeek)”,名称会显示为“DeepSeek 余额”。关闭后恢复简短名称;悬停提示始终说明余额来自 DeepSeek 官方账户。
4
+
5
+ 在“费用 → 额度”展开任意 Coding Plan 或 OpenCode Go,“显示位置”现在包含“输入框上方”,对应输入框上方的横向额度条。还可以选择侧栏与输入框上方、设置页与输入框上方,或全部位置。显示预览中的同名选项同步生效。
6
+
7
+ 每家厂商单独选择位置,移动一家不会改变其他厂商。位置选择不会启用原先关闭的订阅查询,也不会修改凭据。只选择输入框上方时,额度仍会自动更新,保留刷新操作。
8
+
9
+ 已有的输入区横条设置保持原来的效果。手动选择单家位置后,单家选择优先于横条默认设置;例如为 Z.ai 选择“主页面侧边栏”,即使默认横条开启,Z.ai 也只显示在侧栏。预算和 Codex 的独立开关保持原有规则。
10
+
11
+ 配置经过补丁校验、磁盘清洗和两端 codec,保存后重新打开仍能恢复选择。验证包括真实 DSH 宿主中的仅输入框显示与刷新、各位置组合的浏览器切换、中英文选项,以及余额来源开关和侧栏预览。
@@ -32,14 +32,16 @@ function indexOf(history) {
32
32
  }
33
33
 
34
34
  /**
35
- * @param stored - Normalizing a saved version: keep its Ollama Cloud calendar policy. Versions
36
- * saved before v1.9.13 have none and keep DeepSeek's windows; live settings use Ollama's.
35
+ * @param stored - Preserve each saved version's channel calendar and snapshot-matching policy.
36
+ * Missing flags keep the behavior of the version that recorded the call; live settings use
37
+ * current policies. Upgrades do not silently reprice already recorded history.
37
38
  */
38
39
  export function pricingSnapshot(config, stored = false) {
39
40
  // Credentials, prompts and other settings never enter a price version.
40
41
  const snapshot = structuredClone(Object.fromEntries(fields.filter(key => key !== 'prices' && config?.[key] !== undefined).map(key => [key, config[key]])))
41
42
  const prices = config?.prices ?? {}
42
43
  snapshot.prices = { ...(prices.currency ? { currency: prices.currency } : {}), ollamaPeak: !stored || prices.ollamaPeak === true, ollamaTaggedPeak: !stored || prices.ollamaTaggedPeak === true, snapshotTags: !stored || prices.snapshotTags === true,
44
+ shortSnapshotTags: !stored || prices.shortSnapshotTags === true, volcenginePeak: !stored || prices.volcenginePeak === true,
43
45
  default: ratesOnly(prices.default), models: modelsOnly(prices.models),
44
46
  ...(prices.custom ? { custom: modelsOnly(prices.custom) } : {}),
45
47
  providers: Object.fromEntries(Object.entries(prices.providers ?? {}).filter(([key]) => safe(key)).map(([key, table]) => [key, {
@@ -70,7 +72,7 @@ export function normalizePricingHistory(raw, config, previous, stored = false) {
70
72
  if (!Object.values(changes).some(row => row.at === 0)) {
71
73
  // Preserve surviving activation boundaries when the initial row is missing.
72
74
  const saved = Object.values(versions), prices = { ...config?.prices }
73
- for (const policy of ['ollamaPeak', 'ollamaTaggedPeak', 'snapshotTags']) {
75
+ for (const policy of ['ollamaPeak', 'ollamaTaggedPeak', 'snapshotTags', 'shortSnapshotTags', 'volcenginePeak']) {
74
76
  if (saved.length) prices[policy] = saved.every(version => version.prices?.[policy] === true)
75
77
  }
76
78
  const seed = createPricingHistory({ ...config, prices }, stored)