@rayadesu/dsh-billing 0.3.0 → 0.3.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/README.i18n.yaml CHANGED
@@ -3,4 +3,4 @@
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
5
  README.md: 043453b28aa797ae654f2fa8653a547c1a9dd13b
6
- README.zh.md: a60f2df77c3ff883a6e0ceb74c114510bf1643ce
6
+ README.zh.md: bd3f35d13149144e519b31a01960066df9c53423
package/README.zh.md CHANGED
@@ -195,7 +195,7 @@ npm publish # @rayadesu/dsh-billing bundle(仓库根)
195
195
  ## 会话花费是怎么算的
196
196
 
197
197
  - 每条 `assistant/message` 事件报告三个计费 token 桶:**缓存命中输入**、**未命中输入**(未缓存输入 + 缓存写入)、**输出**(含推理)。
198
- - 每条消息按其**发生时刻(北京时间)**所在的峰/谷时段单价计价,三个桶分别计费(`缓存命中 ¥X · 未命中输入 ¥Y · 输出 ¥Z`),再按模型汇总。高峰窗口仅周一至周五适用;周末全天按低谷价计费。
198
+ - 每条消息按其**发生时刻**(北京时间)所在的峰/谷时段单价计价,三个桶分别计费(`缓存命中 ¥X · 未命中输入 ¥Y · 输出 ¥Z`),再按模型汇总。高峰窗口仅周一至周五适用;周末全天按低谷价计费。
199
199
  - **今日共花费**按同一个计价规则汇总当天(北京时间自然日)所有会话的事件;事件归属的日期同样按北京时间计算。
200
200
  - **本轮花费**按同一规则计价该回合 `turn/start`..`turn/end` 区间内的消息(定位到收尾消息的会话 id + 消息 id)。
201
201
  - **今日会话花费排行**按同一规则按会话汇总今日花费(跨天会话只统计今天的部分),从高到低排序;会话名取日志中最后一条 `session/title` 事件(自动生成的中文标题或用户重命名的新标题)。
package/package.json CHANGED
@@ -1,9 +1,12 @@
1
1
  {
2
2
  "name": "@rayadesu/dsh-billing",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
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
- "packageManager": "pnpm@11.7.0",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/rayadesune/DeepSeek-Harness-chat-billing.git"
9
+ },
7
10
  "engines": {
8
11
  "node": "^22.19 || >=24"
9
12
  },
@@ -12,14 +15,6 @@
12
15
  "patch": "./cordis.patch.yml"
13
16
  }
14
17
  },
15
- "scripts": {
16
- "build": "pnpm run build:host && pnpm run build:client",
17
- "build:host": "tsc -b tsconfig.host.json && tsdown --env.DSH_BUILD_FACE host",
18
- "build:client": "tsc -b tsconfig.client.json && tsdown --env.DSH_BUILD_FACE client",
19
- "typecheck": "tsc -b tsconfig.host.json && tsc -b tsconfig.client.json",
20
- "test": "vitest run",
21
- "verify": "node scripts/verify-packages.mjs"
22
- },
23
18
  "files": [
24
19
  "cordis.patch.yml",
25
20
  "README.md",
@@ -34,8 +29,8 @@
34
29
  "access": "public"
35
30
  },
36
31
  "peerDependencies": {
37
- "@rayadesu/dsh-client-ui-billing": "^0.3.0",
38
- "@rayadesu/dsh-llm-billing": "^0.3.0"
32
+ "@rayadesu/dsh-client-ui-billing": "^0.3.1",
33
+ "@rayadesu/dsh-llm-billing": "^0.3.1"
39
34
  },
40
35
  "devDependencies": {
41
36
  "@deepseek-ai/cordis": "^4.0.1",
@@ -47,5 +42,13 @@
47
42
  "tsdown": "^0.22.2",
48
43
  "typescript": "^6.0.3",
49
44
  "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"
50
53
  }
51
- }
54
+ }