dsh-cost-meter 1.9.44 → 1.9.46

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.44-4176E6)](https://github.com/Han-1413141/dsh-cost-meter)
9
+ [![version](https://img.shields.io/badge/version-1.9.46-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.44** fixes peak/off-peak markers and updates 32 model-catalog records, including Kimi K3.1 Pro / Highspeed and MiniMax M3.1 Flash, plus current Kimi memberships and MiniMax M Plan.
19
+ **v1.9.46** keeps the peak-period arrow inside its track at switching boundaries and includes OpenDesign web-Cookie quotas, optional click-to-hide balances, lower cache memory, recoverable cost-view loading and Anthropic quota improvements.
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.44](docs/update-notes-1.9.44.md#english). Fully restart DSH after updating.
23
+ Release notes: [v1.9.46](docs/update-notes-1.9.46.md#english). Fully restart DSH after updating.
24
24
 
25
25
  ![Promo art](docs/promo.en.png)
26
26
 
@@ -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.44`** — 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.46`** — review the script before running):
360
360
 
361
361
  ```powershell
362
- irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.44/install.ps1 | iex
362
+ irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.46/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.44
368
+ dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.46
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.44.tar.gz
374
+ dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.46.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.44
439
+ - dsh-cost-meter@1.9.46
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.44-4176E6)](https://github.com/Han-1413141/dsh-cost-meter)
9
+ [![version](https://img.shields.io/badge/version-1.9.46-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.44** 修复峰谷游标,更新 32 条模型目录记录,补入 Kimi K3.1 Pro / 高速版、MiniMax M3.1 Flash,并更新 Kimi 新套餐与 MiniMax M Plan。
19
+ **v1.9.46** 修复峰谷切换时分段箭头越界,并包含 OpenDesign 网页 Cookie 额度查询、可选的余额快速隐藏、缓存内存优化、费用明细加载与 Anthropic 额度改进。
20
20
 
21
21
  **宿主要求:DSH 0.2.0 起支持** · 适配目标 **0.2.1-rc.2**(npm `next`)。完整声明、历史记录与安装排障见下方展开项。
22
22
 
23
- 更新说明:[v1.9.44](docs/update-notes-1.9.44.md#中文)。更新后完全重启 DSH。
23
+ 更新说明:[v1.9.46](docs/update-notes-1.9.46.md#中文)。更新后完全重启 DSH。
24
24
 
25
25
  ![宣传图](docs/promo.png)
26
26
 
@@ -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.44`**,建议先下载审阅再运行):
359
+ **PowerShell 一键脚本**(复制整行粘贴回车;自动补齐 pnpm、自动探测 git,无需克隆仓库;安装链**固定到发布 tag `v1.9.46`**,建议先下载审阅再运行):
360
360
 
361
361
  ```powershell
362
- irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.44/install.ps1 | iex
362
+ irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.46/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.44
368
+ dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.46
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.44.tar.gz
374
+ dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.46.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.44
439
+ - dsh-cost-meter@1.9.46
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 上实测可用。
@@ -53,3 +53,9 @@ Codex 额度的真实数据来自已启用并登录的 `dsh-codex-subscription`
53
53
  “合并卡片”将今日 Token 与费用、余额和峰谷进度放入同一外框。选择时默认开启今日双项显示,之后仍可分别关闭。Codex 组件提供额度查询总开关;显式开启其显示时会启用查询。billion-context 的统计偏差说明放在“费用 → 概览”,使用普通灰色文字,不再自动弹窗或提供弹窗开关。
54
54
 
55
55
  “费用 → 显示 → 侧栏”中的“今日消费与余额同行”是独立开关,可与现有布局组合使用。开启时默认只显示今日费用,Token 可在今日组件中单独开启;两项保留悬停详情,余额进度条照常显示,隐藏官方余额时使用第一条可见的自定义余额。排序在设置预览中调整,关闭开关恢复各组件独立排列。
56
+
57
+ ## 点击名称隐藏余额
58
+
59
+ 1.9.45 起,在“设置 → 费用 → 显示 → 侧栏 → 调整组件 → 余额(或自定义余额)”中可以开启“点击名称快速隐藏余额”。默认关闭。开启后,点击余额名称隐藏或显示金额,点击金额继续刷新。隐藏时不显示进度条及悬停金额;四种侧栏布局、同行显示和收起样式共用隐藏状态。本机浏览器记住隐藏状态;关闭选项即恢复原有点击刷新方式。
60
+
61
+ In Settings → Cost → Display → Sidebar → Balance (or Custom balance), enable **Click name to hide balance**. This is off by default. Click the label to hide/show the amount; click the amount to refresh. Hidden balances also hide progress bars and tooltip amounts across sidebar layouts. The browser remembers hidden state. Disabling this option restores the original click-to-refresh behavior.
@@ -17,30 +17,35 @@ OpenDesign uses shared subscription allowances and can fall back to its wallet;
17
17
 
18
18
  ### Quota queries
19
19
 
20
- **DSH-only use:** you do not need to install the OpenDesign app to use its model API in DSH or track conversation costs. Remote quota reads additionally need the workspace ID and Control Key from your OpenDesign Cloud account. An inference API key cannot supply these credentials. If you only have an inference key, leave this quota card disabled; price matching and conversation costs continue to work.
20
+ The OpenDesign desktop app is not required. Version 1.9.45 accepts either a web **Cookie** or the existing **Control Key**. Inference API keys from the API Keys page cannot read account quota.
21
21
 
22
- 1. Open **Settings → Cost → Quotas**, find **OpenDesign**, and expand its settings.
23
- 2. Enter the exact **workspace ID** from your OpenDesign Cloud workspace.
24
- 3. Configure a **Control Key** in the credential editor, or supply `OPENDESIGN_CONTROL_KEY` / `VELA_CONTROL_KEY` to the DSH host. An inference key from the Cloud API Keys page is a different credential and cannot be used for this query. The existing OpenDesign/Vela login keeps control credentials in its own profile; the plugin does not read or rewrite that profile automatically.
25
- 4. Enable the card and refresh. Select its location to also show it in the sidebar or quota strip.
22
+ 1. Sign in to the [OpenDesign Cloud dashboard](https://open-design.ai/cloud/dashboard).
23
+ 2. Open browser DevTools (**F12 → Network**), reload the dashboard, and select a `coding-plan-usage` or `wallet/balance` request to `amr-api.open-design.ai`. Under **Request Headers**, copy the full **Cookie** value (or the complete `Cookie: ...` line). Do not copy response `Set-Cookie` or run a script in the console.
24
+ 3. Open **DSH Settings → Cost → Quotas → OpenDesign**, edit **Cookie / Control Key**, paste and save. Leave workspace ID blank to read the website's current workspace, or copy the ID between `/workspaces/` and `/billing/` or `/wallet/` in that request URL.
25
+ 4. Enable the card, select its display location and refresh. If the Cookie expires, sign in on the website and copy it again.
26
26
 
27
- The credential editor saves to `OPENDESIGN_CONTROL_KEY` in the DSH credential store. Both it and the `VELA_CONTROL_KEY` alias are reflected in the configured/source indicator. Clearing the editor removes the primary stored key; an alias or host environment value can remain active. Legacy OpenDesign config keys also use the existing startup migration. This repairs the missing editor mapping reported and located by @unifilitence in [#317](https://github.com/Han-1413141/dsh-cost-meter/issues/317).
27
+ Existing Control Keys still use the same editor and require an explicit workspace ID. The editor stores either credential in the existing DSH credential slot `OPENDESIGN_CONTROL_KEY` (named accounts use their own slots). Host environment aliases are checked in order: `OPENDESIGN_CONTROL_KEY`, `VELA_CONTROL_KEY`, `OPENDESIGN_COOKIE`. Clearing a saved credential does not remove environment values. The original editor mapping was reported and located by @unifilitence in [#317](https://github.com/Han-1413141/dsh-cost-meter/issues/317).
28
28
 
29
- The host issues only these authenticated GET requests to the fixed official HTTPS origin:
29
+ Only these fixed official HTTPS GET endpoints are used:
30
30
 
31
31
  ```text
32
- https://amr-api.open-design.ai/api/v1/workspaces/{workspaceId}/billing/preflight # direct Bearer-only window query
33
- https://amr-api.open-design.ai/api/v1/workspaces/{workspaceId}/wallet/balance # wallet, read independently
32
+ https://amr-api.open-design.ai/api/v1/workspaces/current # Cookie, only if workspace ID is blank
33
+ https://amr-api.open-design.ai/api/v1/workspaces/{workspaceId}/billing/coding-plan-usage # Cookie
34
+ https://amr-api.open-design.ai/api/v1/workspaces/{workspaceId}/billing/preflight # Control Key
35
+ https://amr-api.open-design.ai/api/v1/workspaces/{workspaceId}/wallet/balance # same credential as quota, independent read
34
36
  ```
35
37
 
38
+ The Cookie routes, `activeWorkspaceId` field and API origin were checked against the official Cloud dashboard assets on 2026-10-29: `cloud-root-CUrPHDgS.js` and `pricing-refund-policy-Bamt0E9e.js`. Tests use synthetic credentials and responses; no authenticated real-account query was performed.
39
+
36
40
  #### Endpoint permissions and 401 troubleshooting
37
41
 
38
- - `/billing/preflight` and `/wallet/balance` run in parallel with `Authorization: Bearer ...` and `x-vela-workspace-id`. The plugin no longer queries the browser-session-only `coding-plan-usage` route. Preflight nests the quota windows under `codingPlan`; both layers' workspace and member identities are validated before unwrapping.
42
+ - `/billing/preflight` and `/wallet/balance` run in parallel with `Authorization: Bearer ...` and `x-vela-workspace-id`. Cookie mode uses `coding-plan-usage` instead, sending only the Cookie header and the same workspace header. It never sends that Cookie as a Bearer token. Preflight nests the quota windows under `codingPlan`; both layers' workspace and member identities are validated before unwrapping.
39
43
  - The wallet endpoint remains an independent query with its `billingScopeVersion: 2` contract. A valid wallet response is authoritative. When it cannot be read, a validated preflight result may display its `balanceUsd` as a fallback, including when no subscription is active. Failure on one side preserves the other; no missing value becomes a fabricated zero. The failing side and reason appear in the settings card, sidebar/strip tooltip and manual-refresh result. A fallback balance is labelled as coming from `billing/preflight`.
40
44
  - The workspace ID is `items[].workspaceId` from `GET https://amr-api.open-design.ai/api/v1/workspaces`, not `profiles.prod.user.id` from `~/.amr/config.json`.
41
- - For a 401/403, check that the Control Key is current, belongs to the selected workspace and can read that workspace. An inference key or a user ID in the workspace field will not work. If the account rejects preflight too, use the OpenDesign Cloud console to check quota; a readable wallet is still shown separately.
45
+ - In Cookie mode, a 401/403 means you should sign in again, copy the request Cookie and check workspace access.
46
+ - In Control Key mode, check that the Control Key is current, belongs to the selected workspace and can read that workspace. An inference key or a user ID in the workspace field will not work. If the account rejects preflight too, use the OpenDesign Cloud console to check quota; a readable wallet is still shown separately.
42
47
 
43
- Quota and wallet responses must match the requested workspace. The wallet must identify its member; if the quota response provides a member identity, both must match. A preflight response that omits the redundant outer `workspaceId` is accepted only after the requested workspace has scoped the request; a body naming a different workspace is rejected. Credentials are never forwarded through a redirect and no cookie is attached. They use the existing DSH credential store and are excluded from the ledger and client snapshot.
48
+ Quota and wallet responses must match the requested workspace. The wallet must identify its member; if the quota response provides a member identity, both must match. A preflight response that omits the redundant outer `workspaceId` is accepted only after the requested workspace has scoped the request; a body naming a different workspace is rejected. Credentials are never forwarded through a redirect. Control Key requests never attach cookies; Cookie requests never attach Bearer authorization. They use the existing DSH credential store and are excluded from the ledger and client snapshot.
44
49
 
45
50
  Each returned allowance window has its own used percentage and reset time. The API's `durationSeconds` identifies the window: `18000` (5 hours) maps to `fiveHour`, and `604800` (7 days) maps to `weekly`, regardless of response order or time remaining until reset. Simultaneous windows are not added together or called unlimited. Wallet credit remains a separate USD-equivalent value, including a real zero. Quota and wallet are fetched independently, so a failure on one side keeps the other side visible; an `eligible: false` / empty-window answer is reported as **no active subscription** instead of a credential failure. Invalid, unauthorized or missing responses never fabricate a zero allowance; when both sides fail, the card shows an error/unavailable state. The workspace setting is kept across restarts and invalidates the previous query when changed.
46
51
 
@@ -65,30 +70,35 @@ OpenDesign 的 API 与客户端共用套餐,套餐用尽后可以继续扣钱
65
70
 
66
71
  ### 额度查询
67
72
 
68
- **只使用 DSH 的情况:**在 DSH 调用 OpenDesign 模型 API、统计会话费用,都不需要安装 OpenDesign 应用。远端额度查询另外需要 OpenDesign Cloud 账户的工作区 ID 和 Control Key,推理 API Key 不能代替。如果只有推理密钥,可以关闭额度卡片,价格匹配和会话计费照常工作。
73
+ 不需要安装 OpenDesign 桌面版。1.9.45 起支持网页 **Cookie** 和原有 **Control Key** 两种查询方式。API Keys 页面生成的推理密钥不能查询账户额度。
69
74
 
70
- 1. 在 **设置 → 费用 → 额度**找到并展开 **OpenDesign**。
71
- 2. 填入 OpenDesign Cloud 中对应的**工作区 ID**。
72
- 3. 在凭据编辑器中配置 **Control Key**,或向 DSH 宿主提供 `OPENDESIGN_CONTROL_KEY` / `VELA_CONTROL_KEY`。Cloud API Keys 页生成的推理密钥与查询凭据不同,不能混用。已有 OpenDesign/Vela 登录将控制端凭据保存在其自身配置中,本插件不会自动读取或修改那个配置。
73
- 4. 开启并刷新,可选择在侧栏或额度横条显示。
75
+ 1. 登录 [OpenDesign Cloud 网页](https://open-design.ai/cloud/dashboard)。
76
+ 2. 按 **F12 → 网络(Network)**,刷新网页,选择发往 `amr-api.open-design.ai` 的 `coding-plan-usage` 或 `wallet/balance` 请求。在**请求标头(Request Headers)**中复制 **Cookie** 的完整值,也可连同 `Cookie:` 一起复制。不要复制响应的 `Set-Cookie`,不需要在控制台执行脚本。
77
+ 3. 打开 **DSH 设置 → 费用 → 额度 → OpenDesign**,编辑 **Cookie / Control Key**,粘贴并保存。工作区 ID 留空时读取网页当前工作区;也可从刚才请求 URL 中复制 `/workspaces/` 后、`/billing/` 或 `/wallet/` 前的 ID。
78
+ 4. 开启额度查询,选择显示位置并刷新。Cookie 失效后,重新登录网页并复制即可。
74
79
 
75
- 凭据编辑器会把密钥保存到 DSH 凭据库的 `OPENDESIGN_CONTROL_KEY`。该名称与 `VELA_CONTROL_KEY` 别名都会反映到“已配置/来源”状态。清除只移除编辑器保存的首选密钥;别名或宿主环境变量仍可能生效。旧配置中的 OpenDesign 密钥也会参与既有的启动迁移。这修复了 @unifilitence 在 [#317](https://github.com/Han-1413141/dsh-cost-meter/issues/317) 报告并定位的凭据映射遗漏。
80
+ 原有 Control Key 继续使用同一个凭据编辑器,需明确填写工作区 ID。两种凭据都保存在 DSH 凭据库原有的 `OPENDESIGN_CONTROL_KEY` 槽位,命名账号各自隔离。宿主环境变量依次支持 `OPENDESIGN_CONTROL_KEY`、`VELA_CONTROL_KEY`、`OPENDESIGN_COOKIE`。清除已保存凭据不会移除环境变量。原有凭据映射问题由 @unifilitence 在 [#317](https://github.com/Han-1413141/dsh-cost-meter/issues/317) 报告并定位。
76
81
 
77
- 查询只访问以下固定官方 HTTPS GET 端点,并在凭据/工作区校验之后才发起:
82
+ 查询只访问以下固定官方 HTTPS GET 端点:
78
83
 
79
84
  ```text
80
- https://amr-api.open-design.ai/api/v1/workspaces/{workspaceId}/billing/preflight # 直接使用纯 Bearer 查询窗口
81
- https://amr-api.open-design.ai/api/v1/workspaces/{workspaceId}/wallet/balance # 钱包端点,独立读取
85
+ https://amr-api.open-design.ai/api/v1/workspaces/current # Cookie,工作区 ID 留空时读取
86
+ https://amr-api.open-design.ai/api/v1/workspaces/{workspaceId}/billing/coding-plan-usage # Cookie 查询套餐窗口
87
+ https://amr-api.open-design.ai/api/v1/workspaces/{workspaceId}/billing/preflight # Control Key 查询套餐窗口
88
+ https://amr-api.open-design.ai/api/v1/workspaces/{workspaceId}/wallet/balance # 使用同一查询凭据,独立读取钱包
82
89
  ```
83
90
 
91
+ 2026-10-29 已核对官方网页资源 `cloud-root-CUrPHDgS.js` 与 `pricing-refund-policy-Bamt0E9e.js` 中的 Cookie 路径、`activeWorkspaceId` 字段和 API 地址。回归使用模拟凭据与响应,未进行真实账户的登录查询。
92
+
84
93
  #### 端点权限与 401 排查
85
94
 
86
- - `/billing/preflight` 和 `/wallet/balance` 使用 `Authorization: Bearer ...` 与 `x-vela-workspace-id` 并行读取,不再请求需要浏览器会话的 `coding-plan-usage`。preflight 把窗口放在 `codingPlan` 内;解析前会核对内外两层工作区和成员身份。
95
+ - `/billing/preflight` 和 `/wallet/balance` 使用 `Authorization: Bearer ...` 与 `x-vela-workspace-id` 并行读取。Cookie 模式改用 `coding-plan-usage`,只发送 Cookie 与相同的工作区标头,不把 Cookie 当作 Bearer 密钥。preflight 把窗口放在 `codingPlan` 内;解析前会核对内外两层工作区和成员身份。
87
96
  - 钱包保留独立查询,按 `billingScopeVersion: 2` 契约校验。成功读取的钱包金额优先;钱包不可读时,经校验的 preflight 响应可提供 `balanceUsd` 作为余额,包括没有生效套餐的情况。一侧失败保留另一侧,缺失数据不会变成零。设置卡片、侧栏/横条提示和手动刷新结果都会显示失败的一侧与原因;备用余额会注明来自 `billing/preflight`。
88
97
  - 工作区 ID 来自 `GET https://amr-api.open-design.ai/api/v1/workspaces` 的 `items[].workspaceId`,不能填 `~/.amr/config.json` 中的 `profiles.prod.user.id`。
89
- - 遇到 401/403,检查 Control Key 是否有效、是否属于所填工作区、是否有读取权限。推理 API Key 不能代替 Control Key,用户 ID 不能代替工作区 ID。如果该账户连 preflight 也拒绝,可在 OpenDesign Cloud 控制台查看额度;可读的钱包仍单独显示。
98
+ - Cookie 模式遇到 401/403,重新登录网页、复制请求 Cookie,并检查当前工作区权限。
99
+ - Control Key 模式遇到 401/403,检查 Control Key 是否有效、是否属于所填工作区、是否有读取权限。推理 API Key 不能代替 Control Key,用户 ID 不能代替工作区 ID。如果该账户连 preflight 也拒绝,可在 OpenDesign Cloud 控制台查看额度;可读的钱包仍单独显示。
90
100
 
91
- 查询只访问上文列出的固定官方 HTTPS GET 端点;核对工作区,钱包必须提供成员身份,额度响应提供成员身份时再核对二者一致。preflight 响应省略外层冗余 `workspaceId` 时,在已由请求范围校验工作区的前提下仍接受;若响应指向不同工作区则拒绝。凭据由 DSH 凭据库管理,不回显、不写入账本,不跟随重定向,也不附带浏览器 Cookie。
101
+ 查询只访问上文列出的固定官方 HTTPS GET 端点;核对工作区,钱包必须提供成员身份,额度响应提供成员身份时再核对二者一致。preflight 响应省略外层冗余 `workspaceId` 时,在已由请求范围校验工作区的前提下仍接受;若响应指向不同工作区则拒绝。凭据由 DSH 凭据库管理,不回显、不写入账本,不跟随重定向。Control Key 请求不附带 Cookie,Cookie 请求不附带 Bearer 密钥。
92
102
 
93
103
  所有实际返回的窗口分别显示已用百分比和重置时间,不相加、不标成无限。钱包作为独立的美元等值额度显示,真实零余额保留。额度与钱包独立查询:一侧失败时另一侧仍照常显示;`eligible: false`/空窗口回执会明确报告为**无生效订阅**,不再与凭据失效混为一谈。认证失败、缺失回执或身份不匹配不显示虚构的零额度,两侧都失败时才显示错误/不可用状态。工作区配置跨重启保留,改变后清理原查询缓存。
94
104
 
@@ -57,3 +57,12 @@ DSH_TEST_NODE_MODULES=/path/to/host/node_modules \
57
57
  DSH_TEST_CODEX_PACKAGE=/path/to/dsh-codex-subscription-3.2.0.tgz \
58
58
  node test/codex-subscription-published.mjs
59
59
  ```
60
+
61
+ ## 2026-10-29:billion-context 0.1.209 与 Codex Subscription 3.2.1
62
+
63
+ 处理 github-actions[bot] 在 [#441](https://github.com/Han-1413141/dsh-cost-meter/issues/441)、[#442](https://github.com/Han-1413141/dsh-cost-meter/issues/442) 报告的版本及接入函数变化。实际 npm 发布包的 SHA-512 已与官方元数据匹配。
64
+
65
+ - billion-context 0.1.209:代理增加插件渲染路由;原生传输增加代理重启等待、直连前的超长请求检查和模式变化日志。实际发布包通过四协议计费、缓存用量、压缩、重试、父子会话、API/Plan 分类、回放、重启、取消、隐私及原版 CLI 自动接入检查。
66
+ - dsh-codex-subscription 3.2.1:RPC 增加默认模型重置分支,额度解析器及 reader 指纹保持一致。实际发布包通过单周/双窗口、默认缓存、强制刷新、账号切换、共享请求取消、登录失效与真实宿主传输拒绝检查。
67
+
68
+ 费用插件运行时代码无需调整。仅更新上述两个基线,保留 Connect 基线,并在 CI 中保留旧版本、加入两个新版本。测试使用合成数据与本机服务器,外部账户及模型请求为 0。
@@ -0,0 +1,25 @@
1
+ # v1.9.45:额度查询、余额隐藏与内存优化
2
+
3
+ ## 中文
4
+
5
+ - **OpenDesign 网页 Cookie 查询**:无需安装 OpenDesign 桌面版。在网页开发者工具的网络请求中复制完整 Cookie,保存到 OpenDesign 凭据框;工作区 ID 留空即可读取网页当前工作区。已有 Control Key 配置继续可用。详见 [配置步骤](opendesign-billing.md#额度查询)。
6
+ - **可选的余额快速隐藏**:在“设置 → 费用 → 显示 → 侧栏 → 余额”中开启“点击名称快速隐藏余额”。默认关闭;开启后点名称隐藏或显示,点金额刷新。官方与自定义余额均支持,隐藏时同时遮住进度条和悬停金额。
7
+ - **降低缓存内存**:同一会话只保留最新记录版本,统计快照按总量淘汰;服务端缓存闲置两分钟、页面缓存闲置一分钟后释放。同一压力数据下,垃圾回收后的缓存堆内存从 74.1 MiB 降至 22.4 MiB,约减少 70%。测试覆盖一个 4,000 次调用会话的 24 个版本,以及 12 份各含 12,000 次调用的统计快照;数值针对该测试中的插件缓存。
8
+ - **dsh-context 命令弹窗**:费用内容独立放在原卡片之后,加载时不再增大上游卡片的测量高度;桌面和窄屏检查覆盖初始滚动位置、手动滚动后刷新、关闭及重开。感谢 [@LUgABeEEE](https://github.com/LUgABeEEE) 在 [#440](https://github.com/Han-1413141/dsh-cost-meter/issues/440) 提供开关对照及滚动、焦点探针。本地复现了原卡片随加载增高,未复现报告中的反复自动滚动。
9
+ - **费用明细加载与布局**:页面和请求超时后可重试,旧数据保留,迟到响应不会覆盖新结果。标签、导出和刷新按钮使用同一行布局,窄窗口自动换行。感谢 [@fouriyeo](https://github.com/fouriyeo) 在 [#438](https://github.com/Han-1413141/dsh-cost-meter/issues/438) 提供复现、测量与定位。
10
+ - **Anthropic 额度可读性**:合并 [@windybirth](https://github.com/windybirth) 的 [#437](https://github.com/Han-1413141/dsh-cost-meter/pull/437),解决其在 [#436](https://github.com/Han-1413141/dsh-cost-meter/issues/436) 报告的误报。隐藏内部窗口,显示 5h/7d、重置时间及本窗口平均用量预测。维护者补充预测边界测试,并将 95% 红色阈值限制为 Anthropic。
11
+
12
+ 感谢群内 Zeh 的费用明细加载反馈、LiLNax 的余额点击操作建议,以及 _WZ 的网页 Cookie 查询建议;对应 GitHub 账号未提供。
13
+
14
+ 更新后完全重启 DSH,再刷新网页。Cookie 过期时重新登录 OpenDesign 网页并复制;推理 API Key 不用于额度查询。
15
+
16
+ ## English
17
+
18
+ - Query OpenDesign quota with a web request Cookie, optionally discovering the current web workspace. Existing Control Keys remain supported. See the [setup guide](opendesign-billing.md#quota-queries).
19
+ - Add an opt-in UI setting to hide/show official and custom balances by clicking their names. Amount clicks still refresh. Hidden state covers progress bars and tooltip amounts.
20
+ - Keep only the latest usage revision per conversation, bound the aggregate snapshot cache, and release idle server/browser caches. Retained cache heap after GC fell from 74.1 MiB to 22.4 MiB in the same synthetic workload; this measures plugin caches, not the whole DSH process.
21
+ - Isolate context-cost content from the overview card measured by dsh-context in command modals. Tests cover initial scroll, manual scrolling, refresh and reopening. The reported repeated auto-scroll was not reproduced locally; the measured card's loading-driven height change was reproduced and removed. Thanks to @LUgABeEEE for #440 and its diagnostic probes.
22
+ - Make cost-page loading recoverable after timeouts and align tabs with export/refresh actions, including narrow screens. Thanks to @fouriyeo for issue #438.
23
+ - Merge @windybirth's Anthropic quota display contribution, with scoped thresholds and forecast boundary checks.
24
+
25
+ Fully restart DSH and refresh its Web UI after upgrading. Cookie requests were checked against the official web implementation and synthetic regression responses; no authenticated live-account query was performed.
@@ -0,0 +1,19 @@
1
+ # v1.9.46:峰谷箭头与上游兼容更新
2
+
3
+ ## 中文
4
+
5
+ 峰谷分段样式的箭头现在完整保留在组件内。临近高峰开始、时段切换或周末结束时,箭头继续反映实际进度,不再因箭头宽度造成横向溢出。
6
+
7
+ 本版包含 [v1.9.45 的全部更新](update-notes-1.9.45.md):OpenDesign 网页 Cookie 额度、可选的余额快速隐藏、费用明细加载与按钮布局修复、Anthropic 额度改进,以及前后端缓存内存优化。余额隐藏开关位于“设置 → 费用 → 显示 → 侧栏 → 余额/自定义余额”。[OpenDesign 配置步骤](opendesign-billing.md#额度查询)。
8
+
9
+ 同时验证并接受 billion-context 0.1.209 与 dsh-codex-subscription 3.2.1 的兼容基线,详见[实际发布包检查](plugin-compatibility-watch.md)。
10
+
11
+ 更新后完全重启 DSH,再刷新网页。
12
+
13
+ ## English
14
+
15
+ Keep the complete classic peak-period arrow inside the component near phase boundaries and the end of weekends. The marker continues to track actual period progress without causing horizontal overflow.
16
+
17
+ Also validate billion-context 0.1.209 and dsh-codex-subscription 3.2.1 against their published packages and update the compatibility baselines and CI matrix.
18
+
19
+ Includes all [v1.9.45 improvements](update-notes-1.9.45.md#english): OpenDesign web-Cookie quotas, optional balance hiding, cost-view recovery and alignment, Anthropic quotas, and lower retained cache memory. Fully restart DSH and refresh its Web UI after upgrading.