@rayadesu/dsh-billing 0.3.1 → 0.3.4

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/AGENTS.md CHANGED
@@ -47,7 +47,7 @@ cordis.patch.yml DSH profile bundle 补丁层:挂载 llm-billing + ui-
47
47
  - **密钥不进仓库**:`DEEPSEEK_API_KEY` 等一律由用户环境或凭据 seam 提供,仓库不含真实值。
48
48
  - **README 双语**:每个 README 遵循 DSH 结构 `README.md`(EN) + `README.zh.md`(ZH) +
49
49
  `README.i18n.yaml`(记录两文件 git blob hash,改动后需更新)。
50
- - **版本对齐**:根 bundle 与两个包统一版本号(当前 0.3.0),`pnpm-lock.yaml` 随依赖变更更新。
50
+ - **版本对齐**:根 bundle 与两个包统一版本号(当前 0.3.4),`pnpm-lock.yaml` 随依赖变更更新。
51
51
  - **文本规范**:LF 换行、文件末尾一个换行(`.editorconfig`/`.gitattributes` 已声明)。
52
52
 
53
53
  ## 常用命令
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 WilliamLIiii
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 WilliamLIiii
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.i18n.yaml CHANGED
@@ -2,5 +2,5 @@
2
2
  # last confirmed-consistent state. Both languages carry equal authority; after
3
3
  # editing either side, bring the other along and re-record both hashes with:
4
4
  # git hash-object README.md README.zh.md
5
- README.md: 043453b28aa797ae654f2fa8653a547c1a9dd13b
6
- README.zh.md: bd3f35d13149144e519b31a01960066df9c53423
5
+ README.md: 9c37927de206de645bc826b3d95b8d86dd636e1e
6
+ README.zh.md: c48efb8c6d88452d959feec50670f428fd927cce
package/README.md CHANGED
@@ -25,6 +25,10 @@ A real session: the session-header badge, the detail panel (remaining amount, th
25
25
 
26
26
  <img width="1200" alt="Billing plugin overview: session header badge, detail panel with per-model rows and today's session ranking, and the turn-cost row" src="preview-overview.png" />
27
27
 
28
+ Close-up of the detail panel — the `API 剩余金额` figure, `本会话花费` next to `今日共花费`, the per-model breakdown (`缓存命中 · 未命中输入 · 输出`), and the today session-spend ranking:
29
+
30
+ <img width="640" alt="Detail panel close-up: API remaining amount, this session's spend next to today's all-session spend, per-model rows and today's session ranking" src="preview-detail.png" />
31
+
28
32
  Close-up of the turn-cost row — money-bag icon, `本轮花费` label and the `¥` amount, in front of the copy control:
29
33
 
30
34
  <img width="640" alt="Turn-cost row close-up: money-bag icon, 本轮花费 label and ¥ amount before the copy control" src="preview-turn-cost.png" />
@@ -111,8 +115,17 @@ dsh plugin --profile web list # list the web profile's installed plugins
111
115
  dsh plugin --profile web add @rayadesu/dsh-billing @rayadesu/dsh-llm-billing @rayadesu/dsh-client-ui-billing
112
116
  dsh plugin --profile web remove @rayadesu/dsh-billing @rayadesu/dsh-llm-billing @rayadesu/dsh-client-ui-billing
113
117
  dsh plugin --profile web update # update plugins to the latest allowed versions
118
+ dsh plugin --profile web update --latest # ignore declared ranges; upgrade every plugin to its newest published version
114
119
  ```
115
120
 
121
+ `update` respects the version ranges in the profile's `package.json`, so it
122
+ stays within the semver range each plugin declares. Adding `--latest` (a pnpm
123
+ `update` flag) instead ignores those ranges and upgrades every plugin to its
124
+ newest published version — the way to pick up a fresh release immediately once
125
+ it is resolvable. From a source-built dsh checkout you run it as
126
+ `pnpm dsh …` in the deepseek-harness directory, exactly as with the other
127
+ commands.
128
+
116
129
  ### Dependency notes
117
130
 
118
131
  The two plugin packages declare the DeepSeek Harness packages they build on
package/README.zh.md CHANGED
@@ -25,6 +25,10 @@
25
25
 
26
26
  <img width="1200" alt="计费插件总览:会话头部徽标、详情面板(按模型分项与今日会话花费排行)、消息操作行里的本轮花费行" src="preview-overview.png" />
27
27
 
28
+ 详情面板特写 —— `API 剩余金额`、`本会话花费` 与 `今日共花费`、按模型分项(`缓存命中 · 未命中输入 · 输出`)与今日会话花费排行:
29
+
30
+ <img width="640" alt="详情面板特写:API 剩余金额、本会话花费与今日共花费、按模型分项与今日会话花费排行" src="preview-detail.png" />
31
+
28
32
  本轮花费行特写 —— 钱袋图标、`本轮花费` 标签与 `¥` 金额,位于复制控件之前:
29
33
 
30
34
  <img width="640" alt="本轮花费行特写:钱袋图标、本轮花费标签与金额,位于复制控件之前" src="preview-turn-cost.png" />
@@ -105,8 +109,14 @@ dsh plugin --profile web list # 列出 web profile 已安装的插件
105
109
  dsh plugin --profile web add @rayadesu/dsh-billing @rayadesu/dsh-llm-billing @rayadesu/dsh-client-ui-billing
106
110
  dsh plugin --profile web remove @rayadesu/dsh-billing @rayadesu/dsh-llm-billing @rayadesu/dsh-client-ui-billing
107
111
  dsh plugin --profile web update # 把插件更新到当前允许的最新版本
112
+ dsh plugin --profile web update --latest # 忽略声明的版本区间,把所有插件升到最新发布版本
108
113
  ```
109
114
 
115
+ `update` 遵循 profile `package.json` 里的版本区间,只在该插件声明的 semver 范围内升级。
116
+ 加上 `--latest`(pnpm `update` 的选项)则忽略这些区间,把所有插件直接升到最新发布的版本——
117
+ 用于在版本可解析后立刻拿到新发布。源码构建的 dsh 要在 deepseek-harness 目录里用
118
+ `pnpm dsh …` 执行,和其余命令一样。
119
+
110
120
  ### 依赖说明
111
121
 
112
122
  两个插件包把它们依赖的 DeepSeek Harness 包(`@deepseek-ai/cordis`、
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@rayadesu/dsh-billing",
3
- "version": "0.3.1",
3
+ "version": "0.3.4",
4
4
  "description": "DeepSeek Harness billing plugin: account balance and this session's billed spend with a session-header badge.",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/rayadesune/DeepSeek-Harness-chat-billing.git"
9
9
  },
10
+ "packageManager": "pnpm@11.7.0",
10
11
  "engines": {
11
12
  "node": "^22.19 || >=24"
12
13
  },
@@ -15,6 +16,14 @@
15
16
  "patch": "./cordis.patch.yml"
16
17
  }
