@openclaw/qqbot 2026.7.1-beta.1 → 2026.7.1-beta.2

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 CHANGED
@@ -1,8 +1,8 @@
1
- import { t as qqbotPlugin } from "./channel-Bh0MrYvU.js";
1
+ import { t as qqbotPlugin } from "./channel-BQM6pDlD.js";
2
2
  import { a as resolveQQBotAccount, i as resolveDefaultQQBotAccountId, n as applyQQBotAccountConfig, r as listQQBotAccountIds, t as DEFAULT_ACCOUNT_ID } from "./config-C1qZbh0K.js";
3
- import { t as qqbotSetupPlugin } from "./channel.setup-CldhUlTO.js";
4
- import { o as getFrameworkCommands } from "./group-DQQsZ6Y0.js";
5
- import { C as getMessageReplyConfig, D as OUTBOUND_ERROR_CODES, E as DEFAULT_MEDIA_SEND_ERROR, O as setOutboundAudioPort, S as checkMessageReplyLimit, T as recordMessageReply, _ as sendVideoMsg, a as sendText, b as resolveUserFacingMediaError, 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 getMessageReplyStats, x as MESSAGE_REPLY_LIMIT } from "./outbound-Dfa2uOEp.js";
6
- import { n as registerRemindTool, r as registerChannelTool, t as registerQQBotTools } from "./tools-BvXe7bTq.js";
7
- import { t as registerQQBotFull } from "./channel-entry-LMtNY-J6.js";
3
+ import { t as qqbotSetupPlugin } from "./channel.setup-2ItDYKhz.js";
4
+ import { o as getFrameworkCommands } from "./group-BmS1Qwst.js";
5
+ import { A as OUTBOUND_ERROR_CODES, C as resolveUserFacingMediaError, D as getMessageReplyStats, E as getMessageReplyConfig, O as recordMessageReply, T as checkMessageReplyLimit, _ as sendVideoMsg, a as sendText, f as buildMediaTarget, g as sendPhoto, h as sendDocument, i as sendProactiveMessage, j as setOutboundAudioPort, k as DEFAULT_MEDIA_SEND_ERROR, m as resolveOutboundMediaPath, n as sendCronMessage, p as parseTarget, r as sendMedia, v as sendVoice, w as MESSAGE_REPLY_LIMIT } from "./outbound-BZHwMFUX.js";
6
+ import { n as registerRemindTool, r as registerChannelTool, t as registerQQBotTools } from "./tools-C8kTMXKc.js";
7
+ import { t as registerQQBotFull } from "./channel-entry-C18ypTaG.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 };
@@ -1,11 +1,12 @@
1
1
  import { t as asOptionalObjectRecord } from "./string-normalize-R_0cKO7Q.js";
2
- import { a as qqbotSetupAdapterShared, i as qqbotMeta, n as qqbotSetupWizard, o as ensurePlatformAdapter, r as qqbotConfigAdapter, s as getBridgeLogger, t as qqbotChannelConfigSchema } from "./config-schema-gMW9zKvQ.js";
2
+ import { a as qqbotSetupAdapterShared, i as qqbotMeta, n as qqbotSetupWizard, o as ensurePlatformAdapter, r as qqbotConfigAdapter, s as getBridgeLogger, t as qqbotChannelConfigSchema } from "./config-schema-JZEf1dvB.js";
3
3
  import { a as resolveQQBotAccount, n as applyQQBotAccountConfig, r as listQQBotAccountIds, t as DEFAULT_ACCOUNT_ID$1 } from "./config-C1qZbh0K.js";
4
- import { t as getQQBotRuntime } from "./runtime-BL0xZzWe.js";
4
+ import { t as getQQBotRuntime } from "./runtime-B4HWCOa-.js";
5
5
  import { n as legacyConfigRules, r as normalizeCompatibilityConfig, t as buildQQBotStateKey } from "./state-keys-CQKlAFyo.js";
6
6
  import { n as normalizeTarget, t as looksLikeQQBotTarget } from "./target-parser-DagYRQkP.js";
7
7
  import { getExecApprovalReplyMetadata } from "openclaw/plugin-sdk/approval-runtime";
8
8
  import { createMessageReceiptFromOutboundResults, defineChannelMessageAdapter } from "openclaw/plugin-sdk/channel-outbound";
9
+ import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
9
10
  import { sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
10
11
  import { createChannelApprovalCapability } from "openclaw/plugin-sdk/approval-delivery-runtime";
11
12
  import { createLazyChannelApprovalNativeRuntimeAdapter } from "openclaw/plugin-sdk/approval-handler-adapter-runtime";
@@ -365,7 +366,7 @@ function createQQBotApprovalCapability() {
365
366
  },
366
367
  load: async () => {
367
368
  ensurePlatformAdapter();
368
- return (await import("./handler-runtime-BQ72YPsH.js")).qqbotApprovalNativeRuntime;
369
+ return (await import("./handler-runtime-rU03VA43.js")).qqbotApprovalNativeRuntime;
369
370
  }
370
371
  })
371
372
  });
@@ -998,16 +999,8 @@ function resolveQQBotGroupToolPolicy(params) {
998
999
  }
