@openclaw/qqbot 2026.7.1-beta.1 → 2026.7.1-beta.4
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 +6 -6
- package/dist/{channel-Bh0MrYvU.js → channel-D1UztsnG.js} +84 -34
- package/dist/{channel-entry-LMtNY-J6.js → channel-entry-C5YdhX3Y.js} +3 -3
- package/dist/channel-entry-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.setup-CldhUlTO.js → channel.setup-2ItDYKhz.js} +1 -1
- package/dist/{config-schema-gMW9zKvQ.js → config-schema-JZEf1dvB.js} +2 -5
- package/dist/{gateway-BgfQAYxB.js → gateway-pJQppxe4.js} +344 -138
- package/dist/{group-DQQsZ6Y0.js → group-o0GmovSf.js} +14 -11
- package/dist/{handler-runtime-BQ72YPsH.js → handler-runtime-zQvT6SrI.js} +3 -3
- package/dist/{log-SDfMMBWe.js → log-DEtcoDWe.js} +3 -4
- package/dist/{outbound-Dfa2uOEp.js → outbound-BIrfvvFJ.js} +310 -68
- package/dist/{runtime-BL0xZzWe.js → runtime-DodcT_fQ.js} +1 -1
- package/dist/runtime-api.js +1 -1
- package/dist/{sender-BHWpE_yH.js → sender-CjDuU-uz.js} +31 -25
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{tools-BvXe7bTq.js → tools-UJJ-tLHP.js} +19 -36
- package/dist/tools-api.js +1 -1
- package/npm-shrinkwrap.json +3 -3
- package/package.json +4 -4
- package/skills/qqbot-media/SKILL.md +14 -11
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { t as asOptionalObjectRecord } from "./string-normalize-R_0cKO7Q.js";
|
|
2
2
|
import { d as resolveAccountBase } from "./config-C1qZbh0K.js";
|
|
3
|
-
import { n as debugLog } from "./log-
|
|
4
|
-
import {
|
|
3
|
+
import { n as debugLog } from "./log-DEtcoDWe.js";
|
|
4
|
+
import { I as getQQBotMediaPath, N as getHomeDir, P as getQQBotDataDir, z as isWindows } from "./outbound-BIrfvvFJ.js";
|
|
5
5
|
import { asBoolean, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import fs from "node:fs";
|
|
7
7
|
import path from "node:path";
|
|
8
|
+
import { formatByteSize } from "openclaw/plugin-sdk/number-runtime";
|
|
8
9
|
import { clearRuntimeConfigSnapshot } from "openclaw/plugin-sdk/runtime-config-snapshot";
|
|
9
10
|
import { loadJsonFile } from "openclaw/plugin-sdk/json-store";
|
|
10
11
|
//#region extensions/qqbot/src/engine/commands/builtin/state.ts
|
|
@@ -321,10 +322,12 @@ function scanDirectoryFiles(dirPath) {
|
|
|
321
322
|
return files;
|
|
322
323
|
}
|
|
323
324
|
function formatBytes(bytes) {
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
325
|
+
return formatByteSize(bytes, {
|
|
326
|
+
style: "legacy-binary",
|
|
327
|
+
maxUnit: "giga",
|
|
328
|
+
separator: " ",
|
|
329
|
+
fractionDigits: (_value, unit) => unit === "byte" ? null : 1
|
|
330
|
+
});
|
|
328
331
|
}
|
|
329
332
|
function removeEmptyDirs(dirPath) {
|
|
330
333
|
if (!fs.existsSync(dirPath)) return;
|
|
@@ -549,7 +552,7 @@ function collectCandidateLogDirs() {
|
|
|
549
552
|
pushDir(path.join(homeDir, name));
|
|
550
553
|
pushDir(path.join(homeDir, name, "logs"));
|
|
551
554
|
}
|
|
552
|
-
const searchRoots = new Set([
|
|
555
|
+
const searchRoots = /* @__PURE__ */ new Set([
|
|
553
556
|
homeDir,
|
|
554
557
|
process.cwd(),
|
|
555
558
|
path.dirname(process.cwd())
|
|
@@ -880,14 +883,14 @@ function registerBuiltinSlashCommands(registry) {
|
|
|
880
883
|
//#endregion
|
|
881
884
|
//#region extensions/qqbot/src/engine/commands/command-visibility.ts
|
|
882
885
|
const PRIVATE_CHAT_ONLY_TEXT = "该命令仅限私聊使用,请在私聊中发送。";
|
|
883
|
-
const GROUP_VISIBLE_CORE_COMMANDS = new Set([
|
|
886
|
+
const GROUP_VISIBLE_CORE_COMMANDS = /* @__PURE__ */ new Set([
|
|
884
887
|
"help",
|
|
885
888
|
"btw",
|
|
886
889
|
"side",
|
|
887
890
|
"stop"
|
|
888
891
|
]);
|
|
889
|
-
const STRICT_CORE_COMMANDS = new Set(["new", "reset"]);
|
|
890
|
-
const GROUP_HIDDEN_CORE_COMMANDS = new Set([
|
|
892
|
+
const STRICT_CORE_COMMANDS = /* @__PURE__ */ new Set(["new", "reset"]);
|
|
893
|
+
const GROUP_HIDDEN_CORE_COMMANDS = /* @__PURE__ */ new Set([
|
|
891
894
|
"goal",
|
|
892
895
|
"usage",
|
|
893
896
|
"activation",
|
|
@@ -904,7 +907,7 @@ const GROUP_HIDDEN_CORE_COMMANDS = new Set([
|
|
|
904
907
|
"reason",
|
|
905
908
|
"queue"
|
|
906
909
|
]);
|
|
907
|
-
const PRIVATE_ONLY_CORE_COMMANDS = new Set([
|
|
910
|
+
const PRIVATE_ONLY_CORE_COMMANDS = /* @__PURE__ */ new Set([
|
|
908
911
|
"commands",
|
|
909
912
|
"tools",
|
|
910
913
|
"skill",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as getMessageApi, t as accountToCreds } from "./sender-
|
|
2
|
-
import { o as ensurePlatformAdapter, s as getBridgeLogger } from "./config-schema-
|
|
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-
|
|
1
|
+
import { c as getMessageApi, t as accountToCreds } from "./sender-CjDuU-uz.js";
|
|
2
|
+
import { o as ensurePlatformAdapter, s as getBridgeLogger } from "./config-schema-JZEf1dvB.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-D1UztsnG.js";
|
|
4
4
|
import { a as resolveQQBotAccount } from "./config-C1qZbh0K.js";
|
|
5
5
|
import { resolveApprovalRequestSessionConversation } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
6
6
|
import { createChannelApprovalNativeRuntimeAdapter } from "openclaw/plugin-sdk/approval-handler-runtime";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
1
2
|
//#region extensions/qqbot/src/engine/utils/format.ts
|
|
2
3
|
/**
|
|
3
4
|
* General formatting and string utilities.
|
|
@@ -22,7 +23,7 @@ function formatErrorMessage(err) {
|
|
|
22
23
|
if (err instanceof Error) {
|
|
23
24
|
let formatted = err.message || err.name || "Error";
|
|
24
25
|
let cause = err.cause;
|
|
25
|
-
const seen = new Set([err]);
|
|
26
|
+
const seen = /* @__PURE__ */ new Set([err]);
|
|
26
27
|
while (cause && !seen.has(cause)) {
|
|
27
28
|
seen.add(cause);
|
|
28
29
|
if (cause instanceof Error) {
|
|
@@ -59,8 +60,6 @@ function formatDuration(durationMs) {
|
|
|
59
60
|
*
|
|
60
61
|
* Only outputs when the QQBOT_DEBUG environment variable is set,
|
|
61
62
|
* preventing user message content from leaking in production logs.
|
|
62
|
-
*
|
|
63
|
-
* Self-contained within engine/ — no framework SDK dependency.
|
|
64
63
|
*/
|
|
65
64
|
function isQqbotDebugEnabled() {
|
|
66
65
|
const value = process.env.QQBOT_DEBUG;
|
|
@@ -86,7 +85,7 @@ function sanitizeDebugLogValue(value) {
|
|
|
86
85
|
}
|
|
87
86
|
const sanitized = text.replace(/\p{Cc}/gu, " ").replace(/\s+/g, " ").trim();
|
|
88
87
|
if (sanitized.length <= MAX_LOG_VALUE_CHARS) return sanitized;
|
|
89
|
-
return `${sanitized
|
|
88
|
+
return `${truncateUtf16Safe(sanitized, MAX_LOG_VALUE_CHARS)}...`;
|
|
90
89
|
}
|
|
91
90
|
function formatDebugLogArgs(args) {
|
|
92
91
|
return args.map(sanitizeDebugLogValue).join(" ");
|