@openclaw/qqbot 2026.5.16-beta.7 → 2026.5.18
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/api.js +3 -3
- package/dist/{channel-CkQp23Q8.js → channel-Dp4lpH09.js} +4 -4
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{gateway-Cyws1K92.js → gateway-DJ8IM_ty.js} +26 -10
- package/dist/{handler-runtime-BXtB9jW4.js → handler-runtime-861iuTRE.js} +1 -1
- package/dist/{outbound-0VsKGRIy.js → outbound-CiZ7556q.js} +1 -1
- package/dist/{request-context-CIVSSmT8.js → request-context-qmCvaQlt.js} +1 -1
- package/package.json +4 -4
package/dist/api.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { C as recordMessageReply, E as setOutboundAudioPort, S as getMessageReplyStats, T as OUTBOUND_ERROR_CODES, _ as sendVoice, a as sendText, b as checkMessageReplyLimit, d as buildMediaTarget, f as parseTarget, g as sendVideoMsg, h as sendPhoto, i as sendProactiveMessage, m as sendDocument, n as sendCronMessage, p as resolveOutboundMediaPath, r as sendMedia, v as resolveUserFacingMediaError, w as DEFAULT_MEDIA_SEND_ERROR, x as getMessageReplyConfig, y as MESSAGE_REPLY_LIMIT } from "./outbound-
|
|
1
|
+
import { C as recordMessageReply, E as setOutboundAudioPort, S as getMessageReplyStats, T as OUTBOUND_ERROR_CODES, _ as sendVoice, a as sendText, b as checkMessageReplyLimit, d as buildMediaTarget, f as parseTarget, g as sendVideoMsg, h as sendPhoto, i as sendProactiveMessage, m as sendDocument, n as sendCronMessage, p as resolveOutboundMediaPath, r as sendMedia, v as resolveUserFacingMediaError, w as DEFAULT_MEDIA_SEND_ERROR, x as getMessageReplyConfig, y as MESSAGE_REPLY_LIMIT } from "./outbound-CiZ7556q.js";
|
|
2
2
|
import { c as listQQBotAccountIds, l as resolveDefaultQQBotAccountId, o as DEFAULT_ACCOUNT_ID, s as applyQQBotAccountConfig, u as resolveQQBotAccount } from "./config-schema-BE5YP0NG.js";
|
|
3
|
-
import { t as qqbotPlugin } from "./channel-
|
|
3
|
+
import { t as qqbotPlugin } from "./channel-Dp4lpH09.js";
|
|
4
4
|
import { C as debugError, l as getAccessToken, w as debugLog, z as formatErrorMessage } from "./runtime-BfsyXEkf.js";
|
|
5
5
|
import { t as qqbotSetupPlugin } from "./channel.setup-D_8Ryfln.js";
|
|
6
|
-
import { r as getFrameworkCommands, t as getRequestContext } from "./request-context-
|
|
6
|
+
import { r as getFrameworkCommands, t as getRequestContext } from "./request-context-qmCvaQlt.js";
|
|
7
7
|
import { callGatewayTool } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
8
8
|
//#region extensions/qqbot/src/engine/tools/channel-api.ts
|
|
9
9
|
/**
|
|
@@ -374,7 +374,7 @@ function createQQBotApprovalCapability() {
|
|
|
374
374
|
},
|
|
375
375
|
load: async () => {
|
|
376
376
|
ensurePlatformAdapter();
|
|
377
|
-
return (await import("./handler-runtime-
|
|
377
|
+
return (await import("./handler-runtime-861iuTRE.js")).qqbotApprovalNativeRuntime;
|
|
378
378
|
}
|
|
379
379
|
})
|
|
380
380
|
});
|
|
@@ -826,7 +826,7 @@ function looksLikeQQBotTarget(id) {
|
|
|
826
826
|
//#region extensions/qqbot/src/channel.ts
|
|
827
827
|
let gatewayModulePromise;
|
|
828
828
|
function loadGatewayModule() {
|
|
829
|
-
gatewayModulePromise ??= import("./gateway-
|
|
829
|
+
gatewayModulePromise ??= import("./gateway-DJ8IM_ty.js");
|
|
830
830
|
return gatewayModulePromise;
|
|
831
831
|
}
|
|
832
832
|
function createQQBotSendReceipt(params) {
|
|
@@ -844,7 +844,7 @@ function createQQBotSendReceipt(params) {
|
|
|
844
844
|
async function sendQQBotText(params) {
|
|
845
845
|
await loadGatewayModule();
|
|
846
846
|
const account = resolveQQBotAccount(params.cfg, params.accountId);
|
|
847
|
-
const { sendText } = await import("./outbound-
|
|
847
|
+
const { sendText } = await import("./outbound-CiZ7556q.js").then((n) => n.t);
|
|
848
848
|
const result = await sendText({
|
|
849
849
|
to: params.to,
|
|
850
850
|
text: params.text,
|
|
@@ -866,7 +866,7 @@ async function sendQQBotText(params) {
|
|
|
866
866
|
async function sendQQBotMedia(params) {
|
|
867
867
|
await loadGatewayModule();
|
|
868
868
|
const account = resolveQQBotAccount(params.cfg, params.accountId);
|
|
869
|
-
const { sendMedia } = await import("./outbound-
|
|
869
|
+
const { sendMedia } = await import("./outbound-CiZ7556q.js").then((n) => n.t);
|
|
870
870
|
const result = await sendMedia({
|
|
871
871
|
to: params.to,
|
|
872
872
|
text: params.text ?? "",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as qqbotPlugin } from "./channel-
|
|
1
|
+
import { t as qqbotPlugin } from "./channel-Dp4lpH09.js";
|
|
2
2
|
export { qqbotPlugin };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { E as setOutboundAudioPort, _ as sendVoice, c as isMediaPayload, g as sendVideoMsg, h as sendPhoto, l as parseQQBotPayload, m as sendDocument, o as encodePayloadForCron, r as sendMedia, s as isCronReminderPayload, u as normalizeMediaTags, v as resolveUserFacingMediaError, w as DEFAULT_MEDIA_SEND_ERROR } from "./outbound-
|
|
1
|
+
import { E as setOutboundAudioPort, _ as sendVoice, c as isMediaPayload, g as sendVideoMsg, h as sendPhoto, l as parseQQBotPayload, m as sendDocument, o as encodePayloadForCron, r as sendMedia, s as isCronReminderPayload, u as normalizeMediaTags, v as resolveUserFacingMediaError, w as DEFAULT_MEDIA_SEND_ERROR } from "./outbound-CiZ7556q.js";
|
|
2
2
|
import { c as getPlatformAdapter, i as normalizeOptionalString, n as normalizeLowercaseStringOrEmpty, o as readStringField, s as sanitizeFileName, t as asOptionalObjectRecord } from "./string-normalize-C46CS-F1.js";
|
|
3
3
|
import { f as resolveAccountBase, h as setBridgeLogger, p as ensurePlatformAdapter } from "./config-schema-BE5YP0NG.js";
|
|
4
|
-
import { C as parseApprovalButtonData, a as getQQBotDataDir, d as isWindows, f as normalizePath$1, h as authorizeQQBotApprovalAction, i as getHomeDir, l as getTempDir, m as toGatewayAccount, o as getQQBotDataPath, p as resolveQQBotPayloadLocalFilePath, r as checkSilkWasmAvailable, s as getQQBotMediaDir, u as isLocalPath } from "./channel-
|
|
4
|
+
import { C as parseApprovalButtonData, a as getQQBotDataDir, d as isWindows, f as normalizePath$1, h as authorizeQQBotApprovalAction, i as getHomeDir, l as getTempDir, m as toGatewayAccount, o as getQQBotDataPath, p as resolveQQBotPayloadLocalFilePath, r as checkSilkWasmAvailable, s as getQQBotMediaDir, u as isLocalPath } from "./channel-Dp4lpH09.js";
|
|
5
5
|
import { B as StreamContentType, C as debugError, D as getNextMsgSeq, F as getImageMimeType, H as StreamInputState, I as getMaxUploadSize, N as formatFileSize, R as formatDuration, S as withTokenRetry, T as debugWarn, V as StreamInputMode, _ as sendInputNotify, a as acknowledgeInteraction, b as startBackgroundTokenRefresh, c as createRawInputNotifyFn, d as getMessageApi, f as getPluginUserAgent, g as registerAccount, h as onMessageSent, i as accountToCreds, j as downloadFile, k as openLocalFile, l as getAccessToken, m as initSender, n as getQQBotRuntimeForEngine, o as buildDeliveryTarget, p as initApiConfig, s as clearTokenCache, t as getQQBotRuntime, u as getGatewayUrl, v as sendMedia$1, w as debugLog, x as stopBackgroundTokenRefresh, y as sendText, z as formatErrorMessage } from "./runtime-BfsyXEkf.js";
|
|
6
|
-
import { a as getPluginVersion, i as getFrameworkVersion, n as runWithRequestContext, o as initCommands, s as matchSlashCommand } from "./request-context-
|
|
6
|
+
import { a as getPluginVersion, i as getFrameworkVersion, n as runWithRequestContext, o as initCommands, s as matchSlashCommand } from "./request-context-qmCvaQlt.js";
|
|
7
7
|
import * as fs$1 from "node:fs";
|
|
8
8
|
import fs from "node:fs";
|
|
9
9
|
import * as os$1 from "node:os";
|
|
@@ -5967,8 +5967,8 @@ function buildCtxPayload(inbound, runtime, cfg) {
|
|
|
5967
5967
|
* All I/O operations are injected via constructor parameters so this
|
|
5968
5968
|
* module has zero external dependencies and can run in both plugin versions.
|
|
5969
5969
|
*/
|
|
5970
|
-
/** Refresh every
|
|
5971
|
-
const TYPING_INTERVAL_MS =
|
|
5970
|
+
/** Refresh every 5s for the QQ API's 10s input-notify window. */
|
|
5971
|
+
const TYPING_INTERVAL_MS = 5e3;
|
|
5972
5972
|
var TypingKeepAlive = class {
|
|
5973
5973
|
constructor(getToken, clearCache, sendInputNotify, openid, msgId, log) {
|
|
5974
5974
|
this.getToken = getToken;
|
|
@@ -5979,6 +5979,7 @@ var TypingKeepAlive = class {
|
|
|
5979
5979
|
this.log = log;
|
|
5980
5980
|
this.timer = null;
|
|
5981
5981
|
this.stopped = false;
|
|
5982
|
+
this.renewalsRemaining = 3;
|
|
5982
5983
|
}
|
|
5983
5984
|
/** Start periodic keep-alive sends. */
|
|
5984
5985
|
start() {
|
|
@@ -6002,18 +6003,33 @@ var TypingKeepAlive = class {
|
|
|
6002
6003
|
async send() {
|
|
6003
6004
|
try {
|
|
6004
6005
|
const token = await this.getToken();
|
|
6005
|
-
await this.
|
|
6006
|
-
this.log?.debug?.(`Typing keep-alive sent to ${this.openid}`);
|
|
6006
|
+
await this.sendAttempt(token);
|
|
6007
6007
|
} catch (err) {
|
|
6008
6008
|
try {
|
|
6009
6009
|
this.clearCache();
|
|
6010
6010
|
const token = await this.getToken();
|
|
6011
|
-
await this.
|
|
6011
|
+
await this.sendAttempt(token);
|
|
6012
6012
|
} catch {
|
|
6013
6013
|
this.log?.debug?.(`Typing keep-alive failed for ${this.openid}: ${formatErrorMessage(err)}`);
|
|
6014
6014
|
}
|
|
6015
6015
|
}
|
|
6016
6016
|
}
|
|
6017
|
+
async sendAttempt(token) {
|
|
6018
|
+
if (this.stopped || this.renewalsRemaining <= 0) {
|
|
6019
|
+
this.stop();
|
|
6020
|
+
return;
|
|
6021
|
+
}
|
|
6022
|
+
this.renewalsRemaining--;
|
|
6023
|
+
try {
|
|
6024
|
+
await this.sendInputNotify(token, this.openid, this.msgId, 10);
|
|
6025
|
+
this.log?.debug?.(`Typing keep-alive sent to ${this.openid}`);
|
|
6026
|
+
} finally {
|
|
6027
|
+
if (this.renewalsRemaining <= 0) {
|
|
6028
|
+
this.log?.debug?.(`Typing keep-alive budget exhausted for ${this.openid}`);
|
|
6029
|
+
this.stop();
|
|
6030
|
+
}
|
|
6031
|
+
}
|
|
6032
|
+
}
|
|
6017
6033
|
};
|
|
6018
6034
|
//#endregion
|
|
6019
6035
|
//#region extensions/qqbot/src/engine/gateway/gateway.ts
|
|
@@ -6163,7 +6179,7 @@ async function startTypingForEvent(event, account, log) {
|
|
|
6163
6179
|
openid: event.senderId,
|
|
6164
6180
|
creds,
|
|
6165
6181
|
msgId: event.messageId,
|
|
6166
|
-
inputSecond:
|
|
6182
|
+
inputSecond: 10
|
|
6167
6183
|
});
|
|
6168
6184
|
const keepAlive = new TypingKeepAlive(() => getAccessToken(account.appId, account.clientSecret), () => clearTokenCache(account.appId), rawNotifyFn, event.senderId, event.messageId, log);
|
|
6169
6185
|
keepAlive.start();
|
|
@@ -6179,7 +6195,7 @@ async function startTypingForEvent(event, account, log) {
|
|
|
6179
6195
|
openid: event.senderId,
|
|
6180
6196
|
creds,
|
|
6181
6197
|
msgId: event.messageId,
|
|
6182
|
-
inputSecond:
|
|
6198
|
+
inputSecond: 10
|
|
6183
6199
|
});
|
|
6184
6200
|
const keepAlive = new TypingKeepAlive(() => getAccessToken(account.appId, account.clientSecret), () => clearTokenCache(account.appId), rawNotifyFn, event.senderId, event.messageId, log);
|
|
6185
6201
|
keepAlive.start();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { m as getBridgeLogger, p as ensurePlatformAdapter, u as resolveQQBotAccount } from "./config-schema-BE5YP0NG.js";
|
|
2
|
-
import { S as buildPluginApprovalText, _ as matchesQQBotApprovalAccount, b as buildApprovalKeyboard, g as isQQBotExecApprovalClientEnabled, v as resolveQQBotExecApprovalConfig, w as resolveApprovalTarget, x as buildExecApprovalText, y as shouldHandleQQBotExecApprovalRequest } from "./channel-
|
|
2
|
+
import { S as buildPluginApprovalText, _ as matchesQQBotApprovalAccount, b as buildApprovalKeyboard, g as isQQBotExecApprovalClientEnabled, v as resolveQQBotExecApprovalConfig, w as resolveApprovalTarget, x as buildExecApprovalText, y as shouldHandleQQBotExecApprovalRequest } from "./channel-Dp4lpH09.js";
|
|
3
3
|
import { d as getMessageApi, i as accountToCreds } from "./runtime-BfsyXEkf.js";
|
|
4
4
|
import { resolveApprovalRequestSessionConversation } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
5
5
|
import { createChannelApprovalNativeRuntimeAdapter } from "openclaw/plugin-sdk/approval-handler-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as normalizeOptionalString, n as normalizeLowercaseStringOrEmpty, s as sanitizeFileName } from "./string-normalize-C46CS-F1.js";
|
|
2
|
-
import { a as getQQBotDataDir, f as normalizePath, n as parseTarget$1, p as resolveQQBotPayloadLocalFilePath, s as getQQBotMediaDir, u as isLocalPath } from "./channel-
|
|
2
|
+
import { a as getQQBotDataDir, f as normalizePath, n as parseTarget$1, p as resolveQQBotPayloadLocalFilePath, s as getQQBotMediaDir, u as isLocalPath } from "./channel-Dp4lpH09.js";
|
|
3
3
|
import { A as checkFileSize, C as debugError, E as UploadDailyLimitExceededError, F as getImageMimeType, I as getMaxUploadSize, L as readFileAsync, M as fileExistsAsync, N as formatFileSize, O as UPLOAD_PREPARE_FALLBACK_CODE, P as getFileTypeName, T as debugWarn, i as accountToCreds, j as downloadFile, p as initApiConfig, v as sendMedia$1, w as debugLog, y as sendText$1, z as formatErrorMessage } from "./runtime-BfsyXEkf.js";
|
|
4
4
|
import { pathExistsSync, resolveLocalPathFromRootsSync } from "openclaw/plugin-sdk/security-runtime";
|
|
5
5
|
import path from "node:path";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as getQQBotDataDir, c as getQQBotMediaPath, d as isWindows, i as getHomeDir } from "./channel-
|
|
1
|
+
import { a as getQQBotDataDir, c as getQQBotMediaPath, d as isWindows, i as getHomeDir } from "./channel-Dp4lpH09.js";
|
|
2
2
|
import { w as debugLog } from "./runtime-BfsyXEkf.js";
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import path from "node:path";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/qqbot",
|
|
3
|
-
"version": "2026.5.
|
|
3
|
+
"version": "2026.5.18",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "OpenClaw QQ Bot channel plugin",
|
|
6
6
|
"repository": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"openclaw": "workspace:*"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"openclaw": ">=2026.5.
|
|
24
|
+
"openclaw": ">=2026.5.18"
|
|
25
25
|
},
|
|
26
26
|
"peerDependenciesMeta": {
|
|
27
27
|
"openclaw": {
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"minHostVersion": ">=2026.4.10"
|
|
51
51
|
},
|
|
52
52
|
"compat": {
|
|
53
|
-
"pluginApi": ">=2026.5.
|
|
53
|
+
"pluginApi": ">=2026.5.18"
|
|
54
54
|
},
|
|
55
55
|
"build": {
|
|
56
|
-
"openclawVersion": "2026.5.
|
|
56
|
+
"openclawVersion": "2026.5.18"
|
|
57
57
|
},
|
|
58
58
|
"release": {
|
|
59
59
|
"publishToClawHub": true,
|