@jerryliang122/openclaw-qqbot 1.0.6 → 1.0.8
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 +4 -4
- package/README.zh.md +4 -4
- package/dist/index.cjs +30 -5
- package/dist/index.cjs.map +1 -1
- package/package.json +3 -3
- package/src/adapter/pairing.ts +1 -1
- package/src/adapter/resolve.ts +2 -2
- package/src/adapter/setup.ts +1 -1
- package/src/dispatch/ctx-builder.ts +30 -2
- package/src/dispatch/dispatch.ts +1 -1
- package/src/dispatch/envelope-builder.ts +7 -2
- package/src/features/question-helpers.ts +1 -1
- package/src/openclaw-plugin-sdk.d.ts +1 -1
- package/src/utils/pkg-version.ts +1 -1
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
[](./LICENSE)
|
|
14
14
|
[](https://bot.q.qq.com/wiki/)
|
|
15
|
-
[](https://github.com/jerryliang122/qqbot-openclaw)
|
|
16
16
|
[](https://nodejs.org/)
|
|
17
17
|
[](https://www.typescriptlang.org/)
|
|
18
18
|
[](https://github.com/jerryliang122/qqbot-openclaw)
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
> This is an **independently maintained fork** with its own versioning (v1.x, decoupled from the upstream 2.x line). Upstream: [tencent-connect/openclaw-qqbot](https://github.com/tencent-connect/openclaw-qqbot).
|
|
25
25
|
>
|
|
26
|
-
> **Requirements**: OpenClaw `>= 2026.9.
|
|
26
|
+
> **Requirements**: OpenClaw `>= 2026.9.1` · Published to npm as [`@jerryliang122/openclaw-qqbot`](https://www.npmjs.com/package/@jerryliang122/openclaw-qqbot). See [CHANGELOG](CHANGELOG.md) for differences vs the old version and the upgrade guide.
|
|
27
27
|
|
|
28
28
|
Scan to join the QQ group chat
|
|
29
29
|
|
|
@@ -179,7 +179,7 @@ Measures end-to-end latency from QQ server push to plugin response, broken down
|
|
|
179
179
|
|
|
180
180
|
> **You**: `/bot-version`
|
|
181
181
|
>
|
|
182
|
-
> **QQBot**: 🦞 Framework: OpenClaw 2026.9.
|
|
182
|
+
> **QQBot**: 🦞 Framework: OpenClaw 2026.9.1 / 🤖 Plugin: v1.0.0 / 🌟 GitHub repo
|
|
183
183
|
|
|
184
184
|
Shows framework version, plugin version, and a direct link to the official repository.
|
|
185
185
|
|
|
@@ -282,7 +282,7 @@ Answers "why does this group have no context" diagnostics: the push mode is chos
|
|
|
282
282
|
|
|
283
283
|
### Step 2 — Install / Upgrade the Plugin
|
|
284
284
|
|
|
285
|
-
> **Note**: The unscoped npm name `openclaw-qqbot` belongs to the original upstream project — this fork publishes as the scoped package `@jerryliang122/openclaw-qqbot`. Requires OpenClaw >= 2026.9.
|
|
285
|
+
> **Note**: The unscoped npm name `openclaw-qqbot` belongs to the original upstream project — this fork publishes as the scoped package `@jerryliang122/openclaw-qqbot`. Requires OpenClaw >= 2026.9.1.
|
|
286
286
|
|
|
287
287
|
**Option A: Install from npm (Recommended)**
|
|
288
288
|
|
package/README.zh.md
CHANGED
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
**让你的 AI 助手接入 QQ — 私聊、群聊、富媒体,一个插件全搞定。**
|
|
11
11
|
|
|
12
12
|
> 本仓库为**独立维护的 fork**,自 v1.0.0 起独立发版(与上游 2.x 版本线完全脱钩)。
|
|
13
|
-
> 运行要求:OpenClaw `>= 2026.9.
|
|
13
|
+
> 运行要求:OpenClaw `>= 2026.9.1`;npm 包名 [`@jerryliang122/openclaw-qqbot`](https://www.npmjs.com/package/@jerryliang122/openclaw-qqbot)。
|
|
14
14
|
> 与旧版本的差异及升级指南见 [CHANGELOG](CHANGELOG.md)。上游仓库:[tencent-connect/openclaw-qqbot](https://github.com/tencent-connect/openclaw-qqbot)。
|
|
15
15
|
|
|
16
16
|
### 🚀 当前版本: `v1.0.0`
|
|
17
17
|
|
|
18
18
|
[](./LICENSE)
|
|
19
19
|
[](https://bot.q.qq.com/wiki/)
|
|
20
|
-
[](https://github.com/jerryliang122/qqbot-openclaw)
|
|
21
21
|
[](https://nodejs.org/)
|
|
22
22
|
[](https://www.typescriptlang.org/)
|
|
23
23
|
|
|
@@ -177,7 +177,7 @@ AI 可直接发送视频,支持本地文件和公网 URL。
|
|
|
177
177
|
|
|
178
178
|
> **你**:`/bot-version`
|
|
179
179
|
>
|
|
180
|
-
> **QQBot**:🦞框架版本:OpenClaw 2026.9.
|
|
180
|
+
> **QQBot**:🦞框架版本:OpenClaw 2026.9.1 / 🤖QQBot 插件版本:v1.0.0 / 🌟GitHub 仓库
|
|
181
181
|
|
|
182
182
|
一目了然查看框架版本、插件版本,并可直接跳转官方仓库。
|
|
183
183
|
|
|
@@ -282,7 +282,7 @@ AI 可直接发送视频,支持本地文件和公网 URL。
|
|
|
282
282
|
|
|
283
283
|
### 第二步 — 安装 / 升级插件
|
|
284
284
|
|
|
285
|
-
> 无 scope 的 npm 包名 `openclaw-qqbot` 属于上游原项目——本 fork 以 `@jerryliang122/openclaw-qqbot` 发布。要求 OpenClaw >= 2026.9.
|
|
285
|
+
> 无 scope 的 npm 包名 `openclaw-qqbot` 属于上游原项目——本 fork 以 `@jerryliang122/openclaw-qqbot` 发布。要求 OpenClaw >= 2026.9.1。
|
|
286
286
|
|
|
287
287
|
**方式 A:从 npm 安装(推荐)**
|
|
288
288
|
|
package/dist/index.cjs
CHANGED
|
@@ -8259,7 +8259,7 @@ var init_outbound_service = __esm({
|
|
|
8259
8259
|
|
|
8260
8260
|
// src/utils/pkg-version.ts
|
|
8261
8261
|
function getPackageVersion() {
|
|
8262
|
-
return true ? "1.0.
|
|
8262
|
+
return true ? "1.0.8" : "unknown";
|
|
8263
8263
|
}
|
|
8264
8264
|
function getOpenclawVersion(runtimeVersion) {
|
|
8265
8265
|
return runtimeVersion && runtimeVersion !== "unknown" ? runtimeVersion : "unknown";
|
|
@@ -10454,7 +10454,7 @@ function getAdapters(rt, log5) {
|
|
|
10454
10454
|
async function persistAuthConfig(runtime2, cfg, afterWrite = "restart") {
|
|
10455
10455
|
const config = runtime2.config;
|
|
10456
10456
|
if (typeof config?.mutateConfigFile !== "function") {
|
|
10457
|
-
throw new Error("persistAuthConfig: runtime.config.mutateConfigFile is unavailable (requires openclaw >= 2026.9.
|
|
10457
|
+
throw new Error("persistAuthConfig: runtime.config.mutateConfigFile is unavailable (requires openclaw >= 2026.9.1)");
|
|
10458
10458
|
}
|
|
10459
10459
|
await config.mutateConfigFile({
|
|
10460
10460
|
mutate: () => cfg,
|
|
@@ -14492,6 +14492,7 @@ function mapQuote(quote) {
|
|
|
14492
14492
|
return {
|
|
14493
14493
|
content: quote.text,
|
|
14494
14494
|
senderId: quote.entry?.senderId ?? "",
|
|
14495
|
+
messageId: quote.entry?.messageId,
|
|
14495
14496
|
attachments: quote.attachments
|
|
14496
14497
|
};
|
|
14497
14498
|
}
|
|
@@ -14708,7 +14709,24 @@ function buildCtxPayload(params) {
|
|
|
14708
14709
|
},
|
|
14709
14710
|
reply: {
|
|
14710
14711
|
to: envelope.targetId,
|
|
14711
|
-
|
|
14712
|
+
/**
|
|
14713
|
+
* ReplyToId 契约语义 = 当前消息回复(引用)的那条消息的 ID —— 对齐
|
|
14714
|
+
* telegram 原生通道(replyHead?.messageId ?? visibleReplyTarget?.id),
|
|
14715
|
+
* 无引用时必须为 undefined。框架将其渲染为模型可见 Conversation info
|
|
14716
|
+
* 的 reply_to_id 字段。
|
|
14717
|
+
*
|
|
14718
|
+
* 历史版本误填 envelope.messageId(消息自身 ID),导致每条消息都呈现
|
|
14719
|
+
* message_id == reply_to_id —— 被上层 agent 的 AGENTS 规则判为「内部
|
|
14720
|
+
* 回灌、非新指令」而拒绝响应(2026-09-22 事故)。
|
|
14721
|
+
*
|
|
14722
|
+
* QQ 被动回复锚点不依赖此字段:deliverCtx.replyToId / msgid-cache 兜底
|
|
14723
|
+
* (resolvePassiveFirstReplyToId)/ attachMsgIdWithQuota 均独立取值,
|
|
14724
|
+
* threading resolveReplyToMode='off' 阻断框架隐式回复线程。
|
|
14725
|
+
*
|
|
14726
|
+
* 防御守卫:即使上游异常传入当前消息 ID(自引用),也强制置空——
|
|
14727
|
+
* 「reply_to_id == message_id」这一假回灌签名在任何路径都不允许再现。
|
|
14728
|
+
*/
|
|
14729
|
+
replyToId: envelope.quote?.messageId && envelope.quote.messageId !== envelope.messageId ? envelope.quote.messageId : void 0,
|
|
14712
14730
|
originatingTo: envelope.targetId
|
|
14713
14731
|
},
|
|
14714
14732
|
access: {
|
|
@@ -14717,7 +14735,14 @@ function buildCtxPayload(params) {
|
|
|
14717
14735
|
command: isSlashCommand ? { kind: "text-slash", body: assembled.rawBody, authorized: true } : void 0,
|
|
14718
14736
|
media: mediaFacts.length > 0 ? mediaFacts : void 0,
|
|
14719
14737
|
supplemental: {
|
|
14720
|
-
quote
|
|
14738
|
+
// quote.id 同样必须是「被引用消息」的真实 ID(ref-index 命中时),
|
|
14739
|
+
// 而非当前消息 ID——框架经 applySupplementalContext 映射为
|
|
14740
|
+
// ctx.ReplyToId / "Reply target of current user message"。
|
|
14741
|
+
quote: envelope.quote ? {
|
|
14742
|
+
...envelope.quote.messageId && envelope.quote.messageId !== envelope.messageId ? { id: envelope.quote.messageId } : {},
|
|
14743
|
+
body: envelope.quote.content,
|
|
14744
|
+
sender: envelope.quote.senderId
|
|
14745
|
+
} : void 0,
|
|
14721
14746
|
groupSystemPrompt: envelope.systemPrompt
|
|
14722
14747
|
},
|
|
14723
14748
|
extra: {
|
|
@@ -15106,7 +15131,7 @@ async function dispatchToOpenClaw(ctx, msg, account, runtime2, log5) {
|
|
|
15106
15131
|
const envelope = buildEnvelope2(ctx, msg, account);
|
|
15107
15132
|
dlog?.debug(`received sender=${envelope.senderId} scope=${envelope.chatScope} msgId=${envelope.messageId}`);
|
|
15108
15133
|
if (!adapters.inboundRun || !adapters.dispatchReply) {
|
|
15109
|
-
dlog?.error(`runtime adapter inboundRun/dispatchReply not available (openclaw=${adapters.version}, requires >=2026.9.
|
|
15134
|
+
dlog?.error(`runtime adapter inboundRun/dispatchReply not available (openclaw=${adapters.version}, requires >=2026.9.1)`);
|
|
15110
15135
|
return;
|
|
15111
15136
|
}
|
|
15112
15137
|
const assembled = ctx.state.assembledBody ?? assembleBody(ctx, msg, account);
|