dsh-napcat
NapCat / OneBot 11 通道插件:把 DeepSeek Harness 变成 QQ 机器人(私聊 + 群聊、@门控、白名单、长文分段、工具主动发送)。 适合想将 AI 接入 QQ 群或私聊、实现智能客服或群聊助手的用户。
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:wzwei1990/dsh-napcatREADME
Read the full README ↗3. 配置
Web UI 设置页里改(推荐),或者给 profile 的 cordis.patch.yml 里 dsh-napcat 行加 config: 覆盖:
- insert:
- id: dsh-napcat
name: 'dsh-napcat'
config:
mode: forward
url: 'ws://81.70.163.182:3001'
accessToken: '你的 token'
adminUsers: ['你的QQ号']
groupPolicy: allowlist
groupAllowFrom: ['你的群号']
最少要配三样:mode+url(或 reverse 的 port)、accessToken、adminUsers(否则私聊没人能触发)。
配置项
| 键 | 默认 | 说明 |
|---|---|---|
mode | forward | forward=连 NapCat;reverse=监听等 NapCat 拨入 |
url | ws://127.0.0.1:3001 | forward 目标(NapCat 在云上就写云的公网 IP) |
accessToken | 空 | OneBot token;forward 作为 Bearer 发出,reverse 校验来者 |
host / port | 127.0.0.1 / 8643 | reverse 监听;NapCat 在别的机器上必须 host: 0.0.0.0 |
botQQ | 空 | 机器人自己的 QQ;留空自动学习(影响 @ 门控) |
adminUsers | [] | 管理员 QQ |
dmPolicy | admin | 私聊:admin 仅管理员 / open 任何人 / disabled |
allowFrom | [] | dmPolicy=open 时的额外白名单(空=不限) |
groupPolicy | allowlist | 群聊:open / allowlist / disabled |
groupAllowFrom | [] | 白名单群号 |
requireMention | true | 群聊必须 @机器人(或回复它上一条消息) |
ignoreSelf | true | 忽略机器人自己的消息 |
replyAsQuote | false | 回复时引用原消息 |
splitMaxChars | 1200 | 单条消息最大字数,超出自动分段;0=不分段 |
reconnectMaxAttempts | 50 | forward 连续失败多少次后放弃;0=无限 |
workspacePath | 空 | QQ 会话挂载的工作区;空=宿主 cwd |
agentPreset | 空 | 挂载的 agent preset |
provider / model | 空 | 覆盖模型(空=宿主默认) |
logLevel | info | debug / info / warn |