Repository navigation
v1.0.0
v1.0.0
首个正式版本。把 qq-bridge 的运维能力接进 DeepSeek Harness 的工具面。
本代码由 AI 生成。非常感谢 Derpyu520 开发了 qq-bridge —— 没有它这个插件没有任何意义。
这个版本能做什么
装好之后,你可以直接问 AI"机器人余额多少""现在什么状态",不用再去翻日志。 管理员还能在 QQ 里发 #功能 balance off 关掉某项查询能力,改完立刻生效,不用编辑文件也不用重启。
- qqbridge 工具,9 个 action:
status/balance/schedule/holidays/greeting/commands/config/features/firstRun - QQ 内开关:
#帮助列出命令,#功能查看开关,#功能 <键> 开/关修改,#功能 reset复位 - 按 DeepSeek 计费峰谷显示推理档位,可试算任意时刻属于高峰还是空闲
- 节假日表体检,缺年份时可现场抓取国务院通知试算(不写回配置)
- 首次运行引导,以及装配自检
state/plugin-apply.json
安装
前置
- Node.js ≥ 18
- 已装好 DeepSeek Harness(至少启动过一次,否则 profile 目录还不存在)
- 已装好 qq-bridge(本插件直接
import它的纯模块并调它的端点)
从源码装(推荐)
Windows
git clone https://github.com/xueyingneko/qqbridge-plus.git "%USERPROFILE%\dsh-plugins\qqbridge-plus"
node "%USERPROFILE%\dsh-plugins\qqbridge-plus\scripts\install.mjs" --dir "%USERPROFILE%\dsh-plugins\qqbridge-plus"Linux / macOS
git clone https://github.com/xueyingneko/qqbridge-plus.git ~/dsh-plugins/qqbridge-plus
node ~/dsh-plugins/qqbridge-plus/scripts/install.mjs --dir ~/dsh-plugins/qqbridge-plus第一次建议先加 --dry-run 看一眼它要改什么。安装器会先备份 profile 文件,且可重复执行(幂等)。
从本 Release 的 tgz 装
tar -xzf dsh-plugin-qqbridge-plus-1.0.0.tgz
node package\scripts\install.mjs --dir "%CD%\package" --bridge-dir "D:\path\to\qq-bridge"如果 qq-bridge 不在插件目录隔壁,任何方式都需要加 --bridge-dir 指定路径。
改完 profile 配置必须重启 DSH 才会装配。
版本与校验
CI runs only the two suites that do not need qq-bridge — a CI that always fails is worse than none.
Known limitations
- The inbound QQ message path was not exercised in the development environment (no way to send QQ messages on the author's behalf). Please verify
#功能/#帮助yourself; if there is no reply, the bridge log lines starting with功能开关命令:/帮助命令:will point at the failing step. - The DSH settings panel is read-only (see rule 2 above). Change switches through QQ commands or the profile's
cordis.patch.yml. - A corrupt state file, an unreachable bridge or a missing token all produce a clear message and degrade gracefully; none of them prevent the plugin from loading.
License
MIT. Third-party components and compliance boundaries (including the SnowLuma license discussion and the data-egress list) are in the second half of LICENSE.
v1.0.0 首个正式版本。把 [qq-bridge](https://github.com/Derpyu520/qq-bridge) 的运维能力接进 DeepSeek Harness 的工具面。本代码由 AI 生成。非常感谢 Derpyu520 开发了 qq-bridge —— 没有它这个插件没有任何意义。
这个版本能做什么
装好之后,你可以直接问 AI"机器人余额多少""现在什么状态",不用再去翻日志。 管理员还能在 QQ 里发 #功能 balance off 关掉某项查询能力,改完立刻生效,不用编辑文件也不用重启。
qqbridge 工具,9 个 action:status / balance / schedule / holidays / greeting / commands / config / features / firstRun
QQ 内开关:#帮助 列出命令,#功能 查看开关,#功能 <键> 开/关 修改,#功能 reset 复位
按 DeepSeek 计费峰谷显示推理档位,可试算任意时刻属于高峰还是空闲
节假日表体检,缺年份时可现场抓取国务院通知试算(不写回配置)
首次运行引导,以及装配自检 state/plugin-apply.json
安装
前置
Node.js ≥ 18
已装好 DeepSeek Harness(至少启动过一次,否则 profile 目录还不存在)
已装好 qq-bridge(本插件直接 import 它的纯模块并调它的端点)
从源码装(推荐)
Windows
bat
git clone https://github.com/xueyingneko/qqbridge-plus.git "%USERPROFILE%\dsh-plugins\qqbridge-plus"
node "%USERPROFILE%\dsh-plugins\qqbridge-plus\scripts\install.mjs" --dir "%USERPROFILE%\dsh-plugins\qqbridge-plus"
Linux / macOS
bash
git clone https://github.com/xueyingneko/qqbridge-plus.git ~/dsh-plugins/qqbridge-plus
node ~/dsh-plugins/qqbridge-plus/scripts/install.mjs --dir ~/dsh-plugins/qqbridge-plus
第一次建议先加 --dry-run 看一眼它要改什么。安装器会先备份 profile 文件,且可重复执行(幂等)。
从本 Release 的 tgz 装
bat
tar -xzf dsh-plugin-qqbridge-plus-1.0.0.tgz
node package\scripts\install.mjs --dir "%CD%\package" --bridge-dir "D:\path\to\qq-bridge"
如果 qq-bridge 不在插件目录隔壁,任何方式都需要加 --bridge-dir 指定路径。
改完 profile 配置必须重启 DSH 才会装配。
版本与校验
包名 dsh-plugin-qqbridge-plus@1.0.0
文件 dsh-plugin-qqbridge-plus-1.0.0.tgz(18 个文件,58.5 KB / 解压 160.9 KB)
SHA-256 08975ca685b4bafcbdf200506ea48453dcfd071917b1bc74749657ca43ccc045
integrity(npm) sha512-dMAJld7glOnvtASlE74zeTSCYA9b7EfzSEwf6VWQ5v7BO6zCsmJCIniFSH8ZAQuse9P4BrJj65sqfusBpKxlHQ==
shasum(npm,SHA-1) dca10165915fbf9ac9483eb837bddc3bb12b64e3
注意别混:npm 的 shasum 字段是 SHA-1(40 位),而校验下载完整性应该用上表那个 SHA-256(64 位)。下面两条命令算的都是 SHA-256。
校验下载是否完整:
bash
Linux / macOS
shasum -a 256 dsh-plugin-qqbridge-plus-1.0.0.tgz
Windows PowerShell
(Get-FileHash dsh-plugin-qqbridge-plus-1.0.0.tgz -Algorithm SHA256).Hash.ToLower()
设计取舍
判定逻辑一行都没有重写。计费峰谷、节假日解析、唤醒过滤、余额告警全部直接 import qq-bridge 自己的纯模块,插件只负责取数与拼文本。
这么做是因为 qq-bridge 才是 QQ 侧的权威:SnowLuma 连接、白名单、会话映射、计时器都在它 进程里。判定逻辑再写一份出来,两份迟早会对不上。开发中真撞到过一次:余额读到 NaN 时, 一边判成 recovered、另一边判成 none,而这一步会直接决定要不要关机。
写进 README 的三条硬规则,都是踩出来的:
inject 必须列出所有会被访问的服务(否则 cordis 抛错,而插件管理器只报 did not activate,不给原因)
不要导出普通对象当 Config;也不要给任何字段标 volatile —— 实测 loader 会把带 volatile 的字段求值成 {},在设置页点保存即损坏配置,所以设置面板刻意做成只读
defineTool 要用模块顶层的静态导入(曾用运行时动态 import 加 7 条回退路径,出现 "某条路径报成功但 .then 永不执行",不报错也不进 catch,工具永远不注册)
测试
套件 项数
插件侧(npm test) 52 + 21
桥接侧纯函数(需 qq-bridge) 28
端到端(需两端都在运行) 10
CI 只跑不依赖 qq-bridge 的那两套 —— 一个必然失败的 CI 不如没有 CI。
已知边界
入站 QQ 消息路径未在开发环境实测(无法代发 QQ 消息)。#功能 / #帮助 的实际收发请自行验证; 若没反应,桥接日志里 功能开关命令: / 帮助命令: 开头的记录会指出卡在哪一环。
DSH 设置页面板只读。原因见上面第 2 条。改开关请用 QQ 命令或 profile 的 cordis.patch.yml。
状态文件损坏、桥接未运行、令牌读不到等情况都会明确报错并降级,不会让插件起不来。
许可
MIT。第三方组件与合规边界 (含 SnowLuma 许可说明、数据出机清单)见 LICENSE 后半部分。
v1.0.0 — English
First release. Brings qq-bridge's capabilities into the DeepSeek Harness tool surface.
This code was generated by AI. Many thanks to Derpyu520 for building qq-bridge — without it this plugin would have no reason to exist.
What's in it
Ask the AI "what's the bot's balance?" or "what state is it in?" instead of digging through logs. The admin can send #功能 balance off in QQ to turn a query off, effective immediately, with no file editing and no restart.
qqbridge tool with 9 actions: status / balance / schedule / holidays / greeting / commands / config / features / firstRun
QQ-side toggles: #帮助 lists commands, #功能 shows the switches, #功能 on/off changes one, #功能 reset clears runtime overrides
Reasoning tier per DeepSeek billing peak/off-peak, with a dry run for any timestamp
Holiday table health check, on-demand parse of the State Council notice (never written back)
First-run guidance, plus an assembly self-check at state/plugin-apply.json
Install
Requirements
Node.js ≥ 18
DeepSeek Harness installed, and started at least once (otherwise the profile directory does not exist yet)
qq-bridge installed — the plugin imports its pure modules and calls its endpoints
From source (recommended)
Windows
bat
git clone https://github.com/xueyingneko/qqbridge-plus.git "%USERPROFILE%\dsh-plugins\qqbridge-plus"
node "%USERPROFILE%\dsh-plugins\qqbridge-plus\scripts\install.mjs" --dir "%USERPROFILE%\dsh-plugins\qqbridge-plus"
Linux / macOS
bash
git clone https://github.com/xueyingneko/qqbridge-plus.git ~/dsh-plugins/qqbridge-plus
node ~/dsh-plugins/qqbridge-plus/scripts/install.mjs --dir ~/dsh-plugins/qqbridge-plus
Add --dry-run the first time to see what it would change. The installer backs up profile files before editing and is idempotent.
From the tgz attached to this release
bat
tar -xzf dsh-plugin-qqbridge-plus-1.0.0.tgz
node package\scripts\install.mjs --dir "%CD%\package" --bridge-dir "D:\path\to\qq-bridge"
If qq-bridge is not next to the plugin, pass --bridge-dir in every case.
DSH must be restarted after the profile config changes.
Packaging and checksums
Package dsh-plugin-qqbridge-plus@1.0.0
File dsh-plugin-qqbridge-plus-1.0.0.tgz (18 files, 58.5 KB / 160.9 KB unpacked)
SHA-256 08975ca685b4bafcbdf200506ea48453dcfd071917b1bc74749657ca43ccc045
integrity (npm) sha512-dMAJld7glOnvtASlE74zeTSCYA9b7EfzSEwf6VWQ5v7BO6zCsmJCIniFSH8ZAQuse9P4BrJj65sqfusBpKxlHQ==
shasum (npm, SHA-1) dca10165915fbf9ac9483eb837bddc3bb12b64e3
Do not mix these up: npm's shasum field is SHA-1 (40 chars), while verifying a download should use the SHA-256 value above (64 chars). Both commands below compute SHA-256.
bash
Linux / macOS
shasum -a 256 dsh-plugin-qqbridge-plus-1.0.0.tgz
Windows PowerShell
(Get-FileHash dsh-plugin-qqbridge-plus-1.0.0.tgz -Algorithm SHA256).Hash.ToLower()
Design trade-offs
None of the decision logic is re-implemented. Billing peak/off-peak, holiday parsing, wake filtering and balance alerts are imported straight from qq-bridge's own pure modules; the plugin only fetches data and formats text.
The reason is that qq-bridge is the authority on the QQ side: the SnowLuma connection, allowlists, session mapping and timers live in its process. A second copy of the decision logic would drift, and during development it actually did — with a NaN balance one side judged recovered while the other judged none, and that is the branch that decides whether to shut the bot down.
Three hard rules, all learned the hard way (details in the README):
inject must list every service you will touch, otherwise cordis throws and the plugin manager only reports did not activate, with no reason.
Do not export a plain object as Config, and do not mark any field volatile — measurement showed the loader evaluates volatile fields into {}, so pressing Save in the settings panel would corrupt the config. The settings panel is read-only by design.
defineTool must be a top-level static import. A runtime dynamic import() with 7 fallback paths produced a path that reported success while the .then() never ran — no throw, no catch, and the tool was never registered.
Tests
Suite Count
Plugin side (npm test) 52 + 21
Bridge pure functions (needs qq-bridge) 28
End-to-end (both sides running) 10
CI runs only the two suites that do not need qq-bridge — a CI that always fails is worse than none.
Known limitations
The inbound QQ message path was not exercised in the development environment (no way to send QQ messages on the author's behalf). Please verify #功能 / #帮助 yourself; if there is no reply, the bridge log lines starting with 功能开关命令: / 帮助命令: will point at the failing step.
The DSH settings panel is read-only (see rule 2 above). Change switches through QQ commands or the profile's cordis.patch.yml.
A corrupt state file, an unreachable bridge or a missing token all produce a clear message and degrade gracefully; none of them prevent the plugin from loading.
License
MIT. Third-party components and compliance boundaries (including the SnowLuma license discussion and the data-egress list) are in the second half of LICENSE.