dsh-balance-sentinel 0.1.2 → 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/CHANGELOG.md +49 -0
- package/README.en.md +6 -5
- package/README.md +6 -5
- package/client.js +261 -54
- package/index.js +6 -1
- package/lib/balance.js +51 -9
- package/lib/localapi.js +28 -3
- package/lib/notify.js +28 -6
- package/lib/state.js +65 -16
- package/locale/en.json +13 -3
- package/locale/zh.json +11 -1
- package/package.json +1 -1
- package/scripts/selftest-client.mjs +479 -15
- package/scripts/selftest.mjs +454 -10
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,53 @@
|
|
|
3
3
|
All notable changes to this project are documented here. Format follows
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/); versions follow [SemVer](https://semver.org/).
|
|
5
5
|
|
|
6
|
+
## [0.1.5] - 2026-11-20
|
|
7
|
+
|
|
8
|
+
### Changed
|
|
9
|
+
|
|
10
|
+
- **首次进入不再自动展开配置表单**:未配置推送通道时由顶部横幅(「监控中,通知未接通」+「现在配置」)说明并引导,表单只在点击后出现。此前进入面板即摊开一个空表单,与横幅说的是同一件事,且点「刷新」会把用户已经关掉的表单再次弹出;表单内重复的空态说明一并去掉,未配置时该卡片的入口按钮从「仅保存」改为「配置推送」(它本来也只是打开表单,并未保存任何东西;文案与同作者的 dsh-aihot-radar 对齐,横幅 CTA 仍为「现在配置」);同时未配置的表单也有了「取消」,点开看一眼或误点都能退出,不提交任何内容。
|
|
11
|
+
- **署名与安装尾注改为默认关闭**:低余额告警、恢复通知和测试推送在未显式开启时不再附带任何推广尾注,推送内容只讲余额。`notify.signature` 现在保留「未设置 / `true` / `false`」三态——不设默认值,避免宿主配置库把未填写补成 `false`、连带丢弃只配了 `signatureText` 的老用户的自定义尾注;只写 `signatureText` 视为开启,`signature: false` 优先于它。面板推送卡片新增「附上插件安装链接」勾选框(默认关闭,写入状态文件,不用改 YAML),`/status` 与发送端都按合并后的实际状态执行。README 中英示例配置同步为 `signature: false` 并说明三态。
|
|
12
|
+
- **推送卡片收紧为「一行一件事」**:地址与测试时间合并成 `open.feishu.cn · 11:31:49`(成功/失败已由标题右侧徽章表达,不再重复写「最近测试成功:」),失败原因单独一行,「低余额/恢复通知将推送到这里,保存即生效,无需重启」移到配置表单底部(那里才在解释保存行为)。安装链接开关保留自己一行并带完整说明「附上安装链接(默认关闭,开启后告警尾部会多一行署名)」,动作按钮仍在其下方左对齐,且「修改」与「发送测试推送」改用同一按钮样式(不再一实一描边);配置表单里开关与按钮之间补了 10px 间距。摘要态由 6 行减到 4 行。
|
|
13
|
+
- **告警标题带上插件名**:`余额哨兵 · DeepSeek 余额告急/预警/告警已解除/已恢复`。尾注默认关闭后,被转发到群里的卡片仍需能自解释来源,前缀足够短,不会被 IM 标题截断。
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- **尾注开关不再被旧实例改回**:`notify` 之前不在状态合并与写入保护里,面板关掉尾注后,另一个仍持有旧内存的实例只要保存一次常规状态(如余额),磁盘就会被写回「跟随配置」,等于把开关重新打开。现在读取合并(`mergeStateFromDisk`)会采纳磁盘值,写入(`SECTIONS`)把 `notify` 当作面板独占字段——不拥有它的保存方一律沿用文件内容,开启与关闭两个方向都成立。
|
|
18
|
+
- **取消编辑后「修改」按钮不再留一圈亮边**:表单里的「关闭推送」与摘要态的「修改」在按钮行中同处一个位置,React 复用同一个 DOM 节点;「关闭推送」额外用 `borderColor` 覆盖描边颜色,回到摘要态时该覆盖被清除,复用的按钮失去自己的内联描边色、退回 `currentColor`(再叠加品牌色 hover 规则就是一圈亮蓝描边),看起来像还停在选中态。该按钮改用 `border` 简写声明描边;面板内按钮的 hover 不再改描边色,焦点环只留给键盘(`:focus-visible`),鼠标点击不残留。
|
|
19
|
+
- **迟到的 `/status` 不再改回开关**:面板保存尾注开关成功后递增配置版本,保存之前发出的轮询响应整体丢弃(与保存 Webhook 同一规则),复选框不会在用户眼前跳回旧值。
|
|
20
|
+
- **旧查询不再覆盖新余额**:两个实例(或 poke 与在途轮询)的查询可能反序返回。轮询结果现在以「查询发起时刻」为序落地:拿到锁并合并磁盘状态后,若已记录的结论发起得不早于本轮(含同一毫秒的平局),整轮结果直接丢弃——不回写余额、不改告警等级、不触发推送,也不写盘。时间戳只有毫秒精度,两个实例可能在同一毫秒发起查询,此时谁先落盘谁就代表面板已展示的事实,宁可少落一次也不回滚。
|
|
21
|
+
- **丢弃旧响应后仍会自动轮询**:上一版的早退 `return` 跳过了周期末尾的 `setTimeout`,被丢弃的那台实例会就此停摆,只能靠手动刷新唤醒。定时器改为在 `finally` 里重排,任何提前返回(旧响应、停止时竞态)都不会让实例静默停转。
|
|
22
|
+
- **损坏的锁不再永久阻塞**:锁文件不可读(创建后未写完、写入被截断)此前一律无法接管,等于此后所有实例都不再写入和推送。锁龄现在优先取心跳时间戳、读不到时退回文件 mtime,只有「不可读且超过 TTL」才接管;刚创建尚未写完的锁与仍有效的锁都不会被抢,一直被占的写方靠 token 校验自动放弃。接管守卫文件损坏时同样按 mtime 自愈。
|
|
23
|
+
- **停止监控后不再发送**:`stop()` 发生在查询在途时,返回的余额此前仍会走完判定并推送。现在查询返回后先校验停止标志,已停止则本轮既不落盘也不推送。
|
|
24
|
+
- **失败轮询不再把旧余额当当前余额发送**:本轮查询失败时 `balance.ok` 为 false,此前待发告警仍会带着上一次的数字发出去。现在告警保留在待发槽里,等下一次查询成功、按新余额重新判定后再发。
|
|
25
|
+
- **宿主未登录时 API Key 回退恢复**:`signed-out` 此前会短路返回,即使配置了 Key 也走不到备用接口,与 README「否则用 `DEEPSEEK_API_KEY` 或 `balance.apiKey`」相违。现在只有「没有 Key」才报未登录;两者都不可用时面板文案改为「未登录且无可用 Key」,并写明登录与配置 Key 两条路径。
|
|
26
|
+
- **通知来源更正**:Bark 的 `group` 与通用 Webhook 的 `source` 从 `aihot-radar` 改为 `balance-sentinel`。
|
|
27
|
+
|
|
28
|
+
### Tests
|
|
29
|
+
|
|
30
|
+
- `node scripts/selftest.mjs`:79 passed / 0 failed。本轮新增 12 条:C1-C4 覆盖锁恢复(过期且不可读可接管、刚创建的空锁与心跳新鲜的锁不得被抢、可读但超 TTL 仍可接管);R1 让两个实例反序返回(先发后答 vs 后发先答)断言旧结果不推送、不回写余额、不改等级;R1b 用 1s 轮询下限(测试专用环境变量 `SENTINEL_POLL_FLOOR_SEC`,生产仍是 60s)验证被丢弃的一轮之后仍会自动跑下一轮;R1c 冻结 `Date.now` 制造同毫秒平局,断言已接受的 ¥30 不会回滚成 ¥3、不告警,且该轮标记为 stale;R2 在查询在途时停止监控,断言返回后不推送不落盘;R3 断言查询失败时待发告警保留、下一次成功查询后才发出;S10/S11 覆盖宿主未登录时走 REST Key、Key 被拒时如实报 `unauthorized`;F6 断言 Bark `group` 与通用 Webhook `source` 均为 `balance-sentinel`。另外仍覆盖三种署名情况——默认关闭(默认测试消息、`critical`/`warn` 告警、`recovered` 恢复通知正文均无 `安装:`、安装 spec 与仓库地址)、显式开启(`signature: true` 正常附上尾注,Feishu 走 `lark_md` note,纯文本通道只留标签)、显式关闭(`signature: false` 即使带 `signatureText` 也不附带)。F1b 断言四类标题都以「余额哨兵 · 」开头且保留告急/预警/恢复/解除字样;F4 先用源码断言 `notify.signature` 不带任何默认值,再在装有宿主 Schema 包时用真实配置解析验证 `{ notify: { signatureText } }` 解析后 `signature` 仍为 `undefined`、未配置解析为空即关闭、显式 `false`/`true` 各自生效(未安装该包时打印 SKIP,只跑源码断言);F5 覆盖面板覆盖值与 `null`(跟随配置)的合并;B6b/B6c 起本地 hook 抓桥接真实 POST 的 `/test-push` 正文,默认无尾注、`signature: true` 有尾注,并验证 `POST /notify` 后 `/status` 与发送内容同步翻转、关回去也生效。
|
|
31
|
+
- `node scripts/selftest-client.mjs`:39 passed / 0 failed(P35:面板开关默认未勾选、勾选后发出 `signature: true`、再由服务端回填为勾选态、取消勾选可回到关闭;P37:旧 `/status` 返回后复选框不得跳回旧值;P38:「关闭推送」不得引入 `borderColor` 覆盖、取消后「修改」仍自带描边、hover 规则不得把描边刷成品牌色、键盘焦点仍有焦点环)。
|
|
32
|
+
- 针对上述两个合并点的有效性验证:M15 使用真实临时状态文件,分别以 `false`/`true` 让面板实例写一次、再让「仍持有跟随配置值」的实例只保存 `alert`,断言磁盘值不变;再断言 `mergeStateFromDisk` 会采纳磁盘值。单独移除写入保护时 M15 报 `a routine save must not overwrite false`,单独移除读取合并时报 `mergeStateFromDisk must adopt false`。P37 移除配置版本递增后报 `a stale /status turned the footer switch back off`。
|
|
33
|
+
- 本轮六项修复的有效性验证(逐项回退修复后跑同一套回归):去掉「已记录结论更晚」的比较后 R1 报 `a superseded reading must not push`;去掉停止标志检查后 R2 报 `a stopped monitor must not push what an old query returned`;去掉 `balance.ok` 守卫后 R3 报 `the old number must not be sent as the current balance`;把 `signed-out` 重新放回短路条件后 S10/S11 同时失败;锁接管条件改回「读不到就放弃」后 C1 报 `an expired unreadable lock must not block forever`,改成「见锁就抢」后 C3 报 `a live lock with a fresh heartbeat is never taken over`;比较改回严格大于后 R1c 报 `a tie must not push`(余额从 ¥30 回落到 ¥3 并告急);定时器移回 `finally` 之外后 R1b 报 `the dropped cycle must still re-arm the poll (calls: 1)`。
|
|
34
|
+
- 打包产物检查(本轮):`npm pack` 解包后从 tarball 内 import 并执行 6 项检查,6/6 通过 —— 未登录 + Key 走 REST、`balance.ok=false` 时 `deliverPending` 返回 null 且保留 pending、Bark `group` 与通用 `source` 正确、过期且不可读的锁可恢复而新锁不被抢、`client.js` 与 `locale/*.json` 已随包、打包副本可正常读写状态。
|
|
35
|
+
- 打包产物检查(署名改动):对 `npm pack` 的 tarball 解包后直接 import 包内 `lib/notify.js` 与 `lib/balance.js`(不读工作区源码),14/14 通过 —— `index.js` 里 `notify.signature` 无默认值、`signatureLine({})` 为空、`signatureEnabled({ signatureText })` 为真、面板覆盖优先于配置、默认测试消息与 `critical`/`warn`/`recovered` 正文均不含尾注、三类告警标题均以「余额哨兵 · 」开头、显式开启时正常附上。
|
|
36
|
+
- LPM 的报告针对 0.1.2,本次改动未经重新扫描,不能据此认为相关拦截已解除。
|
|
37
|
+
|
|
38
|
+
## [0.1.3] - 2026-11-18
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
|
|
42
|
+
- **限流不再被当成测试失败**:测试请求返回 429(「操作太频繁」)时,面板只提示这句话,不再把没有结果对象的响应当成一次测试结论。此前这类被拒绝的请求会把徽章从「最近测试成功」改成红色失败,抹掉上一次真实结果。
|
|
43
|
+
- **旧轮询不再覆盖更新的状态**:先发出、后返回的 `/status` 在新测试失败或新 Webhook 保存之后落地时,整份过期响应直接丢弃——不会再把失败徽章改回旧的成功,也不会把面板退回旧地址;首次配置时也不会再因此重新弹出已关闭的配置表单。
|
|
44
|
+
- **单独点「发送测试推送」不再与徽章打架**:接口返回失败时,面板立即按响应更新当前通道的徽章与持久化提示,不再等下一次轮询(此前会同时显示「最近测试失败」和旧的「最近测试成功」)。属于其他通道或比当前更旧的结果不会被应用。
|
|
45
|
+
- **旧通道的未落盘结果不再清空新通道的有效记录**:合并改为先按当前通道过滤、再比较时间,避免「较新的旧通道结论先按时间胜出、随后因通道不匹配被丢弃」,连带把磁盘里那条可用记录一起丢掉;读取合并与常规保存两条路径都受影响。
|
|
46
|
+
- **浅色模式下文字太淡**:余额数字改为按皮肤取色(浅色 `#9c5c00` / `#c62828` / `#1f7a35`,白底约 5:1),徽章、错误块与失败原因改用向标签色混合的墨水,不再直接使用白底上约 2:1 的橙色。
|
|
47
|
+
- **「已配置,待测试」不再是一枚灰徽章**:四态各有自己的色 —— 未配置用次要灰、待测试用品牌蓝、最近测试成功用绿、最近测试失败用红;通道前的圆点与徽章同色,并带一圈淡光晕,不靠单一色相也能分辨。失败说明改用与错误块相同的混色墨水,避免宿主把 error 令牌调成粉色后 11.5px 处看不清。
|
|
48
|
+
|
|
49
|
+
### Changed
|
|
50
|
+
|
|
51
|
+
- **面板跟随宿主深浅色**:读取 `body[data-ds-dark-theme]`(DSH 自身与 dsh-context 使用的同一约定),浅色皮肤换用白色卡片、细描边与宿主一级投影,深色皮肤保持原来的层级底色。卡片/徽章/浮层/错误块的底色改用 `color-mix()` 从 `--dsw-alias-*` 派生,不再使用只在深色下校准过的 `rgba()`;原生下拉菜单的 `colorScheme` 与告警红字也按皮肤切换,不再依赖 `prefers-color-scheme`。徽章文字改为把语义色向标签色混合,浅色卡片上不再发白。
|
|
52
|
+
|
|
6
53
|
## [0.1.2] - 2026-11-17
|
|
7
54
|
|
|
8
55
|
### Fixed
|
|
@@ -54,5 +101,7 @@ All notable changes to this project are documented here. Format follows
|
|
|
54
101
|
- README 面板截图前置、补「先看三行」要点;适用范围与免 Key 边界并入安装节,不再单列小节。
|
|
55
102
|
- GitHub About 描述收紧为一句:低余额推送 + 本机运行边界。
|
|
56
103
|
|
|
104
|
+
[0.1.5]: https://github.com/liancheng2020/dsh-balance-sentinel/releases/tag/v0.1.5
|
|
105
|
+
[0.1.3]: https://github.com/liancheng2020/dsh-balance-sentinel/releases/tag/v0.1.3
|
|
57
106
|
[0.1.2]: https://github.com/liancheng2020/dsh-balance-sentinel/releases/tag/v0.1.2
|
|
58
107
|
[0.1.0]: https://github.com/liancheng2020/dsh-balance-sentinel/releases/tag/v0.1.0
|
package/README.en.md
CHANGED
|
@@ -32,19 +32,19 @@ dsh plugin --profile web add github:liancheng2020/dsh-balance-sentinel
|
|
|
32
32
|
# or npm (published to npm alongside each Release)
|
|
33
33
|
dsh plugin --profile web add dsh-balance-sentinel
|
|
34
34
|
# or the pinned Release tarball
|
|
35
|
-
dsh plugin --profile web add https://github.com/liancheng2020/dsh-balance-sentinel/releases/download/v0.1.
|
|
35
|
+
dsh plugin --profile web add https://github.com/liancheng2020/dsh-balance-sentinel/releases/download/v0.1.5/dsh-balance-sentinel-0.1.5.tgz
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
Any one of the three is enough; if the npm/Release line is not live yet, use the first. Desktop app: Settings → Plugins → add `dsh-balance-sentinel` or `github:liancheng2020/dsh-balance-sentinel`. Restart DSH once.
|
|
39
39
|
|
|
40
40
|
**Where it runs**: local DSH desktop or local web host only — monitoring lives in the DSH process and **stops when DSH exits** (reopening resumes from the local state file); **no remote web panel** (the bridge binds `127.0.0.1:17430` and only accepts pages from this machine). **Key-free host accounts are supported**: the host must expose the account service with a signed-in account (key-free ≠ account-free); otherwise use `DEEPSEEK_API_KEY` or `balance.apiKey` — with neither, the panel states the exact reason.
|
|
41
41
|
|
|
42
|
-
> Current version `0.1.
|
|
42
|
+
> Current version `0.1.5` (see [CHANGELOG](CHANGELOG.md)).
|
|
43
43
|
|
|
44
44
|
## First use (two steps)
|
|
45
45
|
|
|
46
46
|
1. Open the **Balance Sentinel** panel: your real balance immediately, or a clear reason (signed out / no account service / network…).
|
|
47
|
-
2.
|
|
47
|
+
2. Click **Set it up**, pick a channel, paste the webhook (auto-detected) → **Save and send test**. The Feishu/DingTalk form includes "How to get a bot webhook": official doc + three-step path + the security settings that channel supports. **Until a channel is saved it watches without pushing**.
|
|
48
48
|
|
|
49
49
|
Saving only gets you to "configured, not tested"; the badge turns into "last test succeeded" once a test push actually lands, and into "last test failed" (with the reason and time) when it does not. Editing the channel or credentials clears the old result, so a stale "verified" can never pass for a working endpoint.
|
|
50
50
|
|
|
@@ -57,6 +57,7 @@ If the balance is already below a threshold when you connect, one current-state
|
|
|
57
57
|
- **Failures are traceable and retryable**: pending alerts persist; business failures back off 10 min and hold after 3 (manual retry in the panel); timeouts and dead response bodies are "delivery unconfirmed" — held immediately, never auto re-sent; a failed state save writes a fallback receipt, so restarts and multiple instances still do not re-send it (unconfirmed restores as held, never as sent). If neither the state nor the receipt can be written, the duplicate risk is logged explicitly.
|
|
58
58
|
- **No wedge, no duplicate across instances**: host queries have a 15s deadline and the scheduler survives any exception; desktop + web sharing `DSH_HOME` push each transition exactly once (whole-cycle lock + disk merge).
|
|
59
59
|
- **Channels**: WeCom / DingTalk / Feishu (card) / Bark / ServerChan / Telegram / generic webhook; auto-chunking; HTTP-200 business failures count as failures.
|
|
60
|
+
- **Follows the host skin**: the panel reads `data-ds-dark-theme`, so a light skin gets white cards, hairline borders and a soft shadow, with badges, toasts and native select menus switching with it.
|
|
60
61
|
- Balance is the **official account number**; v1 ships no cost estimates.
|
|
61
62
|
|
|
62
63
|
## Config (optional, profile cordis.patch.yml)
|
|
@@ -74,8 +75,8 @@ If the balance is already below a threshold when you connect, one current-state
|
|
|
74
75
|
quiet: { start: "", end: "" } # e.g. "23:00"–"08:00"
|
|
75
76
|
apiKey: "" # fallback for older hosts only
|
|
76
77
|
notify:
|
|
77
|
-
signature:
|
|
78
|
-
signatureText: ""
|
|
78
|
+
signature: false # off by default (same switch in the panel, no config edit needed); true appends the "via …" install line
|
|
79
|
+
signatureText: "" # custom text; setting only this also turns the footer on
|
|
79
80
|
localApi:
|
|
80
81
|
enabled: true # panel bridge on 127.0.0.1:17430
|
|
81
82
|
```
|
package/README.md
CHANGED
|
@@ -32,19 +32,19 @@ dsh plugin --profile web add github:liancheng2020/dsh-balance-sentinel
|
|
|
32
32
|
# 或 npm(随 Release 一同发布到 npm)
|
|
33
33
|
dsh plugin --profile web add dsh-balance-sentinel
|
|
34
34
|
# 或 Release 固定版本 tarball
|
|
35
|
-
dsh plugin --profile web add https://github.com/liancheng2020/dsh-balance-sentinel/releases/download/v0.1.
|
|
35
|
+
dsh plugin --profile web add https://github.com/liancheng2020/dsh-balance-sentinel/releases/download/v0.1.5/dsh-balance-sentinel-0.1.5.tgz
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
三条任选一条即可;若 npm/Release 那条还没上线,用第一条。桌面端:设置 → 插件 → 添加插件,填 `dsh-balance-sentinel` 或 `github:liancheng2020/dsh-balance-sentinel`。装完重启一次 DSH。
|
|
39
39
|
|
|
40
40
|
**适用环境**:仅本机 DSH Desktop/本机 Web,监控跑在 DSH 进程里、**退出即停**(重开从本机状态继续);**不支持远程 Web 面板**(桥接只绑 `127.0.0.1:17430`,只接受本机页面)。**支持宿主账号免填 Key**:宿主内置账号服务且已登录(免填 ≠ 无需账户),否则用 `DEEPSEEK_API_KEY` 或 `balance.apiKey`,都没有时面板给出明确原因。
|
|
41
41
|
|
|
42
|
-
> 当前版本 `0.1.
|
|
42
|
+
> 当前版本 `0.1.5`(见 [CHANGELOG](CHANGELOG.md))。
|
|
43
43
|
|
|
44
44
|
## 首次使用(两步接通)
|
|
45
45
|
|
|
46
46
|
1. 打开 **余额哨兵** 面板:立刻看到真实余额,或明确原因(未登录 / 无账号服务 / 网络…)。
|
|
47
|
-
2.
|
|
47
|
+
2. 点「现在配置」→「推送配置」选通道 → 粘 webhook(自动识别)→ **保存并发送测试**。飞书/钉钉框内有「如何获取机器人 Webhook」:官方链接 + 三步路径 + 该通道适用的安全设置。**没配通道前只监控不推送**。
|
|
48
48
|
|
|
49
49
|
保存成功只说明通道「已配置,待测试」,测试推送真的送达才会变成「最近测试成功」;失败则显示「最近测试失败」并附原因与时间。改通道或凭据后旧结果立即清除,不会有残留的「已验证」冒充接通。
|
|
50
50
|
|
|
@@ -57,6 +57,7 @@ dsh plugin --profile web add https://github.com/liancheng2020/dsh-balance-sentin
|
|
|
57
57
|
- **失败可追踪、可重试**:待发送告警持久化;业务失败 10 分钟退避、3 次后挂起可手动重试;超时等「送达不确定」立即挂起、不自动重发;状态保存失败时落盘备用回执,重启/多实例恢复后仍不重发(不确定的恢复为挂起,不标记成功)。状态与回执都无法落盘时会明确告警「去重无法保证」。
|
|
58
58
|
- **不卡死、多实例不重推**:宿主查询 15s 兜底,任何异常后调度继续;desktop + web 共享 `DSH_HOME` 时整周期锁 + 磁盘合并,同一跃迁只推一次。
|
|
59
59
|
- **通道**:企微 / 钉钉 / 飞书(消息卡片)/ Bark / Server酱 / Telegram / 通用 Webhook;超长自动分条;HTTP 200 但业务失败同样判失败。
|
|
60
|
+
- **跟随宿主深浅色**:面板读 `data-ds-dark-theme`,浅色皮肤用白卡片+细描边+轻投影,卡片、徽章、浮层与原生下拉菜单同步换色。
|
|
60
61
|
- 余额来自**官方账户同源**,v1 不做成本估算。
|
|
61
62
|
|
|
62
63
|
## 配置(可选,profile 的 cordis.patch.yml)
|
|
@@ -74,8 +75,8 @@ dsh plugin --profile web add https://github.com/liancheng2020/dsh-balance-sentin
|
|
|
74
75
|
quiet: { start: "", end: "" } # 免打扰,如 "23:00"–"08:00"
|
|
75
76
|
apiKey: "" # 仅老宿主回落用;优先宿主账号/环境变量
|
|
76
77
|
notify:
|
|
77
|
-
signature:
|
|
78
|
-
signatureText: ""
|
|
78
|
+
signature: false # 默认关闭(面板同一开关,不用改配置);改 true 才在推送尾部附署名与安装链接
|
|
79
|
+
signatureText: "" # 自定义署名文案;只填这里也视为开启
|
|
79
80
|
localApi:
|
|
80
81
|
enabled: true # 面板桥接 127.0.0.1:17430,可关
|
|
81
82
|
```
|