@linxin666/dsh-usage 0.4.10 → 0.4.12

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
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # node scripts/verify-docs.mjs --write <dir>
5
- README.md: 56545c0c2e7799499caa38f098d327663081e5bc
6
- README.zh.md: 7cf471e394a185355c98bb7f67b43fb3a4455e5c
5
+ README.md: f15c19eb47bc33821adfee3e31fa9c0171033340
6
+ README.zh.md: 967e408536e83e547231c6f778e120790f320b9d
package/README.md CHANGED
@@ -19,7 +19,7 @@ A dedicated token usage and cost monitoring plugin for DeepSeek Harness (DSH) We
19
19
 
20
20
  ## What it does
21
21
 
22
- The plugin runs a host-side service and a first-level settings section (使用统计, directly below the Workshop entry):
22
+ The plugin runs a host-side service and a Usage page under Settings → Web Extensions (or a standalone first-level 使用统计 section when that parent is absent):
23
23
 
24
24
  - **Usage tab (用量)**: today's token totals per bucket (input / output / cache read / cache write, disjoint as the provider reports them) with per-provider and per-model breakdown, the last 30 days as a horizontal provider/model bar chart, and the balance of every configured provider (one row per adapter family: a dormant catalog alias shadowed by the family's live route no longer renders its own balance row). A **day picker** switches that card to any retained day that recorded usage (today first, then the other days newest first) and the card then shows that day's own totals, provider rows, and estimated spend; the peak/off-peak line stays on today because it describes the pricing window now. The ledger folds live `session/event` streams (`request/header` route attribution plus `assistant/message` usage) into `$DSH_HOME/dsh-usage/usage-ledger.json` with day-based retention, so past days survive restarts; counting starts when the plugin is first enabled. For the official DeepSeek family the tab also shows the current peak/off-peak pricing period (Beijing weekdays 09:00-12:00 and 14:00-18:00 are peak, billed at double) and today's estimated spend in CNY; that line is toned by the current clock — red while peak, green while off-peak — and always carries the word plus a dot, so colour is never the only signal.
25
25
  - **Plans tab (个人套餐)**: coding-plan quota windows for every configured provider that exposes one — used percent and reset time per window (Kimi For Coding 5h/week, GLM Coding Plan 5h/week/month, OpenCode Go rolling/weekly/monthly, MiniMax 5h/week, Codex / ChatGPT subscription 5h/week). Providers without a real plan or subscription (DeepSeek, ZenMux, Moonshot, OpenRouter, SiliconFlow) never appear on this tab; their balance shows on the usage tab instead.
@@ -55,7 +55,7 @@ and insert into `cordis.patch.yml` (or use the bundle patch):
55
55
  name: '@linxin666/dsh-usage'
56
56
  ```
57
57
 
58
- Restart `dsh web` for the host half; the client half applies on refresh. The section lives in `Settings -> Usage Statistics`.
58
+ Restart `dsh web` for the host half; the client half applies on refresh. A full family install opens `Settings -> Web Extensions -> Usage`; a standalone install keeps `Settings -> Usage Statistics`.
59
59
 
60
60
  ## Configuration
61
61
 
package/README.zh.md CHANGED
@@ -19,7 +19,7 @@
19
19
 
20
20
  ## 功能
21
21
 
22
- 插件由宿主侧服务与设置页一级分区(使用统计,位于创意工坊下方)组成:
22
+ 插件由宿主侧服务与「设置 → Web 扩展 → 使用统计」页面组成(父级缺席时保留独立的一级「使用统计」分区):
23
23
 
24
24
  - **用量页签**:今日 token 分桶合计(输入 / 输出 / 缓存读 / 缓存写,按 provider 上报口径互不相加),分 provider 与模型细分,近 30 天以「提供方-模型」水平条形图展示,以及所有已配置 provider 的余额(同一适配器家族只渲染一行:被该家族运行时路由遮蔽的休眠目录别名不再单独出余额行)。卡片顶部的**日期选择器**可切换到保留期内任何有记录的一天(今日在最前,其余按新到旧排列),此时卡片展示该日自己的合计、分 provider 行与消费估算;峰谷计价时段行只跟随今日,因为它描述的是当前时段的计价。对 DeepSeek 官方路由,页签还展示当前峰谷计价时段(北京时间工作日 09:00-12:00、14:00-18:00 为高峰,按双倍计费)与今日消费估算(CNY);该时段行按当时钟点着色——高峰为红、空闲为绿,并始终带「高峰 / 空闲」文字与圆点,颜色不是唯一信号。台账从 `session/event` 实时流折叠(`request/header` 归因路由 + `assistant/message` 用量),持久化到 `$DSH_HOME/dsh-usage/usage-ledger.json`,按本地日保留,因此历史日重启后仍在;统计自插件首次启用起计。
25
25
  - **个人套餐页签**:每个已配置且暴露套餐端点的 provider 的配额窗口——已用百分比与重置时间(Kimi For Coding 5 小时/每周、GLM 编程计划 5 小时/每周/每月、OpenCode Go 滚动/每周/每月、MiniMax 5 小时/每周、Codex / ChatGPT 订阅 5 小时/每周)。没有真实套餐/订阅体系的厂商(DeepSeek、ZenMux、Moonshot、OpenRouter、SiliconFlow)不出现在此页签,其余额显示在用量页签。
@@ -55,7 +55,7 @@ pnpm add @linxin666/dsh-usage
55
55
  name: '@linxin666/dsh-usage'
56
56
  ```
57
57
 
58
- 宿主半区需要重启 `dsh web`;客户端半区刷新页面即生效。分区入口在 `设置 -> 使用统计`。
58
+ 宿主半区需要重启 `dsh web`;客户端半区刷新页面即生效。完整家族安装的入口在 `设置 -> Web 扩展 -> 使用统计`,独立安装时保留 `设置 -> 使用统计`。
59
59
 
60
60
  ## 配置
61
61