diff --git a/extensions/feishu/src/monitor.acp-init-failure.lifecycle.test.ts b/extensions/feishu/src/monitor.acp-init-failure.lifecycle.test.ts index 6cb75259130..16fce5a3198 100644 --- a/extensions/feishu/src/monitor.acp-init-failure.lifecycle.test.ts +++ b/extensions/feishu/src/monitor.acp-init-failure.lifecycle.test.ts @@ -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"); diff --git a/extensions/feishu/src/monitor.bot-menu.lifecycle.test.ts b/extensions/feishu/src/monitor.bot-menu.lifecycle.test.ts index b297961febe..7628f5fd045 100644 --- a/extensions/feishu/src/monitor.bot-menu.lifecycle.test.ts +++ b/extensions/feishu/src/monitor.bot-menu.lifecycle.test.ts @@ -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"); diff --git a/extensions/feishu/src/monitor.broadcast.reply-once.lifecycle.test.ts b/extensions/feishu/src/monitor.broadcast.reply-once.lifecycle.test.ts index 9b0bde65b3c..4f1159ce659 100644 --- a/extensions/feishu/src/monitor.broadcast.reply-once.lifecycle.test.ts +++ b/extensions/feishu/src/monitor.broadcast.reply-once.lifecycle.test.ts @@ -23,7 +23,6 @@ const { finalizeInboundContextMock, resolveAgentRouteMock, resolveBoundConversationMock, - _sendMessageFeishuMock, withReplyDispatcherMock, } = getFeishuLifecycleTestMocks(); diff --git a/extensions/feishu/src/monitor.card-action.lifecycle.test.ts b/extensions/feishu/src/monitor.card-action.lifecycle.test.ts index 660ca417207..0eda8341065 100644 --- a/extensions/feishu/src/monitor.card-action.lifecycle.test.ts +++ b/extensions/feishu/src/monitor.card-action.lifecycle.test.ts @@ -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"); diff --git a/extensions/feishu/src/monitor.reply-once.lifecycle.test.ts b/extensions/feishu/src/monitor.reply-once.lifecycle.test.ts index 3eeca2bcead..67634165a71 100644 --- a/extensions/feishu/src/monitor.reply-once.lifecycle.test.ts +++ b/extensions/feishu/src/monitor.reply-once.lifecycle.test.ts @@ -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"); diff --git a/extensions/matrix/src/matrix/actions/pins.test.ts b/extensions/matrix/src/matrix/actions/pins.test.ts index f719f16f610..64232b9ce9d 100644 --- a/extensions/matrix/src/matrix/actions/pins.test.ts +++ b/extensions/matrix/src/matrix/actions/pins.test.ts @@ -7,7 +7,7 @@ function createPinsClient(seedPinned: string[], knownBodies: Record ({ 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) => { diff --git a/extensions/matrix/src/matrix/monitor/handler.test.ts b/extensions/matrix/src/matrix/monitor/handler.test.ts index c68466f3e5c..23fd4e2430b 100644 --- a/extensions/matrix/src/matrix/monitor/handler.test.ts +++ b/extensions/matrix/src/matrix/monitor/handler.test.ts @@ -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 () => { diff --git a/extensions/matrix/src/matrix/monitor/index.test.ts b/extensions/matrix/src/matrix/monitor/index.test.ts index 6e261468e3e..d4ac4c8153e 100644 --- a/extensions/matrix/src/matrix/monitor/index.test.ts +++ b/extensions/matrix/src/matrix/monitor/index.test.ts @@ -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(); }); diff --git a/extensions/mattermost/src/setup-core.ts b/extensions/mattermost/src/setup-core.ts index 4cdf481b8ec..d5695b130ff 100644 --- a/extensions/mattermost/src/setup-core.ts +++ b/extensions/mattermost/src/setup-core.ts @@ -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)) { diff --git a/extensions/nextcloud-talk/src/setup-core.ts b/extensions/nextcloud-talk/src/setup-core.ts index a0bfe93afb8..d35c63ca346 100644 --- a/extensions/nextcloud-talk/src/setup-core.ts +++ b/extensions/nextcloud-talk/src/setup-core.ts @@ -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)."; diff --git a/extensions/nostr/index.ts b/extensions/nostr/index.ts index eeeec9ca3e4..7d06c621e57 100644 --- a/extensions/nostr/index.ts +++ b/extensions/nostr/index.ts @@ -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< diff --git a/extensions/nostr/src/channel.outbound.test.ts b/extensions/nostr/src/channel.outbound.test.ts index 9c2e31074b8..c4d44591c79 100644 --- a/extensions/nostr/src/channel.outbound.test.ts +++ b/extensions/nostr/src/channel.outbound.test.ts @@ -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", }); diff --git a/extensions/nostr/src/nostr-profile-http.test.ts b/extensions/nostr/src/nostr-profile-http.test.ts index 28105e3d99b..ce7cdb5c41e 100644 --- a/extensions/nostr/src/nostr-profile-http.test.ts +++ b/extensions/nostr/src/nostr-profile-http.test.ts @@ -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);