dsh-qqbot-muu 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
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
| 🧠 **记得住人** | 两层记忆 + 类海马体检索,A 群的坏情绪不带去 B 群 |
|
|
33
33
|
| 💬 **说人话** | 人格与世界书注入,语气被日常一点点养出来 |
|
|
34
34
|
| 🖼 **会用表情包** | 本地视觉模型打标,情绪到位自己发一张 |
|
|
35
|
-
| 🐋 **桌宠** |
|
|
35
|
+
| 🐋 **桌宠** | 四形态住在你桌面上:小蓝三套形象 + 原生大肥鱼,可开成公网链接给指定的人看 |
|
|
36
36
|
| 🎬 **会出片** | 文案→分镜→出图质检→配音→字幕→成片,主人说「通过」才发 |
|
|
37
37
|
| 📢 **会运营** | B 站扫码登录、发动态、AI 写评论草稿、数据留档 |
|
|
38
38
|
| 🔒 **数据主权** | 一切落在本机;导出/彻底删除都有接口,还有审计日志 |
|
|
@@ -81,10 +81,11 @@ TTS 分段合成 + 句间呼吸 + ffmpeg 人声后处理,全篇语速平稳不
|
|
|
81
81
|
|
|
82
82
|
</details>
|
|
83
83
|
|
|
84
|
-
### 🐋
|
|
85
|
-
|
|
84
|
+
### 🐋 桌宠(四形态)
|
|
85
|
+
四个形态住在桌面上:**原版少女 / 女仆装立绘 / Q 版 de 娘** 三个自绘形象,加上 dsh-pet 原生的 **MuU 大肥鱼**(16 个动作全套:写代码、三球抛接、女仆舞……)。
|
|
86
86
|
浮窗一键切换、动作按钮直接让她挥手/开心/说话/被拎起;「⏻ 开关」整体显隐。
|
|
87
87
|
还能发布成**限制人数的公网链接**:访问码登录 + 单席位 + 可重置踢人 + 防爆破限速,
|
|
88
|
+
网页端同样能切形态、发整活动作、按住拎起——桌面桌宠同步做出动作;
|
|
88
89
|
本机不开任何入站端口(本机连接器主动外连云端代答),dsh token 全程不出你的电脑。
|
|
89
90
|
|
|
90
91
|
<details>
|
|
@@ -112,10 +113,20 @@ B 站扫码登录(Cookie 只落本机)、分享卡片、发/删动态、AI
|
|
|
112
113
|
|
|
113
114
|
## 🚀 快速开始(初次下载看这里)
|
|
114
115
|
|
|
116
|
+
> **⏱ 只想要一条命令?** 装好 [DSH 桌面端](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin)和 Node.js ≥ 22.5,然后 PowerShell 里执行:
|
|
117
|
+
>
|
|
118
|
+
> ```powershell
|
|
119
|
+
> dsh plugin add github:wuwo1979/dsh-qqbot-muu#main
|
|
120
|
+
> ```
|
|
121
|
+
>
|
|
122
|
+
> 重启 DSH 桌面端 → 浮窗出现「🧠 记忆 / 🐋 桌宠」页签 = 装好了,不用再看下面。
|
|
123
|
+
> 下面的分步教程是给想搞懂每一步的人准备的;卡住了直接跳 [新手常见问题](#-新手常见问题)。
|
|
124
|
+
|
|
115
125
|
### 0. 前置条件
|
|
116
126
|
|
|
117
127
|
- **Node.js ≥ 22.5**(用到内置 `node:sqlite`)
|
|
118
128
|
- **DSH 桌面端**([下载地址](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin))
|
|
129
|
+
- **QQ 机器人凭据**:在 [QQ 开放平台](https://q.qq.com) 创建机器人拿到 `QQBOT_APPID` / `QQBOT_SECRET`(设置成环境变量或写进 bot 数据根的配置)
|
|
119
130
|
- 可选增强(缺了会自动降级,不会带病跑):Python + Pillow(视频文字动效)、ffmpeg(音效与拼片)、Ollama(本地代答/打标/向量)
|
|
120
131
|
|
|
121
132
|
### 1. 安装插件(三选一)
|
|
@@ -152,6 +163,15 @@ ollama pull nomic-embed-text # 缺了自动退回关键词检索
|
|
|
152
163
|
2. 浮窗出现「🧠 记忆 / 🔗 账号管理 / 🐋 桌宠」等页签 = 插件已挂载
|
|
153
164
|
3. 群里 @ 她说句话,浮窗「聊天」页能看到消息 = 链路通了
|
|
154
165
|
|
|
166
|
+
### 🆘 新手常见问题
|
|
167
|
+
|
|
168
|
+
| 症状 | 处理 |
|
|
169
|
+
|---|---|
|
|
170
|
+
| 重启后浮窗没有新页签 | 浮窗里按 `Ctrl+F5` 强刷;再不行确认插件目录名是 `dsh-qqbot-muu` |
|
|
171
|
+
| `dsh` 命令找不到 | dsh CLI 由 DSH 桌面端提供;先装桌面端并重开终端,或用上面的方式二/三 |
|
|
172
|
+
| 提示 `node:sqlite` 不可用 | Node 版本低于 22.5,去 nodejs.org 升级 LTS |
|
|
173
|
+
| 安装时提示数据目录 | `--data-root` 是你给 bot 的空文件夹,填一个新建目录即可 |
|
|
174
|
+
|
|
155
175
|
### 4. 常用入口
|
|
156
176
|
|
|
157
177
|
| 想做什么 | 去哪里 |
|
|
@@ -195,6 +215,29 @@ overlay 体系保留作为备份与迁移工具。
|
|
|
195
215
|
|
|
196
216
|
</details>
|
|
197
217
|
|
|
218
|
+
## 🔒 访问控制(默认拒绝陌生人)
|
|
219
|
+
|
|
220
|
+
**装完默认谁都不回话**:`c2cMode` / `groupMode` 默认 `allowlist` 且白名单为空 → 任何私聊 / @ 都不进 AI,零 token 消耗(早期版本默认全开,v0.1.5 起改为安全默认)。
|
|
221
|
+
|
|
222
|
+
三档可选(配置 `access` 段):
|
|
223
|
+
|
|
224
|
+
| 模式 | 行为 | 适合 |
|
|
225
|
+
|---|---|---|
|
|
226
|
+
| `allowlist`(默认) | 只回白名单内的会话 | 有外部用户时 |
|
|
227
|
+
| `open` | 任何人可用 | 只有自己在用的私人实例 |
|
|
228
|
+
| `disabled` | 完全关闭该通道 | 只要桌宠不要聊天 |
|
|
229
|
+
|
|
230
|
+
```yaml
|
|
231
|
+
access:
|
|
232
|
+
c2cMode: allowlist
|
|
233
|
+
c2cAllow: ['你的用户openid'] # "*" = 全部放行
|
|
234
|
+
groupMode: allowlist
|
|
235
|
+
groupAllow: ['群openid']
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
> 不知道 openid?试者在群里 @ 她一句,然后 `harness.log` 搜 `not in allowlist`,括号里就是;
|
|
239
|
+
> 拒绝时日志会打醒目提示(不会静默)。
|
|
240
|
+
|
|
198
241
|
## 🔒 隐私
|
|
199
242
|
|
|
200
243
|
**仓库与 npm 包里不包含**:真实 openid / 群号 / 聊天记录 / B 站与抖音 Cookie / API Key /
|
|
@@ -244,9 +287,9 @@ submission/ 插件市场提交条目
|
|
|
244
287
|
|
|
245
288
|
## 市场收录
|
|
246
289
|
|
|
247
|
-
-
|
|
248
|
-
-
|
|
249
|
-
-
|
|
290
|
+
- 已收录于 [awesome-dsh-plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin)(DSH 桌面端内置插件市场的数据源)
|
|
291
|
+
- 条目:`submission/wuwo1979__dsh-qqbot-muu.yml`(本地预检:`node scripts/check-submission.mjs`)
|
|
292
|
+
- **更新机制**:市场不会自动跟随本仓库发版。每发一个新 Release,需要向上游仓库提 PR,把条目里的 `tarball:` 指到新版本——已随 v0.1.4 完成
|
|
250
293
|
|
|
251
294
|
## 致谢与许可
|
|
252
295
|
|
package/cordis.patch.yml
CHANGED
|
@@ -25,9 +25,11 @@
|
|
|
25
25
|
processingTimeoutMs: 120000
|
|
26
26
|
historyLimit: 10
|
|
27
27
|
access:
|
|
28
|
-
|
|
28
|
+
# 安全默认:allowlist + 空白名单 = 拒绝所有陌生人(2026-11-02 市场合规)。
|
|
29
|
+
# 想全开:改 open;想精准放行:往 Allow 数组填 openid(harness.log 搜 "not in allowlist" 可取)
|
|
30
|
+
c2cMode: allowlist
|
|
29
31
|
c2cAllow: []
|
|
30
|
-
groupMode:
|
|
32
|
+
groupMode: allowlist
|
|
31
33
|
groupAllow: []
|
|
32
34
|
debug: false
|
|
33
35
|
|
package/dist/config.js
CHANGED
|
@@ -345,14 +345,14 @@ const ConfigSchemaRaw = Schema.object({
|
|
|
345
345
|
.description('无上下文模式·智能判断(与 contextlessWindow 互斥): 让 AI 自己判断话题并自主压缩/丢弃上下文,只留它自己的备忘'),
|
|
346
346
|
contextMemoMaxItems: Schema.number().default(20).description('备忘条数上限(超出自动丢最旧)'),
|
|
347
347
|
access: Schema.object({
|
|
348
|
-
c2cMode: Schema.union(['open', 'allowlist', 'disabled']).default('
|
|
349
|
-
c2cAllow: Schema.array(Schema.string()).default([]).description('C2C
|
|
350
|
-
groupMode: Schema.union(['open', 'allowlist', 'disabled']).default('
|
|
351
|
-
groupAllow: Schema.array(Schema.string()).default([]).description('
|
|
348
|
+
c2cMode: Schema.union(['open', 'allowlist', 'disabled']).default('allowlist').description('C2C访问模式(默认 allowlist:空白名单=拒绝所有陌生人,安全默认 2026-11-02 市场合规)'),
|
|
349
|
+
c2cAllow: Schema.array(Schema.string()).default([]).description('C2C白名单(用户 openid;"*"=全部)'),
|
|
350
|
+
groupMode: Schema.union(['open', 'allowlist', 'disabled']).default('allowlist').description('群聊访问模式(默认 allowlist)'),
|
|
351
|
+
groupAllow: Schema.array(Schema.string()).default([]).description('群白名单(群 openid;"*"=全部)'),
|
|
352
352
|
}).default({
|
|
353
|
-
c2cMode: '
|
|
353
|
+
c2cMode: 'allowlist',
|
|
354
354
|
c2cAllow: [],
|
|
355
|
-
groupMode: '
|
|
355
|
+
groupMode: 'allowlist',
|
|
356
356
|
groupAllow: [],
|
|
357
357
|
}).description('访问控制'),
|
|
358
358
|
behavior: behaviorSchema,
|
|
@@ -134,14 +134,26 @@ pluginCtx) {
|
|
|
134
134
|
// 2. 消息过滤:bot 回声 + 消息去重
|
|
135
135
|
bot.use(messageFilter({ skipSelfEcho: false }));
|
|
136
136
|
// 3. 访问控制(白名单/开放/禁用)
|
|
137
|
+
// 2026-11-02 安全修复:删除「空白名单回落 ['*']」——那会让 allowlist 模式形同虚设
|
|
138
|
+
// (装完任何 QQ 用户/群都能私聊或 @ 机器人)。现在空白名单 = 拒绝所有人,并打醒目日志指路。
|
|
139
|
+
for (const [label, mode, allow] of [
|
|
140
|
+
['C2C(私聊)', config.access.c2cMode, config.access.c2cAllow],
|
|
141
|
+
['群聊', config.access.groupMode, config.access.groupAllow],
|
|
142
|
+
]) {
|
|
143
|
+
if (mode === 'allowlist' && allow.length === 0) {
|
|
144
|
+
logger.warn(`[访问控制] ${label} 为 allowlist 模式但白名单为空 → 所有${label}消息将被拒绝。` +
|
|
145
|
+
`放行方法:在配置 access 段把对应 Allow 数组填上 openid(可在 harness.log 搜 "not in allowlist" 拿到);` +
|
|
146
|
+
`或把 c2cMode/groupMode 显式设为 "open"(无门槛,任何人可用);"*" 通配符=全部放行。`);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
137
149
|
bot.use(accessPolicy({
|
|
138
150
|
c2c: {
|
|
139
151
|
mode: config.access.c2cMode,
|
|
140
|
-
allow: config.access.c2cAllow
|
|
152
|
+
allow: config.access.c2cAllow,
|
|
141
153
|
},
|
|
142
154
|
group: {
|
|
143
155
|
mode: config.access.groupMode,
|
|
144
|
-
allow: config.access.groupAllow
|
|
156
|
+
allow: config.access.groupAllow,
|
|
145
157
|
},
|
|
146
158
|
onBlock: (_mCtx, reason) => {
|
|
147
159
|
if (config.debug) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"form":"muu","at":
|
|
1
|
+
{"form":"muu","at":1793590644012}
|