dsh-notify-tray 0.1.4 → 0.1.5

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.md CHANGED
@@ -27,19 +27,19 @@ A notification + status-bar plugin for DeepSeek Harness (DSH). Works on macOS, W
27
27
 
28
28
  The plugin is published on npm as [`dsh-notify-tray`](https://www.npmjs.com/package/dsh-notify-tray). Installing from npm needs nothing beyond DSH itself — no Git required.
29
29
 
30
- > **⚠️ To get the latest release, include the version number**, e.g. `dsh-notify-tray@0.1.4` (the latest version is listed on [npm](https://www.npmjs.com/package/dsh-notify-tray)).
30
+ > **⚠️ To get the latest release, include the version number**, e.g. `dsh-notify-tray@0.1.5` (the latest version is listed on [npm](https://www.npmjs.com/package/dsh-notify-tray)).
31
31
  > DSH installs plugins with pnpm, whose supply-chain policy (`minimumReleaseAge`) won't auto-install a release that is still inside its waiting period. With a bare `dsh-notify-tray` you may get an older version (e.g. 0.1.0). If an older version is already installed, remove it first, then install with the version number.
32
32
 
33
33
  **Option 1 — from inside DSH (recommended)**
34
- Open DSH **Plugins → Add plugin**, type `dsh-notify-tray@0.1.4` (with the version number) into the input box and click **Install**.
34
+ Open DSH **Plugins → Add plugin**, type `dsh-notify-tray@0.1.5` (with the version number) into the input box and click **Install**.
35
35
 
36
36
  **Option 2 — command line**
37
37
 
38
38
  ```sh
39
39
  # Desktop app (the dsh command bundled with the app); include the version to get the latest
40
- dsh plugin --profile desktop add dsh-notify-tray@0.1.4
40
+ dsh plugin --profile desktop add dsh-notify-tray@0.1.5
41
41
  # Or the web / CLI profile
42
- dsh plugin --profile web add dsh-notify-tray@0.1.4
42
+ dsh plugin --profile web add dsh-notify-tray@0.1.5
43
43
  ```
44
44
 
45
45
  **Option 3 — from the Git repository** (latest unreleased code)
@@ -54,7 +54,7 @@ Restart DSH after installing. The version on the plugin page is the one installe
54
54
  >
55
55
  > ```sh
56
56
  > dsh plugin --profile desktop remove dsh-notify-tray
57
- > dsh plugin --profile desktop add dsh-notify-tray@0.1.4
57
+ > dsh plugin --profile desktop add dsh-notify-tray@0.1.5
58
58
  > ```
59
59
  >
60
60
  > Also, when the official npm registry is unreachable, DSH falls back to the npmmirror registry, which syncs a little later, so a just-published release may take a few minutes to appear there.
@@ -63,7 +63,7 @@ To update: include the version here too — `dsh plugin --profile desktop remove
63
63
 
64
64
  ## Configuration
65
65
 
66
- Every option can be changed under DSH **Plugins → Whale Notify Station → Configure**, or written into the profile's `cordis.patch.yml`:
66
+ Every option can be changed on DSH's **Plugins → Whale Notify Station** page, or written into the profile's `cordis.patch.yml`. The page's first screen holds only the everyday options (which events notify, sound, the status-bar whale, a today's-spend card, your plan and its quota lookup); notification channel, spend method, custom prices, exchange rate and refresh intervals sit under a folded **Advanced** section at the bottom, tagged with how many of them you have changed.
67
67
 
68
68
  ```yaml
69
69
  - id: notify-tray
@@ -136,12 +136,12 @@ Built-in plan presets (prices are the list prices at the time of writing and may
136
136
  | GPT | ChatGPT Go / Plus / Pro 5x / Pro 20x / Business, API pay-as-you-go | No endpoint for regular keys |
137
137
  | MiniMax | M Plan Go / Explore / Build (CN ¥49 / 119 / 469, intl. $22 / 55 / 132), legacy Coding Plan | 5-hour window remaining `GET /v1/coding_plan/remains` |
138
138
 
139
- Anything that can't be fetched can be typed in by hand; empty fields are simply hidden. On macOS / Linux the status-bar menu gains a **Plan · name · price · remaining** row whose submenu shows balance, remaining quota, reset time, the raw details returned by the endpoint, a **Refresh quota** action and links to the usage / pricing pages.
139
+ Anything that can't be fetched can be typed in by hand; empty fields are simply hidden. On macOS / Linux the status-bar menu shows balance and plan on one row (**余额 ¥… · provider 剩 …**); its submenu lists the DeepSeek balance, plan name and price, remaining quota and reset time, a **Refresh quota** action and the usage page. The full details returned by the endpoint are on the settings page. The menu has one level of submenus, at most 6 rows each and 24 characters per row, so Windows / Linux trays no longer cut it off at the screen edge.
140
140
 
141
141
  ## Notes
142
142
 
143
143
  - **When notifications fire** — a task that runs to completion counts as *completed*; an error, hitting the token limit or being blocked counts as *failed*; stopping a task yourself doesn't notify. For `ask_user_question`, questions with options and plan approvals count as *needs a choice*, questions without options as *needs input*; tool approvals count as *needs approval*. Only top-level sessions are tracked — sub-agents don't get their own notifications.
144
- - **How spend is computed** — when signed in with a DeepSeek account, today's spend is accumulated from drops in the account balance (top-ups don't count as negative spend; the platform bills with a delay, so in `auto` the estimate stands in until the balance catches up). In parallel, it's estimated from each `provider/model` route's tokens × unit price (price sources described under `priceSource` above); the **Today's usage** submenu breaks it down per model. The ledger lives in `~/.dsh/storages/dsh-notify-tray/ledger.json` and keeps 31 days.
144
+ - **How spend is computed** — when signed in with a DeepSeek account, today's spend is accumulated from drops in the account balance (top-ups don't count as negative spend; the platform bills with a delay, so in `auto` the estimate stands in until the balance catches up). In parallel, it's estimated from each `provider/model` route's tokens × unit price (price sources described under `priceSource` above); the **Today** submenu breaks it down per model (top 3). The ledger lives in `~/.dsh/storages/dsh-notify-tray/ledger.json` and keeps 31 days.
145
145
  - **Clicking a notification / the status-bar icon / "Open DeepSeek Harness" in the menu** — brings up the desktop app when there is one, otherwise (`dsh web`) opens the web UI in the browser. Browser notifications require granting notification permission first.
146
146
 
147
147
  ## Development
package/README.zh-CN.md CHANGED
@@ -27,19 +27,19 @@ DeepSeek Harness(DSH)的通知 + 状态栏插件,支持 macOS、Windows、
27
27
 
28
28
  插件已发布到 npm:[`dsh-notify-tray`](https://www.npmjs.com/package/dsh-notify-tray)。从 npm 安装只需要 DSH 本身,**不需要装 Git**。
29
29
 
30
- > **⚠️ 想装最新版,请带上版本号**,例如 `dsh-notify-tray@0.1.4`(最新版本号见 [npm](https://www.npmjs.com/package/dsh-notify-tray))。
30
+ > **⚠️ 想装最新版,请带上版本号**,例如 `dsh-notify-tray@0.1.5`(最新版本号见 [npm](https://www.npmjs.com/package/dsh-notify-tray))。
31
31
  > DSH 用 pnpm 安装插件,pnpm 的供应链安全策略(`minimumReleaseAge`)不会自动安装刚发布、还没过观察期的版本,只写 `dsh-notify-tray` 时会退回装一个旧版本(例如 0.1.0)。已经装了旧版的,先卸载,再带版本号安装。
32
32
 
33
33
  **方式一:在 DSH 里装(推荐)**
34
- 打开 DSH「插件 → 添加插件」,输入框里填 `dsh-notify-tray@0.1.4`(带上版本号),点「安装」。
34
+ 打开 DSH「插件 → 添加插件」,输入框里填 `dsh-notify-tray@0.1.5`(带上版本号),点「安装」。
35
35
 
36
36
  **方式二:命令行**
37
37
 
38
38
  ```sh
39
39
  # 桌面版(App 内置的 dsh 命令),带上版本号才能装到最新版
40
- dsh plugin --profile desktop add dsh-notify-tray@0.1.4
40
+ dsh plugin --profile desktop add dsh-notify-tray@0.1.5
41
41
  # 或者 Web / 命令行 profile
42
- dsh plugin --profile web add dsh-notify-tray@0.1.4
42
+ dsh plugin --profile web add dsh-notify-tray@0.1.5
43
43
  ```
44
44
 
45
45
  **方式三:从 Git 仓库装**(想用还没发版的最新代码时)
@@ -54,7 +54,7 @@ dsh plugin --profile web add dsh-notify-tray@0.1.4
54
54
  >
55
55
  > ```sh
56
56
  > dsh plugin --profile desktop remove dsh-notify-tray
57
- > dsh plugin --profile desktop add dsh-notify-tray@0.1.4
57
+ > dsh plugin --profile desktop add dsh-notify-tray@0.1.5
58
58
  > ```
59
59
  >
60
60
  > 另外,官方 npm 源连不上时 DSH 会退到 npmmirror(淘宝镜像),镜像比官方源晚一点同步,刚发的新版可能要等几分钟才到。
@@ -63,7 +63,7 @@ dsh plugin --profile web add dsh-notify-tray@0.1.4
63
63
 
64
64
  ## 设置
65
65
 
66
- 所有选项都可以在 DSH「插件 → 小鲸鱼通知站 → 配置」里修改,也可以写在 profile 的 `cordis.patch.yml` 里:
66
+ 所有选项都可以在 DSH「插件 → 小鲸鱼通知站」页里修改,也可以写在 profile 的 `cordis.patch.yml` 里。设置页首屏只有常用的几项(通知勾选、提示音、状态栏小鲸鱼、今日花费卡片、我的套餐和额度查询);通知通道、花费算法、自定义单价、汇率、各种刷新间隔都在页面底部的「高级设置」里,默认折叠,改过的项会标「已改 n 项」。
67
67
 
68
68
  ```yaml
69
69
  - id: notify-tray
@@ -136,12 +136,12 @@ dsh plugin --profile web add dsh-notify-tray@0.1.4
136
136
  | GPT | ChatGPT Go / Plus / Pro 5x / Pro 20x / Business、API 按量 | 普通 Key 无接口 |
137
137
  | MiniMax | M Plan Go / Explore / Build(国内 ¥49 / 119 / 469,国际 $22 / 55 / 132)、旧版 Coding Plan | 5 小时窗口剩余 `GET /v1/coding_plan/remains` |
138
138
 
139
- 拿不到的信息就手填;留空也可以,留空的项不显示。macOS / Linux 的状态栏菜单里会多一行「套餐 · 名称 · 价格 · 剩余」,子菜单里有余额、剩余额度、重置时间、接口返回的明细、「刷新额度」和用量页 / 价格页链接。
139
+ 拿不到的信息就手填;留空也可以,留空的项不显示。macOS / Linux 的状态栏菜单里,余额和套餐合在一行「余额 ¥… · 平台 剩 …」,子菜单里有 DeepSeek 余额、套餐名和价格、剩余额度和重置时间、「刷新额度」和用量页链接;接口返回的完整明细在设置页里看。状态栏菜单只有一层子菜单,每个最多 6 行、每行不超过 24 个字,在 Windows / Linux 托盘里也不会被屏幕边缘截断。
140
140
 
141
141
  ## 说明
142
142
 
143
143
  - **通知的触发时机**:任务跑完算「完成」;出错、超出 Token 上限、被拦截算「失败」;你自己点停止不弹通知。调用 `ask_user_question` 时,带选项的问题和计划审批算「需要选择」,不带选项的算「需要输入」;工具审批算「需要批准」。只跟踪顶层会话,子 agent 不单独弹通知。
144
- - **花费怎么算**:用 DeepSeek 账户登录时,按账户余额的下降累计当天花费(充值不算负花费;平台扣费有延迟,`auto` 下余额没跟上时先按估算显示);同时按当天各「provider/model」的 Token 乘以单价估算(单价来源见上面的 `priceSource`),「今日用量」子菜单里按模型分行显示。账本存在 `~/.dsh/storages/dsh-notify-tray/ledger.json`,保留 31 天。
144
+ - **花费怎么算**:用 DeepSeek 账户登录时,按账户余额的下降累计当天花费(充值不算负花费;平台扣费有延迟,`auto` 下余额没跟上时先按估算显示);同时按当天各「provider/model」的 Token 乘以单价估算(单价来源见上面的 `priceSource`),「今日」子菜单里按模型分行显示(最多 3 个模型)。账本存在 `~/.dsh/storages/dsh-notify-tray/ledger.json`,保留 31 天。
145
145
  - **点击通知 / 状态栏图标 / 菜单里的「打开 DeepSeek Harness」**:有桌面版时唤起桌面版,没有时(`dsh web`)在浏览器里打开 Web 界面。浏览器里的通知需要先允许通知权限。
146
146
 
147
147
  ## 已知限制