17
18
  },
19
+ "scripts": {
20
+ "build": "pnpm run build:host && pnpm run build:client",
21
+ "build:host": "tsc -b tsconfig.host.json && tsdown --env.DSH_BUILD_FACE host",
22
+ "build:client": "tsc -b tsconfig.client.json && tsdown --env.DSH_BUILD_FACE client",
23
+ "typecheck": "tsc -b tsconfig.host.json && tsc -b tsconfig.client.json",
24
+ "test": "vitest run",
25
+ "verify": "node scripts/verify-packages.mjs"
26
+ },
18
27
  "files": [
19
28
  "cordis.patch.yml",
20
29
  "README.md",
@@ -22,6 +31,7 @@
22
31
  "README.i18n.yaml",
23
32
  "preview-overview.png",
24
33
  "preview-turn-cost.png",
34
+ "preview-detail.png",
25
35
  "LICENSE",
26
36
  "AGENTS.md"
27
37
  ],
@@ -29,8 +39,8 @@
29
39
  "access": "public"
30
40
  },
31
41
  "peerDependencies": {
32
- "@rayadesu/dsh-client-ui-billing": "^0.3.1",
33
- "@rayadesu/dsh-llm-billing": "^0.3.1"
42
+ "@rayadesu/dsh-client-ui-billing": "^0.3.4",
43
+ "@rayadesu/dsh-llm-billing": "^0.3.4"
34
44
  },
35
45
  "devDependencies": {
36
46
  "@deepseek-ai/cordis": "^4.0.1",
@@ -42,13 +52,5 @@
42
52
  "tsdown": "^0.22.2",
43
53
  "typescript": "^6.0.3",
44
54
  "vitest": "^4.1.8"
45
- },
46
- "scripts": {
47
- "build": "pnpm run build:host && pnpm run build:client",
48
- "build:host": "tsc -b tsconfig.host.json && tsdown --env.DSH_BUILD_FACE host",
49
- "build:client": "tsc -b tsconfig.client.json && tsdown --env.DSH_BUILD_FACE client",
50
- "typecheck": "tsc -b tsconfig.host.json && tsc -b tsconfig.client.json",
51
- "test": "vitest run",
52
- "verify": "node scripts/verify-packages.mjs"
53
55
  }
54
- }
56
+ }
Binary file
Binary file
Binary file