@cxyhhhhh/openclaw-qqbot 1.6.7-alpha.2 → 2.0.0-alpha.1
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 +58 -23
- package/README.zh.md +58 -23
- package/dist/index.cjs +15271 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +862 -0
- package/index.ts +55 -17
- package/openclaw.plugin.json +14 -3
- package/package.json +16 -20
- package/preload.cjs +17 -14
- package/scripts/postinstall-link-sdk.js +66 -9
- package/scripts/upgrade-via-npm.ps1 +9 -0
- package/scripts/upgrade-via-npm.sh +998 -385
- package/scripts/upgrade-via-source.sh +238 -91
- package/skills/qqbot-remind/SKILL.md +21 -11
- package/skills/qqbot-upgrade/SKILL.md +50 -0
- package/src/bot-instance.ts +60 -0
- package/src/channel.ts +150 -336
- package/src/commands/bot-approve.ts +143 -0
- package/src/commands/bot-clear-storage.ts +114 -0
- package/src/commands/bot-group-always.ts +62 -0
- package/src/commands/bot-help.ts +40 -0
- package/src/commands/bot-logs.ts +246 -0
- package/src/commands/bot-me.ts +18 -0
- package/src/commands/bot-pairing.ts +57 -0
- package/src/commands/bot-ping.ts +33 -0
- package/src/commands/bot-streaming.ts +52 -0
- package/src/commands/bot-upgrade.ts +56 -0
- package/src/commands/bot-version.ts +41 -0
- package/src/commands/config-util.ts +96 -0
- package/src/commands/index.ts +49 -0
- package/src/config.ts +25 -18
- package/src/dispatch/body-assembler.ts +319 -0
- package/src/dispatch/dispatch.ts +330 -0
- package/src/dispatch/envelope-builder.ts +112 -0
- package/src/dispatch/index.ts +2 -0
- package/src/features/approval-handler.ts +451 -0
- package/src/features/approval-utils.ts +45 -0
- package/src/{credential-backup.ts → features/credential-backup.ts} +13 -15
- package/src/features/history-store.ts +14 -0
- package/src/features/msgid-cache.ts +55 -0
- package/src/features/onboarding.ts +38 -0
- package/src/{proactive.ts → features/proactive.ts} +68 -49
- package/src/features/ref-index-store.ts +282 -0
- package/src/{update-checker.ts → features/update-checker.ts} +26 -34
- package/src/gateway/event-handlers.ts +209 -0
- package/src/gateway/index.ts +3 -0
- package/src/gateway/lifecycle.ts +221 -0
- package/src/gateway/middleware-setup.ts +119 -0
- package/src/gateway/qqbot-gateway.ts +308 -0
- package/src/middleware/access-control.ts +130 -0
- package/src/middleware/attachment.ts +314 -0
- package/src/middleware/policy-injector.ts +66 -0
- package/src/openclaw-plugin-sdk.d.ts +153 -12
- package/src/outbound/cron-scheduler.ts +129 -0
- package/src/outbound/debounce.ts +102 -0
- package/src/outbound/deliver-pipeline.ts +198 -0
- package/src/outbound/image-size.ts +117 -0
- package/src/outbound/index.ts +3 -0
- package/src/outbound/local-file-router.ts +120 -0
- package/src/outbound/media-send.ts +306 -0
- package/src/outbound/outbound-service.ts +256 -0
- package/src/outbound/reply-limiter.ts +128 -0
- package/src/outbound/streaming-controller.ts +211 -0
- package/src/outbound/target.ts +63 -0
- package/src/outbound/tts-provider.ts +84 -0
- package/src/request-context.ts +17 -6
- package/src/runtime-adapter/contract-check.ts +72 -0
- package/src/runtime-adapter/gateway-runtime.ts +62 -0
- package/src/runtime-adapter/index.ts +15 -0
- package/src/runtime-adapter/lint-runtime-access.ts +144 -0
- package/src/runtime-adapter/pairing-runtime.ts +99 -0
- package/src/runtime-adapter/resolve.ts +290 -0
- package/src/runtime-adapter/webhook-adapter.ts +248 -0
- package/src/runtime.ts +29 -3
- package/src/setup/finalize.ts +110 -0
- package/src/setup/surface.ts +33 -0
- package/src/tools/channel.ts +41 -174
- package/src/tools/remind.ts +18 -10
- package/src/types-augment.d.ts +54 -0
- package/src/types.ts +162 -26
- package/src/utils/mention.ts +52 -0
- package/src/utils/pkg-version.ts +40 -13
- package/src/utils/platform.ts +3 -1
- package/src/utils/plugin-logger.ts +104 -0
- package/src/utils/stt.ts +137 -0
- package/src/utils/voice-text.ts +61 -0
- package/tsconfig.json +2 -1
- package/tsup.config.ts +37 -0
- package/dist/index.d.ts +0 -17
- package/dist/index.js +0 -26
- package/dist/src/admin-resolver.d.ts +0 -33
- package/dist/src/admin-resolver.js +0 -157
- package/dist/src/api.d.ts +0 -264
- package/dist/src/api.js +0 -777
- package/dist/src/channel.d.ts +0 -29
- package/dist/src/channel.js +0 -452
- package/dist/src/config.d.ts +0 -56
- package/dist/src/config.js +0 -278
- package/dist/src/credential-backup.d.ts +0 -31
- package/dist/src/credential-backup.js +0 -66
- package/dist/src/deliver-debounce.d.ts +0 -74
- package/dist/src/deliver-debounce.js +0 -174
- package/dist/src/gateway.d.ts +0 -18
- package/dist/src/gateway.js +0 -2009
- package/dist/src/group-history.d.ts +0 -136
- package/dist/src/group-history.js +0 -226
- package/dist/src/image-server.d.ts +0 -87
- package/dist/src/image-server.js +0 -570
- package/dist/src/inbound-attachments.d.ts +0 -60
- package/dist/src/inbound-attachments.js +0 -248
- package/dist/src/known-users.d.ts +0 -100
- package/dist/src/known-users.js +0 -263
- package/dist/src/message-gating.d.ts +0 -53
- package/dist/src/message-gating.js +0 -107
- package/dist/src/message-queue.d.ts +0 -86
- package/dist/src/message-queue.js +0 -257
- package/dist/src/onboarding.d.ts +0 -10
- package/dist/src/onboarding.js +0 -203
- package/dist/src/outbound-deliver.d.ts +0 -48
- package/dist/src/outbound-deliver.js +0 -392
- package/dist/src/outbound.d.ts +0 -205
- package/dist/src/outbound.js +0 -926
- package/dist/src/proactive.d.ts +0 -170
- package/dist/src/proactive.js +0 -399
- package/dist/src/ref-index-store.d.ts +0 -70
- package/dist/src/ref-index-store.js +0 -250
- package/dist/src/reply-dispatcher.d.ts +0 -35
- package/dist/src/reply-dispatcher.js +0 -311
- package/dist/src/request-context.d.ts +0 -18
- package/dist/src/request-context.js +0 -30
- package/dist/src/runtime.d.ts +0 -3
- package/dist/src/runtime.js +0 -10
- package/dist/src/session-store.d.ts +0 -52
- package/dist/src/session-store.js +0 -254
- package/dist/src/slash-commands.d.ts +0 -77
- package/dist/src/slash-commands.js +0 -1461
- package/dist/src/startup-greeting.d.ts +0 -30
- package/dist/src/startup-greeting.js +0 -97
- package/dist/src/streaming.d.ts +0 -250
- package/dist/src/streaming.js +0 -914
- package/dist/src/stt.d.ts +0 -21
- package/dist/src/stt.js +0 -70
- package/dist/src/tools/channel.d.ts +0 -16
- package/dist/src/tools/channel.js +0 -234
- package/dist/src/tools/remind.d.ts +0 -2
- package/dist/src/tools/remind.js +0 -248
- package/dist/src/types.d.ts +0 -364
- package/dist/src/types.js +0 -17
- package/dist/src/typing-keepalive.d.ts +0 -27
- package/dist/src/typing-keepalive.js +0 -64
- package/dist/src/update-checker.d.ts +0 -34
- package/dist/src/update-checker.js +0 -160
- package/dist/src/utils/audio-convert.d.ts +0 -98
- package/dist/src/utils/audio-convert.js +0 -755
- package/dist/src/utils/chunked-upload.d.ts +0 -59
- package/dist/src/utils/chunked-upload.js +0 -289
- package/dist/src/utils/file-utils.d.ts +0 -61
- package/dist/src/utils/file-utils.js +0 -172
- package/dist/src/utils/image-size.d.ts +0 -51
- package/dist/src/utils/image-size.js +0 -234
- package/dist/src/utils/media-send.d.ts +0 -148
- package/dist/src/utils/media-send.js +0 -456
- package/dist/src/utils/media-tags.d.ts +0 -14
- package/dist/src/utils/media-tags.js +0 -164
- package/dist/src/utils/payload.d.ts +0 -112
- package/dist/src/utils/payload.js +0 -186
- package/dist/src/utils/pkg-version.d.ts +0 -5
- package/dist/src/utils/pkg-version.js +0 -51
- package/dist/src/utils/platform.d.ts +0 -137
- package/dist/src/utils/platform.js +0 -390
- package/dist/src/utils/ssrf-guard.d.ts +0 -25
- package/dist/src/utils/ssrf-guard.js +0 -91
- package/dist/src/utils/text-parsing.d.ts +0 -32
- package/dist/src/utils/text-parsing.js +0 -69
- package/dist/src/utils/upload-cache.d.ts +0 -34
- package/dist/src/utils/upload-cache.js +0 -93
- package/node_modules/@eshaz/web-worker/LICENSE +0 -201
- package/node_modules/@eshaz/web-worker/README.md +0 -134
- package/node_modules/@eshaz/web-worker/browser.js +0 -17
- package/node_modules/@eshaz/web-worker/cjs/browser.js +0 -16
- package/node_modules/@eshaz/web-worker/cjs/node.js +0 -219
- package/node_modules/@eshaz/web-worker/index.d.ts +0 -4
- package/node_modules/@eshaz/web-worker/node.js +0 -223
- package/node_modules/@eshaz/web-worker/package.json +0 -54
- package/node_modules/@wasm-audio-decoders/common/index.js +0 -5
- package/node_modules/@wasm-audio-decoders/common/package.json +0 -36
- package/node_modules/@wasm-audio-decoders/common/src/WASMAudioDecoderCommon.js +0 -231
- package/node_modules/@wasm-audio-decoders/common/src/WASMAudioDecoderWorker.js +0 -129
- package/node_modules/@wasm-audio-decoders/common/src/puff/README +0 -67
- package/node_modules/@wasm-audio-decoders/common/src/puff/build_puff.js +0 -31
- package/node_modules/@wasm-audio-decoders/common/src/puff/puff.c +0 -863
- package/node_modules/@wasm-audio-decoders/common/src/puff/puff.h +0 -35
- package/node_modules/@wasm-audio-decoders/common/src/utilities.js +0 -3
- package/node_modules/@wasm-audio-decoders/common/types.d.ts +0 -7
- package/node_modules/mpg123-decoder/README.md +0 -265
- package/node_modules/mpg123-decoder/dist/mpg123-decoder.min.js +0 -185
- package/node_modules/mpg123-decoder/dist/mpg123-decoder.min.js.map +0 -1
- package/node_modules/mpg123-decoder/index.js +0 -8
- package/node_modules/mpg123-decoder/package.json +0 -58
- package/node_modules/mpg123-decoder/src/EmscriptenWasm.js +0 -464
- package/node_modules/mpg123-decoder/src/MPEGDecoder.js +0 -200
- package/node_modules/mpg123-decoder/src/MPEGDecoderWebWorker.js +0 -21
- package/node_modules/mpg123-decoder/types.d.ts +0 -30
- package/node_modules/silk-wasm/LICENSE +0 -21
- package/node_modules/silk-wasm/README.md +0 -85
- package/node_modules/silk-wasm/lib/index.cjs +0 -16
- package/node_modules/silk-wasm/lib/index.d.ts +0 -70
- package/node_modules/silk-wasm/lib/index.mjs +0 -16
- package/node_modules/silk-wasm/lib/silk.wasm +0 -0
- package/node_modules/silk-wasm/lib/utils.d.ts +0 -4
- package/node_modules/silk-wasm/package.json +0 -39
- package/node_modules/simple-yenc/.github/FUNDING.yml +0 -1
- package/node_modules/simple-yenc/.prettierignore +0 -1
- package/node_modules/simple-yenc/LICENSE +0 -7
- package/node_modules/simple-yenc/README.md +0 -163
- package/node_modules/simple-yenc/dist/esm.js +0 -1
- package/node_modules/simple-yenc/dist/index.js +0 -1
- package/node_modules/simple-yenc/package.json +0 -50
- package/node_modules/simple-yenc/rollup.config.js +0 -27
- package/node_modules/simple-yenc/src/simple-yenc.js +0 -302
- package/node_modules/ws/LICENSE +0 -20
- package/node_modules/ws/README.md +0 -548
- package/node_modules/ws/browser.js +0 -8
- package/node_modules/ws/index.js +0 -13
- package/node_modules/ws/lib/buffer-util.js +0 -131
- package/node_modules/ws/lib/constants.js +0 -19
- package/node_modules/ws/lib/event-target.js +0 -292
- package/node_modules/ws/lib/extension.js +0 -203
- package/node_modules/ws/lib/limiter.js +0 -55
- package/node_modules/ws/lib/permessage-deflate.js +0 -528
- package/node_modules/ws/lib/receiver.js +0 -706
- package/node_modules/ws/lib/sender.js +0 -602
- package/node_modules/ws/lib/stream.js +0 -161
- package/node_modules/ws/lib/subprotocol.js +0 -62
- package/node_modules/ws/lib/validation.js +0 -152
- package/node_modules/ws/lib/websocket-server.js +0 -554
- package/node_modules/ws/lib/websocket.js +0 -1393
- package/node_modules/ws/package.json +0 -69
- package/node_modules/ws/wrapper.mjs +0 -8
- package/skills/qqbot-media/SKILL.md +0 -60
- package/src/admin-resolver.ts +0 -181
- package/src/api.ts +0 -1138
- package/src/deliver-debounce.ts +0 -229
- package/src/gateway.ts +0 -2247
- package/src/group-history.ts +0 -328
- package/src/image-server.ts +0 -675
- package/src/inbound-attachments.ts +0 -321
- package/src/known-users.ts +0 -353
- package/src/message-gating.ts +0 -190
- package/src/message-queue.ts +0 -349
- package/src/onboarding.ts +0 -274
- package/src/outbound-deliver.ts +0 -473
- package/src/outbound.ts +0 -1119
- package/src/ref-index-store.ts +0 -335
- package/src/reply-dispatcher.ts +0 -334
- package/src/session-store.ts +0 -303
- package/src/slash-commands.ts +0 -1615
- package/src/startup-greeting.ts +0 -120
- package/src/streaming.ts +0 -1102
- package/src/stt.ts +0 -86
- package/src/typing-keepalive.ts +0 -59
- package/src/utils/audio-convert.ts +0 -859
- package/src/utils/chunked-upload.ts +0 -419
- package/src/utils/file-utils.ts +0 -193
- package/src/utils/image-size.ts +0 -266
- package/src/utils/media-send.ts +0 -585
- package/src/utils/media-tags.ts +0 -182
- package/src/utils/payload.ts +0 -265
- package/src/utils/text-parsing.ts +0 -75
- package/src/utils/upload-cache.ts +0 -128
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
**Connect your AI assistant to QQ — private chat, group chat, and rich media, all in one plugin.**
|
|
12
12
|
|
|
13
|
-
### 🚀 Current Version: `v1.
|
|
13
|
+
### 🚀 Current Version: `v1.7.1`
|
|
14
14
|
|
|
15
15
|
[](./LICENSE)
|
|
16
16
|
[](https://bot.q.qq.com/wiki/)
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
Scan to join the QQ group chat
|
|
27
27
|
|
|
28
|
-
<img width="400" alt="QQ QR Code" src="./docs/images/
|
|
28
|
+
<img width="400" alt="QQ QR Code" src="./docs/images/developer-group.png" />
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
</div>
|
|
@@ -45,7 +45,9 @@ Scan to join the QQ group chat
|
|
|
45
45
|
| ⌨️ **Typing Indicator** | "Bot is typing..." status shown in real-time |
|
|
46
46
|
| 📝 **Markdown** | Full Markdown formatting support |
|
|
47
47
|
| 🛠️ **Commands** | Native OpenClaw command integration |
|
|
48
|
-
| 💬 **Quoted Context** |
|
|
48
|
+
| 💬 **Quoted Context** | Parses the original message a user is replying to and injects it into AI context, so the model always knows exactly which message is being referenced |
|
|
49
|
+
| 📦 **Large File Support** | Auto chunked upload for large files (parallel upload with retry), up to 100 MB |
|
|
50
|
+
| 🔐 **Command Execution Approval** | AI requests approval via Inline Keyboard buttons before executing commands — tap to allow or deny |
|
|
49
51
|
|
|
50
52
|
---
|
|
51
53
|
|
|
@@ -53,15 +55,11 @@ Scan to join the QQ group chat
|
|
|
53
55
|
|
|
54
56
|
> **Note:** This plugin serves as a **message channel** only — it relays messages between QQ and OpenClaw. Capabilities like image understanding, voice transcription, drawing, etc. depend on the **AI model** you configure and the **skills** installed in OpenClaw, not on this plugin itself.
|
|
55
57
|
|
|
56
|
-
### 💬 Quoted Message Context
|
|
58
|
+
### 💬 Quoted Message Context
|
|
57
59
|
|
|
58
|
-
|
|
60
|
+
When a user quotes a message in QQ, the plugin automatically parses the quoted message content and injects it into the AI context, so the model clearly knows "which message the user is replying to" and gives more accurate responses. Supports text and media messages (image/voice/video/file), and works across devices.
|
|
59
61
|
|
|
60
|
-
|
|
61
|
-
- Store path: `~/.openclaw/qqbot/data/ref-index.jsonl` (survives gateway restart).
|
|
62
|
-
- Quote body may include text + media summary (image/voice/video/file).
|
|
63
|
-
|
|
64
|
-
<img width="360" src="docs/images/ref_msg.png" alt="Quoted Message Context Demo" />
|
|
62
|
+
<img width="360" src="docs/images/ref-msg.png" alt="Quoted Message Context Demo" />
|
|
65
63
|
|
|
66
64
|
### 🎙️ Voice Messages (STT)
|
|
67
65
|
|
|
@@ -71,7 +69,7 @@ With STT configured, the plugin automatically transcribes voice messages to text
|
|
|
71
69
|
>
|
|
72
70
|
> **QQBot**: Tomorrow (March 7, Saturday) Shenzhen weather forecast 🌤️ ...
|
|
73
71
|
|
|
74
|
-
<img width="360" src="docs/images/
|
|
72
|
+
<img width="360" src="docs/images/voice-stt.jpg" alt="Voice STT Demo" />
|
|
75
73
|
|
|
76
74
|
### 📄 File Understanding
|
|
77
75
|
|
|
@@ -81,7 +79,7 @@ Send any file to the bot — novels, reports, spreadsheets — AI automatically
|
|
|
81
79
|
>
|
|
82
80
|
> **QQBot**: Got it! You uploaded the Chinese version of "War and Peace" by Leo Tolstoy. This appears to be the opening of Chapter 1...
|
|
83
81
|
|
|
84
|
-
<img width="360" src="docs/images/
|
|
82
|
+
<img width="360" src="docs/images/file-understand.jpg" alt="File Understanding Demo" />
|
|
85
83
|
|
|
86
84
|
### 🖼️ Image Understanding
|
|
87
85
|
|
|
@@ -91,7 +89,7 @@ If your main model supports vision (e.g. Tencent Hunyuan `hunyuan-vision`), AI c
|
|
|
91
89
|
>
|
|
92
90
|
> **QQBot**: Haha, so cute! Is that a QQ penguin in a lobster costume? 🦞🐧 ...
|
|
93
91
|
|
|
94
|
-
<img width="360" src="docs/images/
|
|
92
|
+
<img width="360" src="docs/images/image-understand.jpg" alt="Image Understanding Demo" />
|
|
95
93
|
|
|
96
94
|
### 🎨 Image Sending
|
|
97
95
|
|
|
@@ -101,7 +99,7 @@ If your main model supports vision (e.g. Tencent Hunyuan `hunyuan-vision`), AI c
|
|
|
101
99
|
|
|
102
100
|
AI can send images directly. Supports local paths and URLs. Formats: jpg/png/gif/webp/bmp.
|
|
103
101
|
|
|
104
|
-
<img width="360" src="docs/images/
|
|
102
|
+
<img width="360" src="docs/images/image-send.jpg" alt="Image Generation Demo" />
|
|
105
103
|
|
|
106
104
|
### 🔊 Voice Sending
|
|
107
105
|
|
|
@@ -111,7 +109,7 @@ AI can send images directly. Supports local paths and URLs. Formats: jpg/png/gif
|
|
|
111
109
|
|
|
112
110
|
AI can send voice messages directly. Formats: mp3/wav/silk/ogg. No ffmpeg required.
|
|
113
111
|
|
|
114
|
-
<img width="360" src="docs/images/
|
|
112
|
+
<img width="360" src="docs/images/voice-send.jpg" alt="TTS Voice Demo" />
|
|
115
113
|
|
|
116
114
|
### ⏰ Scheduled Reminder (Proactive Message)
|
|
117
115
|
|
|
@@ -129,9 +127,21 @@ This capability depends on OpenClaw cron scheduling and proactive messaging. If
|
|
|
129
127
|
>
|
|
130
128
|
> **QQBot**: *(sends a .txt file)*
|
|
131
129
|
|
|
132
|
-
AI can send files directly
|
|
130
|
+
AI can send files directly, in any format.
|
|
131
|
+
|
|
132
|
+
<img width="360" src="docs/images/file-send.jpg" alt="File Sending Demo" />
|
|
133
|
+
|
|
134
|
+
Since v1.6.6, large file transfer is supported: images up to 20MB, videos up to 30MB, attachments up to 100MB, with a daily transfer limit of 2GB.
|
|
135
|
+
|
|
136
|
+
<img width="360" src="docs/images/large-file-transfer.jpg" alt="Large File Transfer Demo" />
|
|
137
|
+
|
|
138
|
+
### 🔐 Command Execution Approval
|
|
133
139
|
|
|
134
|
-
|
|
140
|
+
When the AI needs to execute a command, the plugin sends an approval request via QQ message with interactive buttons — tap **✅ Allow Once**, **⭐ Always Allow**, or **❌ Deny** to control whether the command runs.
|
|
141
|
+
|
|
142
|
+
Use the `/bot-approve` command to manage the approval mode (allowlist / off / strict).
|
|
143
|
+
|
|
144
|
+
<img width="360" src="docs/images/approve.png" alt="Command Execution Approval Demo" />
|
|
135
145
|
|
|
136
146
|
### 🎬 Video Sending
|
|
137
147
|
|
|
@@ -141,7 +151,7 @@ AI can send files directly. Any format, up to 20MB.
|
|
|
141
151
|
|
|
142
152
|
AI can send videos directly. Supports local files and URLs.
|
|
143
153
|
|
|
144
|
-
<img width="360" src="docs/images/
|
|
154
|
+
<img width="360" src="docs/images/video-send.jpg" alt="Video Sending Demo" />
|
|
145
155
|
|
|
146
156
|
> **Under the hood:** Upload dedup caching, ordered queue delivery, and multi-layer audio format fallback.
|
|
147
157
|
|
|
@@ -187,6 +197,11 @@ Credentials are automatically backed up before upgrade. Version existence is ver
|
|
|
187
197
|
|
|
188
198
|
> ⚠️ Hot upgrade is currently not supported on Windows. Sending `/bot-upgrade` on Windows will return a manual upgrade guide instead.
|
|
189
199
|
|
|
200
|
+
> ⚠️ v1.6.6 and below do not support hot upgrade via `/bot-upgrade`. Please upgrade using the following command:
|
|
201
|
+
> ```bash
|
|
202
|
+
> curl -fsSL https://raw.githubusercontent.com/tencent-connect/openclaw-qqbot/main/scripts/upgrade-via-npm.sh | bash
|
|
203
|
+
> ```
|
|
204
|
+
|
|
190
205
|
<img width="360" src="docs/images/hot-update.jpg" alt="Hot Upgrade Demo" />
|
|
191
206
|
|
|
192
207
|
#### `/bot-logs` — Log Export
|
|
@@ -207,6 +222,26 @@ All commands support a `?` suffix to show usage:
|
|
|
207
222
|
>
|
|
208
223
|
> **QQBot**: 📖 /bot-upgrade usage: …
|
|
209
224
|
|
|
225
|
+
#### `/bot-approve` — Approval Configuration
|
|
226
|
+
|
|
227
|
+
> **You**: `/bot-approve`
|
|
228
|
+
>
|
|
229
|
+
> **QQBot**: 🔐 Command Execution Approval — Enable / Disable / Strict mode / Reset / View current config
|
|
230
|
+
|
|
231
|
+
Manage the AI command execution approval policy. Supported subcommands:
|
|
232
|
+
|
|
233
|
+
| Subcommand | Description |
|
|
234
|
+
|------------|-------------|
|
|
235
|
+
| `/bot-approve on` | Enable approval (allowlist mode, recommended) |
|
|
236
|
+
| `/bot-approve off` | Disable approval — commands execute directly |
|
|
237
|
+
| `/bot-approve always` | Strict mode — every execution requires approval |
|
|
238
|
+
| `/bot-approve reset` | Restore framework defaults |
|
|
239
|
+
| `/bot-approve status` | View current approval config |
|
|
240
|
+
|
|
241
|
+
#### `/bot-clear-storage` — Clear files generated through QQBot conversations and downloaded resources (stored on the host running OpenClaw)
|
|
242
|
+
|
|
243
|
+
`/bot-clear-storage` lists files generated by the conversation and files in the downloaded resources directory. Use `/bot-clear-storage --force` to confirm deletion.
|
|
244
|
+
|
|
210
245
|
---
|
|
211
246
|
|
|
212
247
|
## 🚀 Getting Started
|
|
@@ -220,15 +255,15 @@ All commands support a `?` suffix to show usage:
|
|
|
220
255
|
2. After scanning, tap **Agree** on your phone — you'll land on the bot configuration page.
|
|
221
256
|
3. Click **Create Bot** to create a new QQ bot.
|
|
222
257
|
|
|
223
|
-
<img width="720" alt="Create Bot" src="docs/images/
|
|
258
|
+
<img width="720" alt="Create Bot" src="docs/images/create-robot.png" />
|
|
224
259
|
|
|
225
260
|
> ⚠️ The bot will automatically appear in your QQ message list and send a first message. However, it will reply "The bot has gone to Mars" until you complete the configuration steps below.
|
|
226
261
|
|
|
227
|
-
<img width="400" alt="Bot Say Hello" src="docs/images/
|
|
262
|
+
<img width="400" alt="Bot Say Hello" src="docs/images/bot-say-hello.jpg" />
|
|
228
263
|
|
|
229
264
|
4. Find **AppID** and **AppSecret** on the bot's page, click **Copy** for each, and save them somewhere safe (e.g., a notepad). **AppSecret is not stored in plaintext — if you leave the page without saving it, you'll have to regenerate a new one.**
|
|
230
265
|
|
|
231
|
-
<img width="720" alt="Find AppID and AppSecret" src="docs/images/
|
|
266
|
+
<img width="720" alt="Find AppID and AppSecret" src="docs/images/find-appid-secret.png" />
|
|
232
267
|
|
|
233
268
|
> For a step-by-step walkthrough with screenshots, see the [official guide](https://cloud.tencent.com/developer/article/2626045).
|
|
234
269
|
|
|
@@ -243,7 +278,7 @@ curl -fsSL https://raw.githubusercontent.com/tencent-connect/openclaw-qqbot/main
|
|
|
243
278
|
|
|
244
279
|
One command does it all: download script → cleanup old plugins → install → configure channel → restart service. Once done, open QQ and start chatting!
|
|
245
280
|
|
|
246
|
-
> `--appid` and `--secret` are **required for first-time install**. For subsequent upgrades:
|
|
281
|
+
> `--appid` and `--secret` are **required for first-time install**. For subsequent upgrades, run the following command to upgrade to the latest version:
|
|
247
282
|
> ```bash
|
|
248
283
|
> curl -fsSL https://raw.githubusercontent.com/tencent-connect/openclaw-qqbot/main/scripts/upgrade-via-npm.sh | bash
|
|
249
284
|
> ```
|
|
@@ -458,7 +493,7 @@ Special thanks to [@sliverp](https://github.com/sliverp) for outstanding contrib
|
|
|
458
493
|
Thanks to [Tencent Cloud Lighthouse](https://cloud.tencent.com/product/lighthouse) for the deep collaboration. For raising crawfish, choose Tencent Cloud Lighthouse!
|
|
459
494
|
|
|
460
495
|
<a href="https://cloud.tencent.com/product/lighthouse">
|
|
461
|
-
<img alt="Tencent Cloud Lighthouse" src="./docs/images/
|
|
496
|
+
<img alt="Tencent Cloud Lighthouse" src="./docs/images/lighthouse-head.png" height="500" style="max-width:80%; height:auto;"/>
|
|
462
497
|
</a>
|
|
463
498
|
|
|
464
499
|
## ⭐ Star History
|
package/README.zh.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
**让你的 AI 助手接入 QQ — 私聊、群聊、富媒体,一个插件全搞定。**
|
|
11
11
|
|
|
12
|
-
### 🚀 当前版本: `v1.
|
|
12
|
+
### 🚀 当前版本: `v1.7.1`
|
|
13
13
|
|
|
14
14
|
[](./LICENSE)
|
|
15
15
|
[](https://bot.q.qq.com/wiki/)
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
扫描二维码加入群聊,一起交流
|
|
23
23
|
|
|
24
|
-
<img width="400" alt="QQ 群二维码" src="./docs/images/
|
|
24
|
+
<img width="400" alt="QQ 群二维码" src="./docs/images/developer-group.png" />
|
|
25
25
|
|
|
26
26
|
</div>
|
|
27
27
|
|
|
@@ -40,7 +40,9 @@
|
|
|
40
40
|
| ⌨️ **输入状态** | 实时显示"Bot 正在输入中…"状态 |
|
|
41
41
|
| 📝 **Markdown** | 完整支持 Markdown 格式消息 |
|
|
42
42
|
| 🛠️ **原生命令** | 支持 OpenClaw 原生命令 |
|
|
43
|
-
| 💬 **引用上下文** |
|
|
43
|
+
| 💬 **引用上下文** | 解析用户回复的原始消息内容,注入 AI 上下文,让模型准确理解"在回复哪条消息" |
|
|
44
|
+
| 📦 **大文件支持** | 大文件自动分片并行上传,最大支持 100 MB |
|
|
45
|
+
| 🔐 **命令执行审批** | AI 执行命令前通过按钮消息请求审批,点击即可允许或拒绝 |
|
|
44
46
|
|
|
45
47
|
---
|
|
46
48
|
|
|
@@ -48,15 +50,11 @@
|
|
|
48
50
|
|
|
49
51
|
> **说明:** 本插件仅作为**消息通道**,负责在 QQ 和 OpenClaw 之间传递消息。图片理解、语音转录、AI 画图等能力取决于你配置的 **AI 模型**以及在 OpenClaw 中安装的 **skill**,而非插件本身提供。
|
|
50
52
|
|
|
51
|
-
### 💬
|
|
53
|
+
### 💬 引用消息上下文
|
|
52
54
|
|
|
53
|
-
QQ
|
|
55
|
+
用户在 QQ 中引用某条消息发送时,插件会自动解析被引用的消息内容并注入 AI 上下文,让模型清楚地知道"用户在回复哪条消息",从而给出更准确的回复。支持文本及媒体消息(图片/语音/视频/文件),换设备后同样可用。
|
|
54
56
|
|
|
55
|
-
-
|
|
56
|
-
- 存储位置:`~/.openclaw/qqbot/data/ref-index.jsonl`(网关重启后仍可恢复)。
|
|
57
|
-
- 引用内容支持文本 + 媒体摘要(图片/语音/视频/文件)。
|
|
58
|
-
|
|
59
|
-
<img width="360" src="docs/images/ref_msg.png" alt="引用消息上下文演示" />
|
|
57
|
+
<img width="360" src="docs/images/ref-msg.png" alt="引用消息上下文演示" />
|
|
60
58
|
|
|
61
59
|
### 🎙️ 语音消息(STT)
|
|
62
60
|
|
|
@@ -66,7 +64,7 @@ QQ 的引用事件通常只携带索引键(如 `REFIDX_xxx`),不直接返
|
|
|
66
64
|
>
|
|
67
65
|
> **QQBot**:明天(3月7日 周六)深圳的天气预报 🌤️ ...
|
|
68
66
|
|
|
69
|
-
<img width="360" src="docs/images/
|
|
67
|
+
<img width="360" src="docs/images/voice-stt.jpg" alt="听语音演示" />
|
|
70
68
|
|
|
71
69
|
### 📄 文件理解
|
|
72
70
|
|
|
@@ -76,7 +74,7 @@ QQ 的引用事件通常只携带索引键(如 `REFIDX_xxx`),不直接返
|
|
|
76
74
|
>
|
|
77
75
|
> **QQBot**:收到!你上传了列夫·托尔斯泰的《战争与和平》中文版文本。从内容来看,这是第一章的开头……你想让我做什么?
|
|
78
76
|
|
|
79
|
-
<img width="360" src="docs/images/
|
|
77
|
+
<img width="360" src="docs/images/file-understand.jpg" alt="AI理解用户发送的文件" />
|
|
80
78
|
|
|
81
79
|
### 🖼️ 图片理解
|
|
82
80
|
|
|
@@ -86,7 +84,7 @@ QQ 的引用事件通常只携带索引键(如 `REFIDX_xxx`),不直接返
|
|
|
86
84
|
>
|
|
87
85
|
> **QQBot**:哈哈,好可爱!这是QQ企鹅穿上小龙虾套装吗?🦞🐧 ...
|
|
88
86
|
|
|
89
|
-
<img width="360" src="docs/images/
|
|
87
|
+
<img width="360" src="docs/images/image-understand.jpg" alt="图片理解演示" />
|
|
90
88
|
|
|
91
89
|
### 🎨 图片发送
|
|
92
90
|
|
|
@@ -96,7 +94,7 @@ QQ 的引用事件通常只携带索引键(如 `REFIDX_xxx`),不直接返
|
|
|
96
94
|
|
|
97
95
|
AI 可直接发送图片,支持本地文件路径和网络 URL。格式:jpg/png/gif/webp/bmp。
|
|
98
96
|
|
|
99
|
-
<img width="360" src="docs/images/
|
|
97
|
+
<img width="360" src="docs/images/image-send.jpg" alt="发图片演示" />
|
|
100
98
|
|
|
101
99
|
### 🔊 语音发送
|
|
102
100
|
|
|
@@ -106,7 +104,7 @@ AI 可直接发送图片,支持本地文件路径和网络 URL。格式:jpg/
|
|
|
106
104
|
|
|
107
105
|
AI 可直接发送语音消息。格式:mp3/wav/silk/ogg,无需安装 ffmpeg。
|
|
108
106
|
|
|
109
|
-
<img width="360" src="docs/images/
|
|
107
|
+
<img width="360" src="docs/images/voice-send.jpg" alt="发语音演示" />
|
|
110
108
|
|
|
111
109
|
### ⏰ 定时提醒(主动消息)
|
|
112
110
|
|
|
@@ -124,9 +122,21 @@ AI 可直接发送语音消息。格式:mp3/wav/silk/ogg,无需安装 ffmpeg
|
|
|
124
122
|
>
|
|
125
123
|
> **QQBot**:*(发送 .txt 文件)*
|
|
126
124
|
|
|
127
|
-
AI
|
|
125
|
+
AI 可直接发送文件,任意格式均可。
|
|
126
|
+
|
|
127
|
+
<img width="360" src="docs/images/file-send.jpg" alt="发文件演示" />
|
|
128
|
+
|
|
129
|
+
v1.6.6 起支持大文件传输:图片最大 20MB,视频最大 30MB,附件最大 100MB,每日累计传输上限 2GB。
|
|
130
|
+
|
|
131
|
+
<img width="360" src="docs/images/large-file-transfer.jpg" alt="大文件传输演示" />
|
|
132
|
+
|
|
133
|
+
### 🔐 命令执行审批
|
|
128
134
|
|
|
129
|
-
|
|
135
|
+
当 AI 需要执行命令时,插件会通过 QQ 消息发送带按钮的审批请求,你可以点击 **✅ 允许一次**、**⭐ 始终允许** 或 **❌ 拒绝** 来控制命令是否执行。
|
|
136
|
+
|
|
137
|
+
通过 `/bot-approve` 指令可以管理审批模式(白名单 / 关闭 / 严格模式)。
|
|
138
|
+
|
|
139
|
+
<img width="360" src="docs/images/approve.png" alt="命令执行审批演示" />
|
|
130
140
|
|
|
131
141
|
### 🎬 视频发送
|
|
132
142
|
|
|
@@ -136,7 +146,7 @@ AI 可直接发送文件。任意格式,最大 20MB。
|
|
|
136
146
|
|
|
137
147
|
AI 可直接发送视频,支持本地文件和公网 URL。
|
|
138
148
|
|
|
139
|
-
<img width="360" src="docs/images/
|
|
149
|
+
<img width="360" src="docs/images/video-send.jpg" alt="发视频演示" />
|
|
140
150
|
|
|
141
151
|
> **底层细节:** 上传去重缓存、有序队列发送、音频格式多层降级。
|
|
142
152
|
|
|
@@ -182,6 +192,11 @@ AI 可直接发送视频,支持本地文件和公网 URL。
|
|
|
182
192
|
|
|
183
193
|
> ⚠️ 热更新指令暂不支持 Windows 系统,在 Windows 上发送 `/bot-upgrade` 会返回手动升级指引。
|
|
184
194
|
|
|
195
|
+
> ⚠️ v1.6.6 及以下版本暂不支持通过 `/bot-upgrade` 执行热更新,请通过以下命令升级:
|
|
196
|
+
> ```bash
|
|
197
|
+
> curl -fsSL https://raw.githubusercontent.com/tencent-connect/openclaw-qqbot/main/scripts/upgrade-via-npm.sh | bash
|
|
198
|
+
> ```
|
|
199
|
+
|
|
185
200
|
<img width="360" src="docs/images/hot-update.jpg" alt="一键热更新演示" />
|
|
186
201
|
|
|
187
202
|
#### `/bot-logs` — 日志导出
|
|
@@ -202,6 +217,26 @@ AI 可直接发送视频,支持本地文件和公网 URL。
|
|
|
202
217
|
>
|
|
203
218
|
> **QQBot**:📖 /bot-upgrade 用法:…
|
|
204
219
|
|
|
220
|
+
#### `/bot-approve` — 审批配置管理
|
|
221
|
+
|
|
222
|
+
> **你**:`/bot-approve`
|
|
223
|
+
>
|
|
224
|
+
> **QQBot**:🔐 命令执行审批配置 — 开启审批 / 关闭审批 / 严格模式 / 恢复默认 / 查看当前配置
|
|
225
|
+
|
|
226
|
+
管理 AI 命令执行审批策略,支持以下子命令:
|
|
227
|
+
|
|
228
|
+
| 子命令 | 说明 |
|
|
229
|
+
|--------|------|
|
|
230
|
+
| `/bot-approve on` | 开启审批(白名单模式,推荐) |
|
|
231
|
+
| `/bot-approve off` | 关闭审批,命令直接执行 |
|
|
232
|
+
| `/bot-approve always` | 严格模式,每次执行都需审批 |
|
|
233
|
+
| `/bot-approve reset` | 恢复框架默认值 |
|
|
234
|
+
| `/bot-approve status` | 查看当前审批配置 |
|
|
235
|
+
|
|
236
|
+
#### `/bot-clear-storage` — 清理通过 QQBot 对话产生的文件以及下载的资源(保存在 OpenClaw 运行环境的主机上)
|
|
237
|
+
|
|
238
|
+
`/bot-clear-storage` 列出对话产生的文件以及下载的资源目录里的文件,使用`/bot-clear-storage -- force`确定删除。
|
|
239
|
+
|
|
205
240
|
---
|
|
206
241
|
|
|
207
242
|
## 🚀 快速开始
|
|
@@ -215,15 +250,15 @@ AI 可直接发送视频,支持本地文件和公网 URL。
|
|
|
215
250
|
2. 手机 QQ 扫码后选择**同意**,即完成注册,进入 QQ 机器人配置页。
|
|
216
251
|
3. 点击**创建机器人**,即可直接新建一个 QQ 机器人。
|
|
217
252
|
|
|
218
|
-
<img width="720" alt="创建机器人" src="docs/images/
|
|
253
|
+
<img width="720" alt="创建机器人" src="docs/images/create-robot.png" />
|
|
219
254
|
|
|
220
255
|
> ⚠️ 机器人创建后会自动出现在你的 QQ 消息列表中,并发送第一条消息。但在完成下面的配置之前,发消息会提示"该机器人去火星了",属于正常现象。
|
|
221
256
|
|
|
222
|
-
<img width="400" alt="机器人打招呼" src="docs/images/
|
|
257
|
+
<img width="400" alt="机器人打招呼" src="docs/images/bot-say-hello.jpg" />
|
|
223
258
|
|
|
224
259
|
4. 在机器人页面中找到 **AppID** 和 **AppSecret**,分别点击右侧**复制**按钮,保存到记事本或备忘录中。**AppSecret 不支持明文保存,离开页面后再查看会强制重置,请务必妥善保存。**
|
|
225
260
|
|
|
226
|
-
<img width="720" alt="找到 AppID 和 AppSecret" src="docs/images/
|
|
261
|
+
<img width="720" alt="找到 AppID 和 AppSecret" src="docs/images/find-appid-secret.png" />
|
|
227
262
|
|
|
228
263
|
> 详细图文教程请参阅 [官方指南](https://cloud.tencent.com/developer/article/2626045)。
|
|
229
264
|
|
|
@@ -238,7 +273,7 @@ curl -fsSL https://raw.githubusercontent.com/tencent-connect/openclaw-qqbot/main
|
|
|
238
273
|
|
|
239
274
|
一行命令搞定:下载脚本 → 清理旧插件 → 安装 → 配置通道 → 启动服务。完成后打开 QQ 即可开始聊天!
|
|
240
275
|
|
|
241
|
-
> 首次安装**必须**传 `--appid` 和 `--secret
|
|
276
|
+
> 首次安装**必须**传 `--appid` 和 `--secret`。后续升级执行此指令可以升级为最新版:
|
|
242
277
|
> ```bash
|
|
243
278
|
> curl -fsSL https://raw.githubusercontent.com/tencent-connect/openclaw-qqbot/main/scripts/upgrade-via-npm.sh | bash
|
|
244
279
|
> ```
|
|
@@ -453,7 +488,7 @@ STT 支持两级配置,按优先级查找:
|
|
|
453
488
|
感谢[腾讯云Lighthouse](https://cloud.tencent.com/product/lighthouse)的深度合作,养小龙虾,首选腾讯云Lighthouse!
|
|
454
489
|
|
|
455
490
|
<a href="https://cloud.tencent.com/product/lighthouse">
|
|
456
|
-
<img alt="腾讯云 Lighthouse" src="./docs/images/
|
|
491
|
+
<img alt="腾讯云 Lighthouse" src="./docs/images/lighthouse-head.png" height="500" style="max-width:80%; height:auto;"/>
|
|
457
492
|
</a>
|
|
458
493
|
|
|
459
494
|
## ⭐ Star History
|