fix(ci): restore extension boundary guards

This commit is contained in:
Vincent Koc
2026-04-12 09:37:36 +01:00
parent 3b4f411f7c
commit ccbef550e5
2 changed files with 4 additions and 5 deletions

View File

@@ -1,9 +1,9 @@
import fs from "node:fs";
import os from "node:os";
import path from "node:path";
import type { App } from "@slack/bolt";
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime";
import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env";
import { resolvePreferredOpenClawTmpDir } from "openclaw/plugin-sdk/temp-path";
import type { ResolvedSlackAccount } from "../../accounts.js";
import type { SlackChannelConfigEntries } from "../channel-config.js";
import { createSlackMonitorContext } from "../context.js";
@@ -80,7 +80,7 @@ export function createSlackSessionStoreFixture(prefix: string) {
return {
setup() {
fixtureRoot = fs.mkdtempSync(path.join(os.tmpdir(), prefix));
fixtureRoot = fs.mkdtempSync(path.join(resolvePreferredOpenClawTmpDir(), prefix));
},
cleanup() {
if (!fixtureRoot) {

View File

@@ -6,7 +6,7 @@ import { setActivePluginRegistry } from "../plugins/runtime.js";
import type { PluginWebSearchProviderEntry } from "../plugins/types.js";
type PrepareSecretsRuntimeSnapshot = typeof import("./runtime.js").prepareSecretsRuntimeSnapshot;
type WebProviderUnderTest = "brave" | "gemini" | "grok" | "kimi" | "perplexity" | "firecrawl";
type WebProviderUnderTest = "brave" | "gemini" | "grok" | "kimi" | "perplexity";
const { resolvePluginWebSearchProvidersMock } = vi.hoisted(() => ({
resolvePluginWebSearchProvidersMock: vi.fn(() => buildTestWebSearchProviders()),
@@ -56,7 +56,7 @@ function createTestProvider(params: {
getCredentialValue: readSearchConfigKey,
setCredentialValue: (searchConfigTarget, value) => {
const providerConfig =
params.id === "brave" || params.id === "firecrawl"
params.id === "brave"
? searchConfigTarget
: ((searchConfigTarget[params.id] ??= {}) as { apiKey?: unknown });
providerConfig.apiKey = value;
@@ -89,7 +89,6 @@ export function buildTestWebSearchProviders(): PluginWebSearchProviderEntry[] {
createTestProvider({ id: "grok", pluginId: "xai", order: 30 }),
createTestProvider({ id: "kimi", pluginId: "moonshot", order: 40 }),
createTestProvider({ id: "perplexity", pluginId: "perplexity", order: 50 }),
createTestProvider({ id: "firecrawl", pluginId: "firecrawl", order: 60 }),
];
}