fix(check): clean up extension rename fallout

This commit is contained in:
Vincent Koc
2026-04-06 15:18:08 +01:00
parent e6df924a34
commit da14745f2e
13 changed files with 20 additions and 24 deletions

View File

@@ -60,7 +60,7 @@ async function setupLifecycleMonitor() {
return setupFeishuLifecycleHandler({
createEventDispatcherMock,
onRegister: (registered) => {
handlers = registered;
_handlers = registered;
},
runtime: lastRuntime,
cfg: lifecycleConfig,
@@ -74,7 +74,7 @@ describe("Feishu ACP-init failure lifecycle", () => {
beforeEach(() => {
vi.useRealTimers();
vi.clearAllMocks();
handlers = {};
_handlers = {};
lastRuntime = null;
setFeishuLifecycleStateDir("openclaw-feishu-acp-failure");

View File

@@ -72,7 +72,7 @@ async function setupLifecycleMonitor() {
return setupFeishuLifecycleHandler({
createEventDispatcherMock,
onRegister: (registered) => {
handlers = registered;
_handlers = registered;
},
runtime: lastRuntime,
cfg: lifecycleConfig,
@@ -86,7 +86,7 @@ describe("Feishu bot-menu lifecycle", () => {
beforeEach(() => {
vi.useRealTimers();
vi.clearAllMocks();
handlers = {};
_handlers = {};
lastRuntime = null;
setFeishuLifecycleStateDir("openclaw-feishu-bot-menu");

View File

@@ -23,7 +23,6 @@ const {
finalizeInboundContextMock,
resolveAgentRouteMock,
resolveBoundConversationMock,
_sendMessageFeishuMock,
withReplyDispatcherMock,
} = getFeishuLifecycleTestMocks();

View File

@@ -100,7 +100,7 @@ async function setupLifecycleMonitor() {
return setupFeishuLifecycleHandler({
createEventDispatcherMock,
onRegister: (registered) => {
handlers = registered;
_handlers = registered;
},
runtime: lastRuntime,
cfg: lifecycleConfig,
@@ -114,7 +114,7 @@ describe("Feishu card-action lifecycle", () => {
beforeEach(() => {
vi.useRealTimers();
vi.clearAllMocks();
handlers = {};
_handlers = {};
lastRuntime = null;
resetProcessedFeishuCardActionTokensForTests();
setFeishuLifecycleStateDir("openclaw-feishu-card-action");

View File

@@ -69,7 +69,7 @@ async function setupLifecycleMonitor() {
return setupFeishuLifecycleHandler({
createEventDispatcherMock,
onRegister: (registered) => {
handlers = registered;
_handlers = registered;
},
runtime: lastRuntime,
cfg: lifecycleConfig,
@@ -83,7 +83,7 @@ describe("Feishu reply-once lifecycle", () => {
beforeEach(() => {
vi.useRealTimers();
vi.clearAllMocks();
handlers = {};
_handlers = {};
lastRuntime = null;
setFeishuLifecycleStateDir("openclaw-feishu-lifecycle");

View File

@@ -7,7 +7,7 @@ function createPinsClient(seedPinned: string[], knownBodies: Record<string, stri
const getRoomStateEvent = vi.fn(async () => ({ pinned: [...pinned] }));
const sendStateEvent = vi.fn(
async (_roomId: string, _type: string, _key: string, payload: unknown) => {
pinned = [...payload.pinned];
pinned = [...((payload as { pinned: string[] }).pinned ?? [])];
},
);
const getEvent = vi.fn(async (_roomId: string, eventId: string) => {

View File

@@ -489,7 +489,7 @@ describe("matrix monitor handler pairing account scope", () => {
});
it("drops forged metadata-only mentions before agent routing", async () => {
const { handler, recordInboundSession, _resolveAgentRoute } = createMatrixHandlerTestHarness({
const { handler, recordInboundSession, resolveAgentRoute } = createMatrixHandlerTestHarness({
isDirectMessage: false,
mentionRegexes: [/@bot/i],
getMemberDisplayName: async () => "sender",
@@ -505,6 +505,7 @@ describe("matrix monitor handler pairing account scope", () => {
);
expect(recordInboundSession).not.toHaveBeenCalled();
expect(resolveAgentRoute).not.toHaveBeenCalled();
});
it("skips media downloads for unmentioned group media messages", async () => {

View File

@@ -606,12 +606,6 @@ describe("monitorMatrixProvider", () => {
});
describe("matrix plugin registration", () => {
let _matrixPlugin: typeof import("../../../index.js").default;
beforeAll(async () => {
({ default: matrixPlugin } = await import("../../../index.js"));
});
beforeEach(() => {
vi.clearAllMocks();
});

View File

@@ -52,7 +52,7 @@ export const mattermostSetupAdapter: ChannelSetupAdapter = {
message: "Mattermost requires --bot-token and --http-url (or --use-env).",
},
],
validate: ({ _accountId, input }) => {
validate: ({ input }) => {
const token = input.botToken ?? input.token;
const baseUrl = normalizeMattermostBaseUrl(input.httpUrl);
if (!input.useEnv && (!token || !baseUrl)) {

View File

@@ -204,7 +204,7 @@ export const nextcloudTalkSetupAdapter: ChannelSetupAdapter = {
validateInput: createSetupInputPresenceValidator({
defaultAccountOnlyEnvError:
"NEXTCLOUD_TALK_BOT_SECRET can only be used for the default account.",
validate: ({ _accountId, input }) => {
validate: ({ input }) => {
const setupInput = input as NextcloudSetupInput;
if (!setupInput.useEnv && !setupInput.secret && !setupInput.secretFile) {
return "Nextcloud Talk requires bot secret or --secret-file (or --use-env).";

View File

@@ -2,7 +2,8 @@ import {
defineBundledChannelEntry,
loadBundledEntryExportSync,
} from "openclaw/plugin-sdk/channel-entry-contract";
import type { PluginRuntime, ResolvedNostrAccount } from "./api.js";
import type { PluginRuntime } from "./api.js";
import type { ResolvedNostrAccount } from "./src/types.js";
function createNostrProfileHttpHandler() {
return loadBundledEntryExportSync<

View File

@@ -1,5 +1,6 @@
import { afterEach, describe, expect, it, vi } from "vitest";
import { createStartAccountContext } from "../../../test/helpers/plugins/start-account-context.js";
import type { OpenClawConfig } from "../runtime-api.js";
import type { PluginRuntime } from "../runtime-api.js";
import { nostrPlugin } from "./channel.js";
import { setNostrRuntime } from "./runtime.js";
@@ -64,7 +65,7 @@ describe("nostr outbound cfg threading", () => {
const cfg = createCfg();
await nostrPlugin.outbound!.sendText!({
cfg: cfg as unknown,
cfg: cfg as OpenClawConfig,
to: "NPUB123",
text: "|a|b|",
accountId: "default",
@@ -121,7 +122,7 @@ describe("nostr outbound cfg threading", () => {
};
await nostrPlugin.outbound!.sendText!({
cfg: cfg as unknown,
cfg: cfg as OpenClawConfig,
to: "NPUB123",
text: "hello",
});

View File

@@ -178,14 +178,14 @@ describe("nostr-profile-http", () => {
describe("route matching", () => {
it("returns false for non-nostr paths", async () => {
const { _res, run } = createProfileHttpHarness("GET", "/api/channels/telegram/profile");
const { run } = createProfileHttpHarness("GET", "/api/channels/telegram/profile");
const result = await run();
expect(result).toBe(false);
});
it("returns false for paths without accountId", async () => {
const { _res, run } = createProfileHttpHarness("GET", "/api/channels/nostr/");
const { run } = createProfileHttpHarness("GET", "/api/channels/nostr/");
const result = await run();
expect(result).toBe(false);