@rayadesu/dsh-billing 0.3.0 → 0.3.2

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.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: a60f2df77c3ff883a6e0ceb74c114510bf1643ce
5
+ README.md: 8164824e6ae66a41bbf82375fcd12e886e72ea1f
6
+ README.zh.md: 563d7ac944b9d636dadfa4cc7b781740c699f0c7
package/README.md CHANGED
@@ -111,8 +111,17 @@ dsh plugin --profile web list # list the web profile's installed plugins
111
111
  dsh plugin --profile web add @rayadesu/dsh-billing @rayadesu/dsh-llm-billing @rayadesu/dsh-client-ui-billing
112
112
  dsh plugin --profile web remove @rayadesu/dsh-billing @rayadesu/dsh-llm-billing @rayadesu/dsh-client-ui-billing
113
113
  dsh plugin --profile web update # update plugins to the latest allowed versions
114
+ dsh plugin --profile web update --latest # ignore declared ranges; upgrade every plugin to its newest published version
114
115
  ```
115
116
 
117
+ `update` respects the version ranges in the profile's `package.json`, so it
118
+ stays within the semver range each plugin declares. Adding `--latest` (a pnpm
119
+ `update` flag) instead ignores those ranges and upgrades every plugin to its
120
+ newest published version — the way to pick up a fresh release immediately once
121
+ it is resolvable. From a source-built dsh checkout you run it as
122
+ `pnpm dsh …` in the deepseek-harness directory, exactly as with the other
123
+ commands.
124
+
116
125
  ### Dependency notes
117
126
 
118
127
  The two plugin packages declare the DeepSeek Harness packages they build on
package/README.zh.md CHANGED
@@ -105,8 +105,14 @@ dsh plugin --profile web list # 列出 web profile 已安装的插件
105
105
  dsh plugin --profile web add @rayadesu/dsh-billing @rayadesu/dsh-llm-billing @rayadesu/dsh-client-ui-billing
106
106
  dsh plugin --profile web remove @rayadesu/dsh-billing @rayadesu/dsh-llm-billing @rayadesu/dsh-client-ui-billing
107
107
  dsh plugin --profile web update # 把插件更新到当前允许的最新版本
108
+ dsh plugin --profile web update --latest # 忽略声明的版本区间,把所有插件升到最新发布版本
108
109
  ```
109
110
 
111
+ `update` 遵循 profile `package.json` 里的版本区间,只在该插件声明的 semver 范围内升级。
112
+ 加上 `--latest`(pnpm `update` 的选项)则忽略这些区间,把所有插件直接升到最新发布的版本——
113
+ 用于在版本可解析后立刻拿到新发布。源码构建的 dsh 要在 deepseek-harness 目录里用
114
+ `pnpm dsh …` 执行,和其余命令一样。
115
+
110
116
  ### 依赖说明
111
117
 
112
118
  两个插件包把它们依赖的 DeepSeek Harness 包(`@deepseek-ai/cordis`、
@@ -195,7 +201,7 @@ npm publish # @rayadesu/dsh-billing bundle(仓库根)
195
201
  ## 会话花费是怎么算的
196
202
 
197
203
  - 每条 `assistant/message` 事件报告三个计费 token 桶:**缓存命中输入**、**未命中输入**(未缓存输入 + 缓存写入)、**输出**(含推理)。
198
- - 每条消息按其**发生时刻(北京时间)**所在的峰/谷时段单价计价,三个桶分别计费(`缓存命中 ¥X · 未命中输入 ¥Y · 输出 ¥Z`),再按模型汇总。高峰窗口仅周一至周五适用;周末全天按低谷价计费。
204
+ - 每条消息按其**发生时刻**(北京时间)所在的峰/谷时段单价计价,三个桶分别计费(`缓存命中 ¥X · 未命中输入 ¥Y · 输出 ¥Z`),再按模型汇总。高峰窗口仅周一至周五适用;周末全天按低谷价计费。
199
205
  - **今日共花费**按同一个计价规则汇总当天(北京时间自然日)所有会话的事件;事件归属的日期同样按北京时间计算。
200
206
  - **本轮花费**按同一规则计价该回合 `turn/start`..`turn/end` 区间内的消息(定位到收尾消息的会话 id + 消息 id)。
201
207
  - **今日会话花费排行**按同一规则按会话汇总今日花费(跨天会话只统计今天的部分),从高到低排序;会话名取日志中最后一条 `session/title` 事件(自动生成的中文标题或用户重命名的新标题)。
package/package.json CHANGED
@@ -1,8 +1,12 @@
1
1
  {
2
2
  "name": "@rayadesu/dsh-billing",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
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
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/rayadesune/DeepSeek-Harness-chat-billing.git"
9
+ },
6
10
  "packageManager": "pnpm@11.7.0",
7
11
  "engines": {
8
12
  "node": "^22.19 || >=24"
@@ -34,8 +38,8 @@
34
38
  "access": "public"
35
39
  },
36
40
  "peerDependencies": {
37
- "@rayadesu/dsh-client-ui-billing": "^0.3.0",
38
- "@rayadesu/dsh-llm-billing": "^0.3.0"
41
+ "@rayadesu/dsh-client-ui-billing": "^0.3.2",
42
+ "@rayadesu/dsh-llm-billing": "^0.3.2"
39
43
  },
40
44
  "devDependencies": {
41
45
  "@deepseek-ai/cordis": "^4.0.1",