





















@@ -1,6 +1,6 @@
11import fs from "node:fs";
22import path from "node:path";
3-import { beforeAll, describe, expect, it, vi } from "vitest";
3+import { afterAll, beforeAll, describe, expect, it, vi } from "vitest";
44import type { AuthProfileStore } from "../agents/auth-profiles.js";
55import type { OpenClawConfig } from "../config/config.js";
66import type { PluginOrigin } from "../plugins/types.js";
@@ -70,6 +70,24 @@ let collectConfigAssignments: typeof import("./runtime-config-collectors.js").co
7070let createResolverContext: typeof import("./runtime-shared.js").createResolverContext;
7171let resolveSecretRefValues: typeof import("./resolve.js").resolveSecretRefValues;
7272let resolveRuntimeWebTools: typeof import("./runtime-web-tools.js").resolveRuntimeWebTools;
73+const previousBundledPluginsDir = process.env.OPENCLAW_BUNDLED_PLUGINS_DIR;
74+const previousTrustBundledPluginsDir = process.env.OPENCLAW_TEST_TRUST_BUNDLED_PLUGINS_DIR;
75+76+process.env.OPENCLAW_BUNDLED_PLUGINS_DIR ??= "extensions";
77+process.env.OPENCLAW_TEST_TRUST_BUNDLED_PLUGINS_DIR ??= "1";
78+79+afterAll(() => {
80+if (previousBundledPluginsDir === undefined) {
81+delete process.env.OPENCLAW_BUNDLED_PLUGINS_DIR;
82+} else {
83+process.env.OPENCLAW_BUNDLED_PLUGINS_DIR = previousBundledPluginsDir;
84+}
85+if (previousTrustBundledPluginsDir === undefined) {
86+delete process.env.OPENCLAW_TEST_TRUST_BUNDLED_PLUGINS_DIR;
87+} else {
88+process.env.OPENCLAW_TEST_TRUST_BUNDLED_PLUGINS_DIR = previousTrustBundledPluginsDir;
89+}
90+});
73917492async function ensureConfigCoverageRuntimeLoaded(): Promise<void> {
7593if (!collectConfigAssignments) {
@@ -317,6 +335,16 @@ function applyConfigForOpenClawTarget(
317335"https://example.com/hook",
318336);
319337}
338+if (entry.id === "channels.qqbot.clientSecret") {
339+setPathCreateStrict(config, ["channels", "qqbot", "appId"], "sample-app-id");
340+}
341+if (entry.id === "channels.qqbot.accounts.*.clientSecret") {
342+setPathCreateStrict(
343+config,
344+["channels", "qqbot", "accounts", wildcardToken, "appId"],
345+"sample-app-id",
346+);
347+}
320348if (entry.id === "channels.feishu.verificationToken") {
321349setPathCreateStrict(config, ["channels", "feishu", "connectionMode"], "webhook");
322350}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。