@openclaw/qqbot 2026.6.5 → 2026.6.6-beta.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/dist/api.js +3 -3
- package/dist/{channel-D13iTVCr.js → channel-CQdcwOQZ.js} +2 -2
- package/dist/{channel-entry-fUBLXKPr.js → channel-entry-CfzBEypJ.js} +1 -1
- package/dist/channel-entry-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{gateway-DcL6jnps.js → gateway-DTfz_8KD.js} +6 -4
- package/dist/{handler-runtime-DZXDF0GH.js → handler-runtime-CPzQAAn3.js} +1 -1
- package/dist/{slash-commands-impl-FRw-Dl44.js → slash-commands-impl-DVApdSop.js} +84 -0
- package/npm-shrinkwrap.json +3 -3
- package/package.json +4 -4
package/dist/api.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as qqbotPlugin } from "./channel-
|
|
1
|
+
import { t as qqbotPlugin } from "./channel-CQdcwOQZ.js";
|
|
2
2
|
import { a as resolveQQBotAccount, i as resolveDefaultQQBotAccountId, n as applyQQBotAccountConfig, r as listQQBotAccountIds, t as DEFAULT_ACCOUNT_ID } from "./config-ZEfgeoL4.js";
|
|
3
3
|
import { t as qqbotSetupPlugin } from "./channel.setup-CQ_DFfPx.js";
|
|
4
|
-
import { t as getFrameworkCommands } from "./slash-commands-impl-
|
|
4
|
+
import { t as getFrameworkCommands } from "./slash-commands-impl-DVApdSop.js";
|
|
5
5
|
import { n as registerRemindTool, r as registerChannelTool, t as registerQQBotTools } from "./tools-2d9t-N1b.js";
|
|
6
|
-
import { t as registerQQBotFull } from "./channel-entry-
|
|
6
|
+
import { t as registerQQBotFull } from "./channel-entry-CfzBEypJ.js";
|
|
7
7
|
import { C as getMessageReplyStats, D as setOutboundAudioPort, E as OUTBOUND_ERROR_CODES, S as getMessageReplyConfig, T as DEFAULT_MEDIA_SEND_ERROR, _ as sendVideoMsg, a as sendText, b as MESSAGE_REPLY_LIMIT, f as buildMediaTarget, g as sendPhoto, h as sendDocument, i as sendProactiveMessage, m as resolveOutboundMediaPath, n as sendCronMessage, p as parseTarget, r as sendMedia, v as sendVoice, w as recordMessageReply, x as checkMessageReplyLimit, y as resolveUserFacingMediaError } from "./outbound-C9wV892v.js";
|
|
8
8
|
export { DEFAULT_ACCOUNT_ID, DEFAULT_MEDIA_SEND_ERROR, MESSAGE_REPLY_LIMIT, OUTBOUND_ERROR_CODES, applyQQBotAccountConfig, buildMediaTarget, checkMessageReplyLimit, getFrameworkCommands, getMessageReplyConfig, getMessageReplyStats, listQQBotAccountIds, parseTarget, qqbotPlugin, qqbotSetupPlugin, recordMessageReply, registerChannelTool, registerQQBotFull, registerQQBotTools, registerRemindTool, resolveDefaultQQBotAccountId, resolveOutboundMediaPath, resolveQQBotAccount, resolveUserFacingMediaError, sendCronMessage, sendDocument, sendMedia, sendPhoto, sendProactiveMessage, sendText, sendVideoMsg, sendVoice, setOutboundAudioPort };
|
|
@@ -377,7 +377,7 @@ function createQQBotApprovalCapability() {
|
|
|
377
377
|
},
|
|
378
378
|
load: async () => {
|
|
379
379
|
ensurePlatformAdapter();
|
|
380
|
-
return (await import("./handler-runtime-
|
|
380
|
+
return (await import("./handler-runtime-CPzQAAn3.js")).qqbotApprovalNativeRuntime;
|
|
381
381
|
}
|
|
382
382
|
})
|
|
383
383
|
});
|
|
@@ -667,7 +667,7 @@ function resolveQQBotGroupToolPolicy(params) {
|
|
|
667
667
|
//#region extensions/qqbot/src/channel.ts
|
|
668
668
|
let gatewayModulePromise;
|
|
669
669
|
function loadGatewayModule() {
|
|
670
|
-
gatewayModulePromise ??= import("./gateway-
|
|
670
|
+
gatewayModulePromise ??= import("./gateway-DTfz_8KD.js");
|
|
671
671
|
return gatewayModulePromise;
|
|
672
672
|
}
|
|
673
673
|
let outboundMessagingModulePromise;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as resolveQQBotAccount } from "./config-ZEfgeoL4.js";
|
|
2
|
-
import { t as getFrameworkCommands } from "./slash-commands-impl-
|
|
2
|
+
import { t as getFrameworkCommands } from "./slash-commands-impl-DVApdSop.js";
|
|
3
3
|
import { t as registerQQBotTools } from "./tools-2d9t-N1b.js";
|
|
4
4
|
import { h as sendDocument } from "./outbound-C9wV892v.js";
|
|
5
5
|
//#region extensions/qqbot/src/bridge/commands/framework-context-adapter.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as registerQQBotFull } from "./channel-entry-
|
|
1
|
+
import { t as registerQQBotFull } from "./channel-entry-CfzBEypJ.js";
|
|
2
2
|
export { registerQQBotFull };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as qqbotPlugin } from "./channel-
|
|
1
|
+
import { t as qqbotPlugin } from "./channel-CQdcwOQZ.js";
|
|
2
2
|
export { qqbotPlugin };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { C as getNextMsgSeq, D as downloadFile, F as StreamInputMode, I as StreamInputState, M as getMaxUploadSize, P as StreamContentType, T as openLocalFile, a as createRawInputNotifyFn, b as stopBackgroundTokenRefresh, c as getMessageApi, d as initSender, f as onMessageSent, g as sendText, h as sendMedia, i as clearTokenCache, j as getImageMimeType, k as formatFileSize, l as getPluginUserAgent, m as sendInputNotify, n as acknowledgeInteraction, o as getAccessToken, p as registerAccount, r as buildDeliveryTarget, s as getGatewayUrl, t as accountToCreds, u as initApiConfig, x as withTokenRetry, y as startBackgroundTokenRefresh } from "./sender-DIMG7jHz.js";
|
|
2
2
|
import { c as getPlatformAdapter, i as normalizeOptionalString$1, n as normalizeLowercaseStringOrEmpty$1, o as readStringField, s as sanitizeFileName, t as asOptionalObjectRecord } from "./string-normalize-R_0cKO7Q.js";
|
|
3
3
|
import { c as setBridgeLogger, o as ensurePlatformAdapter } from "./config-schema-BFLNZ8Nf.js";
|
|
4
|
-
import { a as authorizeQQBotApprovalAction, i as toGatewayAccount, n as buildQQBotStateKey, p as parseApprovalButtonData, r as openQQBotSyncKeyedStore } from "./channel-
|
|
4
|
+
import { a as authorizeQQBotApprovalAction, i as toGatewayAccount, n as buildQQBotStateKey, p as parseApprovalButtonData, r as openQQBotSyncKeyedStore } from "./channel-CQdcwOQZ.js";
|
|
5
5
|
import { d as resolveAccountBase } from "./config-ZEfgeoL4.js";
|
|
6
6
|
import { a as formatErrorMessage, i as formatDuration, n as debugLog, r as debugWarn, t as debugError } from "./log-SDfMMBWe.js";
|
|
7
7
|
import { n as getQQBotRuntimeForEngine, t as getQQBotRuntime } from "./runtime-B9UoQ5NI.js";
|
|
8
8
|
import { a as getHomeDir, c as getQQBotMediaDir, d as isLocalPath, f as isWindows, i as checkSilkWasmAvailable, m as resolveQQBotPayloadLocalFilePath, o as getQQBotDataDir, p as normalizePath, s as getQQBotDataPath, u as getTempDir } from "./target-parser-BdCUmxK7.js";
|
|
9
|
-
import { a as matchSlashCommand, i as initCommands, n as getFrameworkVersion, r as getPluginVersion } from "./slash-commands-impl-
|
|
9
|
+
import { a as matchSlashCommand, i as initCommands, n as getFrameworkVersion, r as getPluginVersion } from "./slash-commands-impl-DVApdSop.js";
|
|
10
10
|
import { n as runWithRequestContext } from "./request-context-Bm7PTBD1.js";
|
|
11
11
|
import { D as setOutboundAudioPort, T as DEFAULT_MEDIA_SEND_ERROR, _ as sendVideoMsg, c as isCronReminderPayload, d as normalizeMediaTags, g as sendPhoto, h as sendDocument, l as isMediaPayload, o as decodeMediaPath, r as sendMedia$1, s as encodePayloadForCron, u as parseQQBotPayload, v as sendVoice, y as resolveUserFacingMediaError } from "./outbound-C9wV892v.js";
|
|
12
12
|
import { asBoolean, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -21,8 +21,8 @@ import * as path$1 from "node:path";
|
|
|
21
21
|
import path from "node:path";
|
|
22
22
|
import { mimeTypeFromFilePath } from "openclaw/plugin-sdk/media-mime";
|
|
23
23
|
import { MAX_TIMER_TIMEOUT_MS, finiteSecondsToTimerSafeMilliseconds } from "openclaw/plugin-sdk/number-runtime";
|
|
24
|
-
import { resolveRuntimeServiceVersion } from "openclaw/plugin-sdk/cli-runtime";
|
|
25
24
|
import { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot";
|
|
25
|
+
import { resolveRuntimeServiceVersion } from "openclaw/plugin-sdk/cli-runtime";
|
|
26
26
|
import WebSocket from "ws";
|
|
27
27
|
import { resolveAmbientNodeProxyAgent } from "openclaw/plugin-sdk/extension-shared";
|
|
28
28
|
import { buildChannelInboundEventContext } from "openclaw/plugin-sdk/channel-inbound";
|
|
@@ -2595,11 +2595,13 @@ function readHistoryLimit(obj, key) {
|
|
|
2595
2595
|
return Math.max(0, Math.floor(v));
|
|
2596
2596
|
}
|
|
2597
2597
|
function resolveGroupConfig(cfg, groupOpenid, accountId) {
|
|
2598
|
+
const account = resolveAccountBase(cfg, accountId);
|
|
2598
2599
|
const groups = readGroupsMap(cfg, accountId);
|
|
2599
2600
|
const wildcard = groups["*"] ?? {};
|
|
2600
2601
|
const specific = groupOpenid ? groups[groupOpenid] ?? {} : {};
|
|
2602
|
+
const accountDefaultRequireMention = asBoolean(account.config.defaultRequireMention) ?? DEFAULT_GROUP_CONFIG.requireMention;
|
|
2601
2603
|
return {
|
|
2602
|
-
requireMention: readBoolean(specific, "requireMention") ?? readBoolean(wildcard, "requireMention") ??
|
|
2604
|
+
requireMention: readBoolean(specific, "requireMention") ?? readBoolean(wildcard, "requireMention") ?? accountDefaultRequireMention,
|
|
2603
2605
|
ignoreOtherMentions: readBoolean(specific, "ignoreOtherMentions") ?? readBoolean(wildcard, "ignoreOtherMentions") ?? DEFAULT_GROUP_CONFIG.ignoreOtherMentions,
|
|
2604
2606
|
name: readString(specific, "name") ?? readString(wildcard, "name") ?? DEFAULT_GROUP_CONFIG.name,
|
|
2605
2607
|
prompt: readString(specific, "prompt") ?? readString(wildcard, "prompt"),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as getMessageApi, t as accountToCreds } from "./sender-DIMG7jHz.js";
|
|
2
2
|
import { o as ensurePlatformAdapter, s as getBridgeLogger } from "./config-schema-BFLNZ8Nf.js";
|
|
3
|
-
import { c as resolveQQBotExecApprovalConfig, d as buildExecApprovalText, f as buildPluginApprovalText, l as shouldHandleQQBotExecApprovalRequest, m as resolveApprovalTarget, o as isQQBotExecApprovalClientEnabled, s as matchesQQBotApprovalAccount, u as buildApprovalKeyboard } from "./channel-
|
|
3
|
+
import { c as resolveQQBotExecApprovalConfig, d as buildExecApprovalText, f as buildPluginApprovalText, l as shouldHandleQQBotExecApprovalRequest, m as resolveApprovalTarget, o as isQQBotExecApprovalClientEnabled, s as matchesQQBotApprovalAccount, u as buildApprovalKeyboard } from "./channel-CQdcwOQZ.js";
|
|
4
4
|
import { a as resolveQQBotAccount } from "./config-ZEfgeoL4.js";
|
|
5
5
|
import { resolveApprovalRequestSessionConversation } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
6
6
|
import { createChannelApprovalNativeRuntimeAdapter } from "openclaw/plugin-sdk/approval-handler-runtime";
|
|
@@ -4,6 +4,7 @@ import { uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
|
4
4
|
import fs from "node:fs";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { loadJsonFile } from "openclaw/plugin-sdk/json-store";
|
|
7
|
+
import { clearRuntimeConfigSnapshot } from "openclaw/plugin-sdk/runtime-config-snapshot";
|
|
7
8
|
//#region extensions/qqbot/src/engine/commands/builtin/state.ts
|
|
8
9
|
let resolveVersionGetter = () => "unknown";
|
|
9
10
|
let approveRuntimeGetter = null;
|
|
@@ -418,6 +419,88 @@ function registerClearStorageCommands(registry) {
|
|
|
418
419
|
});
|
|
419
420
|
}
|
|
420
421
|
//#endregion
|
|
422
|
+
//#region extensions/qqbot/src/engine/commands/builtin/register-group-allways.ts
|
|
423
|
+
function registerGroupAllwaysCommand(registry) {
|
|
424
|
+
registry.register({
|
|
425
|
+
name: "bot-group-allways",
|
|
426
|
+
description: "修改群消息默认响应模式",
|
|
427
|
+
requireAuth: true,
|
|
428
|
+
c2cOnly: true,
|
|
429
|
+
usage: [
|
|
430
|
+
`/bot-group-allways on AI 自主判断何时发言(无需 @)`,
|
|
431
|
+
`/bot-group-allways off 仅在被 @ 时回复`,
|
|
432
|
+
`/bot-group-allways 查看当前设置`,
|
|
433
|
+
``,
|
|
434
|
+
`设为 on 后,AI 会自主判断每条消息是否需要回复(无需 @)。`,
|
|
435
|
+
`仍可通过 groups.{groupId}.requireMention 对单个群覆盖。`,
|
|
436
|
+
``,
|
|
437
|
+
`优先级:具体群配置 > 通配符 "*" > defaultRequireMention(本指令)> 默认 true`
|
|
438
|
+
].join("\n"),
|
|
439
|
+
handler: async (ctx) => {
|
|
440
|
+
const arg = ctx.args.trim().toLowerCase();
|
|
441
|
+
const currentRequireMention = ctx.accountConfig?.defaultRequireMention ?? true;
|
|
442
|
+
if (!arg) return [
|
|
443
|
+
`🤖 群自主发言状态:${currentRequireMention ? "❌ 仅被 @ 时回复" : "✅ 自主判断何时发言"}`,
|
|
444
|
+
`使用 <qqbot-cmd-input text="/bot-group-allways on" show="/bot-group-allways on"/> 设为自主发言`,
|
|
445
|
+
`使用 <qqbot-cmd-input text="/bot-group-allways off" show="/bot-group-allways off"/> 设为仅被 @ 时回复`
|
|
446
|
+
].join("\n");
|
|
447
|
+
if (arg !== "on" && arg !== "off") return `❌ 参数错误,请使用 on 或 off\n\n示例:/bot-group-allways on`;
|
|
448
|
+
const newRequireMention = arg === "off";
|
|
449
|
+
if (newRequireMention === currentRequireMention) return `🤖 群自主发言已经是"${arg}"状态,无需操作`;
|
|
450
|
+
let runtime;
|
|
451
|
+
try {
|
|
452
|
+
const getter = getApproveRuntimeGetter();
|
|
453
|
+
if (!getter) throw new Error("runtime not available");
|
|
454
|
+
runtime = getter();
|
|
455
|
+
} catch {
|
|
456
|
+
const fwVer = resolveRuntimeServiceVersion();
|
|
457
|
+
const ver = getPluginVersionString();
|
|
458
|
+
return [
|
|
459
|
+
`❌ 当前版本不支持该指令`,
|
|
460
|
+
``,
|
|
461
|
+
`🦞框架版本:${fwVer}`,
|
|
462
|
+
`🤖QQBot 插件版本:v${ver}`,
|
|
463
|
+
``,
|
|
464
|
+
`可通过以下命令手动设置:`,
|
|
465
|
+
``,
|
|
466
|
+
`\`\`\`shell`,
|
|
467
|
+
`# 设为 AI 自主判断何时发言(defaultRequireMention=false)`,
|
|
468
|
+
`openclaw config set channels.qqbot.defaultRequireMention false`,
|
|
469
|
+
`# 或设为仅被 @ 时回复(defaultRequireMention=true)`,
|
|
470
|
+
`openclaw config set channels.qqbot.defaultRequireMention true`,
|
|
471
|
+
`\`\`\``
|
|
472
|
+
].join("\n");
|
|
473
|
+
}
|
|
474
|
+
try {
|
|
475
|
+
const configApi = runtime.config;
|
|
476
|
+
const currentCfg = structuredClone(configApi.current());
|
|
477
|
+
const qqbot = (currentCfg.channels ?? {}).qqbot;
|
|
478
|
+
if (!qqbot) return `❌ 配置文件中未找到 qqbot 通道配置`;
|
|
479
|
+
const accountId = ctx.accountId;
|
|
480
|
+
if (accountId !== "default" && Boolean(qqbot.accounts?.[accountId])) {
|
|
481
|
+
const nextAccounts = { ...qqbot.accounts ?? {} };
|
|
482
|
+
const acct = { ...nextAccounts[accountId] };
|
|
483
|
+
acct.defaultRequireMention = newRequireMention;
|
|
484
|
+
nextAccounts[accountId] = acct;
|
|
485
|
+
qqbot.accounts = nextAccounts;
|
|
486
|
+
} else qqbot.defaultRequireMention = newRequireMention;
|
|
487
|
+
await configApi.replaceConfigFile({
|
|
488
|
+
nextConfig: currentCfg,
|
|
489
|
+
afterWrite: { mode: "auto" }
|
|
490
|
+
});
|
|
491
|
+
clearRuntimeConfigSnapshot();
|
|
492
|
+
return [
|
|
493
|
+
`✅ 群自主发言已设置为 ${newRequireMention ? "**off**(仅被 @ 时回复)" : "**on**(AI 自主判断何时发言)"}`,
|
|
494
|
+
``,
|
|
495
|
+
newRequireMention ? `仅在被 @ 机器人才会回复。` : `AI 将自主判断群消息是否需要回复,无需被 @ 即可发言。`
|
|
496
|
+
].join("\n");
|
|
497
|
+
} catch (err) {
|
|
498
|
+
return `❌ 配置写入失败: ${err instanceof Error ? err.message : String(err)}`;
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
});
|
|
502
|
+
}
|
|
503
|
+
//#endregion
|
|
421
504
|
//#region extensions/qqbot/src/engine/commands/builtin/log-helpers.ts
|
|
422
505
|
/** Read user-configured log file paths from local config files. */
|
|
423
506
|
function getConfiguredLogFiles() {
|
|
@@ -790,6 +873,7 @@ function registerBuiltinSlashCommands(registry) {
|
|
|
790
873
|
registerClearStorageCommands(registry);
|
|
791
874
|
registerStreamingCommands(registry);
|
|
792
875
|
registerApproveCommands(registry);
|
|
876
|
+
registerGroupAllwaysCommand(registry);
|
|
793
877
|
}
|
|
794
878
|
//#endregion
|
|
795
879
|
//#region extensions/qqbot/src/engine/commands/slash-commands.ts
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/qqbot",
|
|
3
|
-
"version": "2026.6.
|
|
3
|
+
"version": "2026.6.6-beta.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@openclaw/qqbot",
|
|
9
|
-
"version": "2026.6.
|
|
9
|
+
"version": "2026.6.6-beta.1",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@tencent-connect/qqbot-connector": "1.1.0",
|
|
12
12
|
"mpg123-decoder": "1.0.3",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"zod": "4.4.3"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
|
-
"openclaw": ">=2026.6.
|
|
18
|
+
"openclaw": ">=2026.6.6-beta.1"
|
|
19
19
|
},
|
|
20
20
|
"peerDependenciesMeta": {
|
|
21
21
|
"openclaw": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/qqbot",
|
|
3
|
-
"version": "2026.6.
|
|
3
|
+
"version": "2026.6.6-beta.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "OpenClaw QQ Bot channel plugin for group and direct-message workflows.",
|
|
6
6
|
"repository": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"zod": "4.4.3"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"openclaw": ">=2026.6.
|
|
19
|
+
"openclaw": ">=2026.6.6-beta.1"
|
|
20
20
|
},
|
|
21
21
|
"peerDependenciesMeta": {
|
|
22
22
|
"openclaw": {
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"minHostVersion": ">=2026.4.10"
|
|
46
46
|
},
|
|
47
47
|
"compat": {
|
|
48
|
-
"pluginApi": ">=2026.6.
|
|
48
|
+
"pluginApi": ">=2026.6.6-beta.1"
|
|
49
49
|
},
|
|
50
50
|
"build": {
|
|
51
|
-
"openclawVersion": "2026.6.
|
|
51
|
+
"openclawVersion": "2026.6.6-beta.1"
|
|
52
52
|
},
|
|
53
53
|
"release": {
|
|
54
54
|
"publishToClawHub": true,
|