999
1000
  //#endregion
1000
1001
  //#region extensions/qqbot/src/channel.ts
1001
- let gatewayModulePromise;
1002
- function loadGatewayModule() {
1003
- gatewayModulePromise ??= import("./gateway-BgfQAYxB.js");
1004
- return gatewayModulePromise;
1005
- }
1006
- let outboundMessagingModulePromise;
1007
- function loadOutboundMessagingModule() {
1008
- outboundMessagingModulePromise ??= import("./outbound-Dfa2uOEp.js").then((n) => n.t);
1009
- return outboundMessagingModulePromise;
1010
- }
1002
+ const loadGatewayModule = createLazyRuntimeModule(() => import("./gateway-CjdB3B6n.js"));
1003
+ const loadOutboundMessagingModule = createLazyRuntimeModule(() => import("./outbound-BZHwMFUX.js").then((n) => n.t));
1011
1004
  function createQQBotSendReceipt(params) {
1012
1005
  const messageId = params.messageId?.trim();
1013
1006
  return createMessageReceiptFromOutboundResults({
@@ -1029,7 +1022,10 @@ async function sendQQBotText(params) {
1029
1022
  text: params.text,
1030
1023
  accountId: params.accountId,
1031
1024
  replyToId: params.replyToId,
1032
- account: toGatewayAccount(account)
1025
+ account: toGatewayAccount(account),
1026
+ ...params.mediaAccess ? { mediaAccess: params.mediaAccess } : {},
1027
+ ...params.mediaLocalRoots ? { mediaLocalRoots: params.mediaLocalRoots } : {},
1028
+ ...params.mediaReadFile ? { mediaReadFile: params.mediaReadFile } : {}
1033
1029
  });
1034
1030
  return {
1035
1031
  channel: "qqbot",
@@ -1052,7 +1048,10 @@ async function sendQQBotMedia(params) {
1052
1048
  mediaUrl: params.mediaUrl ?? "",
1053
1049
  accountId: params.accountId,
1054
1050
  replyToId: params.replyToId,
1055
- account: toGatewayAccount(account)
1051
+ account: toGatewayAccount(account),
1052
+ ...params.mediaAccess ? { mediaAccess: params.mediaAccess } : {},
1053
+ ...params.mediaLocalRoots ? { mediaLocalRoots: params.mediaLocalRoots } : {},
1054
+ ...params.mediaReadFile ? { mediaReadFile: params.mediaReadFile } : {}
1056
1055
  });
1057
1056
  return {
1058
1057
  channel: "qqbot",
@@ -1065,6 +1064,14 @@ async function sendQQBotMedia(params) {
1065
1064
  meta: result.error ? { error: result.error } : void 0
1066
1065
  };
1067
1066
  }
1067
+ function resolveQQBotOutboundMediaAccessContext(ctx) {
1068
+ const record = ctx && typeof ctx === "object" ? ctx : void 0;
1069
+ return {
1070
+ ...record?.mediaAccess ? { mediaAccess: record.mediaAccess } : {},
1071
+ ...record?.mediaLocalRoots ? { mediaLocalRoots: record.mediaLocalRoots } : {},
1072
+ ...record?.mediaReadFile ? { mediaReadFile: record.mediaReadFile } : {}
1073
+ };
1074
+ }
1068
1075
  function toQQBotMessageSendResult(result) {
1069
1076
  if (result.meta?.error) throw new Error(result.meta.error);
1070
1077
  if (result.receipt.platformMessageIds.length === 0) throw new Error("QQBot message adapter send did not return a platform message id");
@@ -1086,7 +1093,8 @@ const qqbotMessageAdapter = defineChannelMessageAdapter({
1086
1093
  to: ctx.to,
1087
1094
  text: ctx.text,
1088
1095
  accountId: ctx.accountId,
1089
- replyToId: ctx.replyToId
1096
+ replyToId: ctx.replyToId,
1097
+ ...resolveQQBotOutboundMediaAccessContext(ctx)
1090
1098
  })),
1091
1099
  media: async (ctx) => toQQBotMessageSendResult(await sendQQBotMedia({
1092
1100
  cfg: ctx.cfg,
@@ -1094,7 +1102,8 @@ const qqbotMessageAdapter = defineChannelMessageAdapter({
1094
1102
  text: ctx.text,
1095
1103
  mediaUrl: ctx.mediaUrl,
1096
1104
  accountId: ctx.accountId,
1097
- replyToId: ctx.replyToId
1105
+ replyToId: ctx.replyToId,
1106
+ ...resolveQQBotOutboundMediaAccessContext(ctx)
1098
1107
  }))
1099
1108
  }
1100
1109
  });
@@ -1165,20 +1174,22 @@ const qqbotPlugin = {
1165
1174
  payload,
1166
1175
  hint
1167
1176
  }),
