@ds-hu/dsh-token-quota 2.4.0 → 2.4.1
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/CHANGELOG.md +11 -0
- package/README.md +6 -1
- package/package.json +4 -4
- package/test/storage.mjs +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,17 @@
|
|
|
6
6
|
更早版本(v2.0.5 及以前)的变更记录在 [README](README.md) 的「vX.Y.Z 更新」小节与
|
|
7
7
|
[docs/](docs/) 下的对应执行记录中,本文件自 2.1.0 起逐版本记录。
|
|
8
8
|
|
|
9
|
+
## [2.4.1] - 2026-11-01
|
|
10
|
+
|
|
11
|
+
### 变更
|
|
12
|
+
|
|
13
|
+
- **包名改为 `@ds-hu/dsh-token-quota`,改由 npm 分发**:加 scope 与上游 `shxtmaker/dsh-token-quota` 区分,
|
|
14
|
+
`dsh plugin add @ds-hu/dsh-token-quota` 一条命令即可安装。插件 id、设置命名空间与
|
|
15
|
+
`$DSH_HOME/dsh-token-quota/` 数据目录不变,从 2.4.0 升级不需要迁移;此前从未在 npm 发布过同名包,
|
|
16
|
+
不存在需要迁移的 npm 安装。
|
|
17
|
+
- **发布由 CI 执行**:`fork-vX.Y.Z` 标签触发 `.github/workflows/publish.yml`,跑完 `npm test` 与打包契约检查、
|
|
18
|
+
核对标签与 `package.json` 同版本后,经 OIDC 可信发布到 npm 并自动附 provenance;仓库里不存 npm token。
|
|
19
|
+
|
|
9
20
|
## [2.4.0] - 2026-10-29
|
|
10
21
|
|
|
11
22
|
### 变更
|
package/README.md
CHANGED
|
@@ -2,12 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
DeepSeek Harness 用量监控插件。查看当前会话对应供应商的周期限额、账户余额、报告费用和今日 Token 用量,支持 Windows 桌面端与 Web 界面。
|
|
4
4
|
|
|
5
|
-
当前版本:**v2.4.
|
|
5
|
+
当前版本:**v2.4.1**。要求 **DSH ≥ 0.1.7-rc.2**;真实桌面及 Web 验收环境为 **DSH 0.2.0-rc.2**。
|
|
6
6
|
|
|
7
7
|
Plugins 面板中显示为 **用量监控**(英文 **Usage monitor**):图标是根目录 `icon.svg`,标题与一句话说明来自 `locale/zh.json` 与 `locale/en.json` 的 `meta`。
|
|
8
8
|
|
|
9
9
|
[GitHub 下载](https://github.com/shxtmaker/dsh-token-quota/releases/latest) · [问题反馈](https://github.com/shxtmaker/dsh-token-quota/issues)
|
|
10
10
|
|
|
11
|
+
## v2.4.1 更新
|
|
12
|
+
|
|
13
|
+
- 包名改为 `@ds-hu/dsh-token-quota`:`dsh plugin add @ds-hu/dsh-token-quota` 直接安装,不必再下载压缩包;插件 id、设置命名空间与数据目录不变,升级不需要迁移。
|
|
14
|
+
- 发布改由 CI 执行:`fork-vX.Y.Z` 标签触发测试与 `npm publish`,凭据走 OIDC 可信发布并附 provenance,仓库里不存 npm token。
|
|
15
|
+
|
|
11
16
|
## v2.4.0 更新
|
|
12
17
|
|
|
13
18
|
- 四个浮层收敛为单一面板:删除用量浮卡、供应商限额明细弹窗与用量统计弹窗,单击侧栏卡片直接打开「用量监控」;面板只剩「概览」「供应商」两个页签,原「设置」页签并入供应商页底部的折叠「全局设置」。卡片进入默认概览,宿主「设置 → 用量监控」进入默认供应商。
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ds-hu/dsh-token-quota",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.1",
|
|
4
4
|
"description": "DeepSeek Harness 用量监控:官方侧栏完整/紧凑卡片与单一面板的概览、供应商配置,按当前会话显示周期限额、逐币种余额与报告用量费用;保留凭据类别隔离、自动识别普通 API Key 与本地今日用量统计。",
|
|
5
5
|
"icon": "./icon.svg",
|
|
6
6
|
"author": "shxtmaker <https://github.com/shxtmaker>",
|
|
7
7
|
"license": "MIT",
|
|
8
|
-
"homepage": "https://github.com/
|
|
8
|
+
"homepage": "https://github.com/ds-hu/dsh-usage-monitor#readme",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/
|
|
11
|
+
"url": "git+https://github.com/ds-hu/dsh-usage-monitor.git"
|
|
12
12
|
},
|
|
13
13
|
"bugs": {
|
|
14
|
-
"url": "https://github.com/
|
|
14
|
+
"url": "https://github.com/ds-hu/dsh-usage-monitor/issues"
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"lib",
|
package/test/storage.mjs
CHANGED
|
@@ -26,6 +26,11 @@ import {
|
|
|
26
26
|
usageFilePath,
|
|
27
27
|
} from "../lib/storage.js";
|
|
28
28
|
|
|
29
|
+
// 峰谷拆分按「宿主本地小时桶 → 北京时刻」推导,本文件的用例用北京墙钟构造小时桶,
|
|
30
|
+
// 断言值只在 +08:00 的宿主下成立。CI 跑在 UTC,09 点的桶会被算成北京 17 点(谷价),
|
|
31
|
+
// 所以在这里把宿主时区钉住 —— 同一进程内改 TZ 对后续 new Date() 立即生效(Windows 亦然)。
|
|
32
|
+
process.env.TZ = "Asia/Shanghai";
|
|
33
|
+
|
|
29
34
|
const dir = mkdtempSync(join(tmpdir(), "qm-storage-"));
|
|
30
35
|
const file = usageFilePath(dir);
|
|
31
36
|
|