@openclaw/qqbot 2026.5.7 → 2026.5.9-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 +5 -5
- package/dist/{channel-CC2YO9fj.js → channel-nsJeL4qp.js} +128 -58
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.setup-ByCRAe5H.js → channel.setup-DS8qSqfn.js} +1 -1
- package/dist/{config-schema-DFcjQw73.js → config-schema-BUrvFkQH.js} +1 -1
- package/dist/{gateway-Cs3-_on9.js → gateway-Dcs6Ip8b.js} +74 -34
- package/dist/{handler-runtime-Bqm6N0WG.js → handler-runtime-DraqODp_.js} +1 -1
- package/dist/{outbound-BJfhwrPg.js → outbound-CqRmSFJZ.js} +18 -57
- package/dist/{request-context-Cjwx7OwW.js → request-context-DVsN666m.js} +26 -7
- package/dist/{runtime-BJAS3eXW.js → runtime-C3Qpr4Ph.js} +1 -1
- package/dist/runtime-api.js +1 -1
- package/dist/{sender-p-B14eLG.js → sender-CgdXGY2H.js} +241 -268
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{target-parser-Y0prnrXD.js → target-parser-DQ6J3Qe-.js} +1 -1
- package/package.json +5 -6
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as getHomeDir, f as isWindows, l as getQQBotMediaPath, o as getQQBotDataDir } from "./target-parser-
|
|
1
|
+
import { S as debugLog } from "./sender-CgdXGY2H.js";
|
|
2
|
+
import { a as getHomeDir, f as isWindows, l as getQQBotMediaPath, o as getQQBotDataDir } from "./target-parser-DQ6J3Qe-.js";
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
5
|
+
import { loadJsonFile } from "openclaw/plugin-sdk/json-store";
|
|
5
6
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
6
7
|
//#region extensions/qqbot/src/engine/commands/builtin/state.ts
|
|
7
8
|
let _resolveVersion = () => "unknown";
|
|
@@ -427,9 +428,7 @@ function getConfiguredLogFiles() {
|
|
|
427
428
|
"clawdbot",
|
|
428
429
|
"moltbot"
|
|
429
430
|
]) try {
|
|
430
|
-
const
|
|
431
|
-
if (!fs.existsSync(cfgPath)) continue;
|
|
432
|
-
const logFile = JSON.parse(fs.readFileSync(cfgPath, "utf8"))?.logging?.file;
|
|
431
|
+
const logFile = loadJsonFile(path.join(homeDir, `.${cli}`, `${cli}.json`))?.logging?.file;
|
|
433
432
|
if (logFile && typeof logFile === "string") files.push(path.resolve(logFile));
|
|
434
433
|
break;
|
|
435
434
|
} catch {}
|
|
@@ -501,6 +500,27 @@ function collectCandidateLogDirs() {
|
|
|
501
500
|
]) pushDir(path.join(tmpRoot, name));
|
|
502
501
|
return Array.from(dirs);
|
|
503
502
|
}
|
|
503
|
+
function addCollisionSuffix(filePath, suffix) {
|
|
504
|
+
const ext = path.extname(filePath);
|
|
505
|
+
const baseName = path.basename(filePath, ext);
|
|
506
|
+
return path.join(path.dirname(filePath), `${baseName}-${suffix}${ext}`);
|
|
507
|
+
}
|
|
508
|
+
function writeNewTextFileSync(filePath, contents) {
|
|
509
|
+
for (let suffix = 1; suffix <= 100; suffix++) {
|
|
510
|
+
const candidate = suffix === 1 ? filePath : addCollisionSuffix(filePath, suffix);
|
|
511
|
+
try {
|
|
512
|
+
fs.writeFileSync(candidate, contents, {
|
|
513
|
+
encoding: "utf8",
|
|
514
|
+
flag: "wx"
|
|
515
|
+
});
|
|
516
|
+
return candidate;
|
|
517
|
+
} catch (error) {
|
|
518
|
+
if (typeof error === "object" && error && "code" in error && error.code === "EEXIST") continue;
|
|
519
|
+
throw error;
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
throw new Error(`Could not find an unused log export filename near ${filePath}`);
|
|
523
|
+
}
|
|
504
524
|
function collectRecentLogFiles(logDirs) {
|
|
505
525
|
const candidates = [];
|
|
506
526
|
const dedupe = /* @__PURE__ */ new Set();
|
|
@@ -626,8 +646,7 @@ function buildBotLogsResult() {
|
|
|
626
646
|
if (lines.length === 0) return `⚠️ 找到了日志文件,但无法读取。请检查文件权限。`;
|
|
627
647
|
const tmpDir = getQQBotDataDir("downloads");
|
|
628
648
|
const timestamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
|
|
629
|
-
const tmpFile = path.join(tmpDir, `bot-logs-${timestamp}.txt`);
|
|
630
|
-
fs.writeFileSync(tmpFile, lines.join("\n"), "utf8");
|
|
649
|
+
const tmpFile = writeNewTextFileSync(path.join(tmpDir, `bot-logs-${timestamp}.txt`), lines.join("\n"));
|
|
631
650
|
const fileCount = recentFiles.length;
|
|
632
651
|
const topSources = Array.from(new Set(recentFiles.map((item) => item.sourceDir))).slice(0, 3);
|
|
633
652
|
let summaryText = `共 ${fileCount} 个日志文件,包含 ${totalIncluded} 行内容`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as setOpenClawVersion } from "./sender-
|
|
1
|
+
import { _ as setOpenClawVersion } from "./sender-CgdXGY2H.js";
|
|
2
2
|
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
|
|
3
3
|
//#region extensions/qqbot/src/bridge/runtime.ts
|
|
4
4
|
const { setRuntime: _setRuntime, getRuntime: getQQBotRuntime } = createPluginRuntimeStore({
|
package/dist/runtime-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as setQQBotRuntime, t as getQQBotRuntime } from "./runtime-
|
|
1
|
+
import { r as setQQBotRuntime, t as getQQBotRuntime } from "./runtime-C3Qpr4Ph.js";
|
|
2
2
|
export { getQQBotRuntime, setQQBotRuntime };
|