1168
- sendText: async ({ to, text, accountId, replyToId, cfg }) => await sendQQBotText({
1169
- cfg,
1170
- to,
1171
- text,
1172
- accountId,
1173
- replyToId
1177
+ sendText: async (ctx) => await sendQQBotText({
1178
+ cfg: ctx.cfg,
1179
+ to: ctx.to,
1180
+ text: ctx.text,
1181
+ accountId: ctx.accountId,
1182
+ replyToId: ctx.replyToId,
1183
+ ...resolveQQBotOutboundMediaAccessContext(ctx)
1174
1184
  }),
1175
- sendMedia: async ({ to, text, mediaUrl, accountId, replyToId, cfg }) => await sendQQBotMedia({
1176
- cfg,
1177
- to,
1178
- text,
1179
- mediaUrl,
1180
- accountId,
1181
- replyToId
1185
+ sendMedia: async (ctx) => await sendQQBotMedia({
1186
+ cfg: ctx.cfg,
1187
+ to: ctx.to,
1188
+ text: ctx.text,
1189
+ mediaUrl: ctx.mediaUrl,
1190
+ accountId: ctx.accountId,
1191
+ replyToId: ctx.replyToId,
1192
+ ...resolveQQBotOutboundMediaAccessContext(ctx)
1182
1193
  })
1183
1194
  },
1184
1195
  gateway: {
@@ -1,7 +1,7 @@
1
1
  import { a as resolveQQBotAccount } from "./config-C1qZbh0K.js";
2
- import { d as PRIVATE_CHAT_ONLY_TEXT, n as resolveGroupCommandLevelFromAccountConfig, o as getFrameworkCommands } from "./group-DQQsZ6Y0.js";
3
- import { h as sendDocument } from "./outbound-Dfa2uOEp.js";
4
- import { t as registerQQBotTools } from "./tools-BvXe7bTq.js";
2
+ import { d as PRIVATE_CHAT_ONLY_TEXT, n as resolveGroupCommandLevelFromAccountConfig, o as getFrameworkCommands } from "./group-BmS1Qwst.js";
3
+ import { h as sendDocument } from "./outbound-BZHwMFUX.js";
4
+ import { t as registerQQBotTools } from "./tools-C8kTMXKc.js";
5
5
  //#region extensions/qqbot/src/bridge/commands/framework-context-adapter.ts
6
6
  /**
7
7
  * Default queue snapshot used for framework-registered commands.
@@ -1,2 +1,2 @@
1
- import { t as registerQQBotFull } from "./channel-entry-LMtNY-J6.js";
1
+ import { t as registerQQBotFull } from "./channel-entry-C18ypTaG.js";
2
2
  export { registerQQBotFull };
@@ -1,2 +1,2 @@
1
- import { t as qqbotPlugin } from "./channel-Bh0MrYvU.js";
1
+ import { t as qqbotPlugin } from "./channel-BQM6pDlD.js";
2
2
  export { qqbotPlugin };
@@ -1,4 +1,4 @@
1
- import { a as qqbotSetupAdapterShared, i as qqbotMeta, n as qqbotSetupWizard, r as qqbotConfigAdapter, t as qqbotChannelConfigSchema } from "./config-schema-gMW9zKvQ.js";
1
+ import { a as qqbotSetupAdapterShared, i as qqbotMeta, n as qqbotSetupWizard, r as qqbotConfigAdapter, t as qqbotChannelConfigSchema } from "./config-schema-JZEf1dvB.js";
2
2
  //#region extensions/qqbot/src/channel.setup.ts
3
3
  /**
4
4
  * Setup-only QQBot plugin — lightweight subset used during `openclaw onboard`
@@ -1,5 +1,6 @@
1
1
  import { d as registerPlatformAdapterFactory, l as hasPlatformAdapter, n as normalizeLowercaseStringOrEmpty, u as registerPlatformAdapter } from "./string-normalize-R_0cKO7Q.js";
2
2
  import { a as resolveQQBotAccount, c as describeAccount, i as resolveDefaultQQBotAccountId, l as formatAllowFrom, n as applyQQBotAccountConfig, r as listQQBotAccountIds, s as applyAccountConfig, u as isAccountConfigured } from "./config-C1qZbh0K.js";
3
+ import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
3
4
  import { buildSecretInputSchema, hasConfiguredSecretInput, normalizeResolvedSecretInputString, normalizeSecretInputString } from "openclaw/plugin-sdk/secret-input";
4
5
  import { resolvePreferredOpenClawTmpDir } from "openclaw/plugin-sdk/temp-path";
5
6
  import { applyAccountNameToChannelSection, deleteAccountFromConfigSection, setAccountEnabledInConfigSection } from "openclaw/plugin-sdk/core";
@@ -47,11 +48,7 @@ function getBridgeLogger() {
47
48
  * statically at the top level so they work reliably in both production and
48
49
  * vitest (which resolves bare specifiers via `resolve.alias`, not Node CJS).
49
50
  */
50
- let mediaRuntimeModulePromise = null;
51
- const loadMediaRuntimeModule = async () => {
52
- mediaRuntimeModulePromise ??= import("openclaw/plugin-sdk/media-runtime");
53
- return await mediaRuntimeModulePromise;
54
- };
51
+ const loadMediaRuntimeModule = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/media-runtime"));
55
52
  function createBuiltinAdapter() {
56
53
  return {
57
54
  async validateRemoteUrl(_url, _options) {},