@rayadesu/dsh-billing 0.3.5 → 0.3.7

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
@@ -11,7 +11,7 @@ deepseek-harness 官方仓库([deepseek-ai/deepseek-harness](https://github.co
11
11
  ```
12
12
  packages/llm-billing/ 宿主插件 @rayadesu/dsh-llm-billing(/user/balance 传输、峰谷计价、billing Remote)
13
13
  packages/ui-billing/ 浏览器插件 @rayadesu/dsh-client-ui-billing(会话头部徽标与详情面板)
14
- packages/typert-protocol/ 内嵌 Typert 协议声明(@deepseek-ai/dsh-typert-protocol@0.1.1-rc.2 的 lib/types),构建期供 typert 生成器识别装饰器;刻意不在 pnpm workspace 内,让 @deepseek-ai/dsh-typert-protocol 从 npm 解析(内嵌副本只有声明,无运行时实现)
14
+ packages/typert-protocol/ 内嵌 Typert 协议声明(@deepseek-ai/dsh-typert-protocol@0.1.2-alpha.5 的 lib/types),构建期供 typert 生成器识别装饰器;刻意不在 pnpm workspace 内,让 @deepseek-ai/dsh-typert-protocol 从 npm 解析(内嵌副本只有声明,无运行时实现)
15
15
  cordis.patch.yml DSH profile bundle 补丁层:挂载 llm-billing + ui-billing 两个插件行
16
16
  ```
17
17
 
@@ -41,13 +41,13 @@ cordis.patch.yml DSH profile bundle 补丁层:挂载 llm-billing + ui-
41
41
  - **发布前校验**:`pnpm run verify`(每个包 `prepublishOnly` 自动运行)检查
42
42
  `lib/typert.host.js` 的 `TYPERT.package` 必须等于导出它的包名,且 lib 中不得残留
43
43
  其他包名的清单;失败即禁止发布。
44
- - **依赖以发布形态声明**:`@deepseek-ai/dsh-*` 依赖写 `^0.1.1-rc.2`(对应官方 monorepo 当前发布基线,monorepo 内为
44
+ - **依赖以发布形态声明**:`@deepseek-ai/dsh-*` 依赖写 `^0.1.2-alpha.5`(对应官方 monorepo 当前发布基线,monorepo 内为
45
45
  `workspace:^`);本插件的三个包发布到 npm 的
46
46
  `@rayadesu` scope,直接 `dsh plugin add @rayadesu/...` 安装。
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.5),`pnpm-lock.yaml` 随依赖变更更新。
50
+ - **版本对齐**:根 bundle 与两个包统一版本号(当前 0.3.7),`pnpm-lock.yaml` 随依赖变更更新。
51
51
  - **文本规范**:LF 换行、文件末尾一个换行(`.editorconfig`/`.gitattributes` 已声明)。
52
52
 
53
53
  ## 常用命令
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: 3f7f9c46aeb998284ea56cf06d61942dffe1b5e8
6
- README.zh.md: 96f2085337067d5720bfe9c2f766b39c3562238d
5
+ README.md: f87de7b40843820fdfd0d7817df48d7c2c02a876
6
+ README.zh.md: da425b670235d285d72da3adb63045034d093a19
package/README.md CHANGED
@@ -29,7 +29,7 @@ Close-up of the detail panel — the `API 剩余金额` figure, `本会话花费
29
29
 
30
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
31
 
32
- Close-up of the turn-cost amount — the static `¥` amount at the end of the actions row, after the clock (screenshot from before the 0.3.5 redesign):
32
+ Close-up of the turn-cost amount — the static `¥` amount at the end of the actions row, after the clock:
33
33
 
34
34
  <img width="640" alt="Turn-cost amount close-up: the static ¥ amount at the end of the actions row, after the clock" src="preview-turn-cost.png" />
35
35
 
@@ -130,12 +130,31 @@ commands.
130
130
 
131
131
  The two plugin packages declare the DeepSeek Harness packages they build on
132
132
  (`@deepseek-ai/cordis`, `@deepseek-ai/dsh-credentials`, `@deepseek-ai/dsh-session`,
133
- and the client runtime packages) as `peerDependencies` at `^0.1.1-rc.2`. A dsh
133
+ and the client runtime packages) as `peerDependencies` at `^0.1.2-alpha.5`. A dsh
134
134
  profile does not auto-install peers, so these are provided by the dsh
135
135
  installation itself through the `profiles/node_modules` fallback rather than
136
136
  fetched from the registry — no extra packages to install, and no registry token
137
137
  needed on the installing machine.
138
138
 
139
+ The plugin builds against the 0.1.2-alpha.5 published line and keeps both DSH
140
+ runtime families readable: the live `Session` log surface
141
+ (`Session.events` + `header.seedLength` at/before 0.1.1-rc.2,
142
+ `snapshotEvents()` + `inheritedEventCount` since 0.1.2-alpha.4), and the
143
+ persistence service surface (`inspect`/`listSnapshots` at/before 0.1.1-rc.2,
144
+ `open`+`SessionHandle`/`list` on the 0.1.2-alpha.5 handle-based seam — the
145
+ checkout master that ships the refactor). The projection unit's `init` is
146
+ declared with the newer metadata parameters and stays callable as the older
147
+ zero-arg shape.
148
+
149
+ The browser-half tests exercise the published client bundles through the
150
+ module-loader shim; since the 0.1.2-alpha.5 client stack split the runtime out
151
+ of `dsh-client-runtime` (deleted) into `dsh-client-store`,
152
+ `dsh-client-ui-session`, `dsh-client-ui-chat`, and the renderer-owned
153
+ `SlotRegistry`, the test harness re-checks registered bundle exports after a
154
+ fallback require and pins react copies with a resolve alias. The `assistant-actions`
155
+ slot row moved from ui-conversation to ui-chat, so the plugin's client half
156
+ pulls the ui-chat type merge too.
157
+
139
158
  ### Configure your DeepSeek API key
140
159
 
141
160
  Either fill it in on the web "Models" page (writes `DEEPSEEK_API_KEY` into `~/.dsh/.credentials.yaml`), or export it:
@@ -174,7 +193,7 @@ it. If a typert manifest ever names a package other than its own
174
193
 
175
194
  The typert generator recognizes `Remote`/`TypertRemoteService` only from a
176
195
  workspace-registered protocol package, so `packages/typert-protocol` vendors
177
- the published `@deepseek-ai/dsh-typert-protocol@0.1.1-rc.2` declarations; when
196
+ the published `@deepseek-ai/dsh-typert-protocol@0.1.2-alpha.5` declarations; when
178
197
  the dsh dependency line moves, refresh it from the installed package.
179
198
 
180
199
  Publishing (the bundle and both plugins share one version; `prepublishOnly`
package/README.zh.md CHANGED
@@ -29,7 +29,7 @@
29
29
 
30
30
  <img width="640" alt="详情面板特写:API 剩余金额、本会话花费与今日共花费、按模型分项与今日会话花费排行" src="preview-detail.png" />
31
31
 
32
- 本轮花费金额特写 —— 操作行行尾(时钟之后)的静态 `¥` 金额(截图来自 0.3.5 改版前):
32
+ 本轮花费金额特写 —— 操作行行尾(时钟之后)的静态 `¥` 金额:
33
33
 
34
34
  <img width="640" alt="本轮花费金额特写:操作行行尾的静态金额,位于时钟之后" src="preview-turn-cost.png" />
35
35
 
@@ -121,10 +121,24 @@ dsh plugin --profile web update --latest # 忽略声明的版本区间,把所
121
121
 
122
122
  两个插件包把它们依赖的 DeepSeek Harness 包(`@deepseek-ai/cordis`、
123
123
  `@deepseek-ai/dsh-credentials`、`@deepseek-ai/dsh-session` 以及客户端运行时包)
124
- 声明为 `peerDependencies`(`^0.1.1-rc.2`)。dsh profile 默认不自动安装 peer,所以
124
+ 声明为 `peerDependencies`(`^0.1.2-alpha.5`)。dsh profile 默认不自动安装 peer,所以
125
125
  这些由 dsh 安装本身通过 `profiles/node_modules` 回退提供,而不是从 registry 拉取——
126
126
  无需额外安装,安装机也不需要 registry token。
127
127
 
128
+ 插件按 0.1.2-alpha.5 发布线构建,同时兼容读取两代 DSH 运行时:live `Session` 日志面
129
+ (0.1.1-rc.2 及以前为 `Session.events` + `header.seedLength`,0.1.2-alpha.4 起为
130
+ `snapshotEvents()` + `inheritedEventCount`),以及持久化服务面(0.1.1-rc.2 及以前为
131
+ `inspect`/`listSnapshots`,0.1.2-alpha.5 的 handle 化改造后为
132
+ `open`+`SessionHandle`/`list`——即含该重构的 checkout master)。投影单元的 `init`
133
+ 按新签名声明(带元数据参数),同时保持旧的无参调用方式可用。
134
+
135
+ 浏览器半测通过 module-loader shim 跑已发布的 client bundle;由于 0.1.2-alpha.5
136
+ 客户端栈把运行时从 `dsh-client-runtime`(已删除)拆进 `dsh-client-store`、
137
+ `dsh-client-ui-session`、`dsh-client-ui-chat` 与 renderer 持有的 `SlotRegistry`,
138
+ 测试底座在回退 require 后会复查已注册的 bundle 导出,并用 resolve alias 固定
139
+ react 副本。`assistant-actions` slot 行从 ui-conversation 移到了 ui-chat,
140
+ 插件客户端侧也引入了 ui-chat 的类型合并。
141
+
128
142
  ### 配置你的 DeepSeek API key
129
143
 
130
144
  二选一:在网页「模型」页填入(会把 `DEEPSEEK_API_KEY` 写入 `~/.dsh/.credentials.yaml`),或导出环境变量:
@@ -160,7 +174,7 @@ host 面会从源码重新生成 `lib/typert.host.js` 与 `lib/typert.remote-cli
160
174
  的 name 不一致,`verify` 会在发布前直接失败。
161
175
 
162
176
  typert 生成器只认工作区内已注册协议包里的 `Remote`/`TypertRemoteService` 声明,所以
163
- `packages/typert-protocol` 内嵌了 npm 上 `@deepseek-ai/dsh-typert-protocol@0.1.1-rc.2` 的
177
+ `packages/typert-protocol` 内嵌了 npm 上 `@deepseek-ai/dsh-typert-protocol@0.1.2-alpha.5` 的
164
178
  声明文件;dsh 依赖线升级时,从安装包重新刷新它。
165
179
 
166
180
  发布(bundle 与两个插件包统一版本号;`prepublishOnly` 会自动跑 `verify` 门禁)。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rayadesu/dsh-billing",
3
- "version": "0.3.5",
3
+ "version": "0.3.7",
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": {
@@ -39,13 +39,13 @@
39
39
  "access": "public"
40
40
  },
41
41
  "peerDependencies": {
42
- "@rayadesu/dsh-client-ui-billing": "^0.3.5",
43
- "@rayadesu/dsh-llm-billing": "^0.3.5"
42
+ "@rayadesu/dsh-client-ui-billing": "^0.3.7",
43
+ "@rayadesu/dsh-llm-billing": "^0.3.7"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@deepseek-ai/cordis": "^4.0.1",
47
- "@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
48
- "@deepseek-ai/dsh-typert-generator": "^0.1.1-rc.2",
47
+ "@deepseek-ai/dsh-invariants": "^0.1.2-alpha.5",
48
+ "@deepseek-ai/dsh-typert-generator": "^0.1.2-alpha.5",
49
49
  "@types/node": "^22.20.0",
50
50
  "jsdom": "29.1.1",
51
51
  "lightningcss": "^1.32.0",
Binary file