@jerryliang122/openclaw-qqbot 1.0.6 → 1.0.7
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/dist/index.cjs +28 -3
- package/dist/index.cjs.map +1 -1
- package/package.json +1 -1
- package/src/dispatch/ctx-builder.ts +30 -2
- package/src/dispatch/envelope-builder.ts +7 -2
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.7" : "unknown";
|
|
8263
8263
|
}
|
|
8264
8264
|
function getOpenclawVersion(runtimeVersion) {
|
|
8265
8265
|
return runtimeVersion && runtimeVersion !== "unknown" ? runtimeVersion : "unknown";
|
|
@@ -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: {
|