diff --git a/extensions/memory-core/src/memory/qmd-manager.test.ts b/extensions/memory-core/src/memory/qmd-manager.test.ts index 06331692d47..3e841bb0259 100644 --- a/extensions/memory-core/src/memory/qmd-manager.test.ts +++ b/extensions/memory-core/src/memory/qmd-manager.test.ts @@ -39,15 +39,16 @@ interface MockChild extends EventEmitter { function createMockChild(params?: { autoClose?: boolean; closeDelayMs?: number }): MockChild { const stdout = new EventEmitter(); const stderr = new EventEmitter(); - const child = new EventEmitter(); - child.stdout = stdout; - child.stderr = stderr; - child.closeWith = (code = 0) => { - child.emit("close", code); - }; - child.kill = () => { - // Let timeout rejection win in tests that simulate hung QMD commands. - }; + const child: MockChild = Object.assign(new EventEmitter(), { + stdout, + stderr, + closeWith: (code: number | null = 0) => { + child.emit("close", code); + }, + kill: () => { + // Let timeout rejection win in tests that simulate hung QMD commands. + }, + }); if (params?.autoClose !== false) { const delayMs = params?.closeDelayMs ?? 0; if (delayMs <= 0) { diff --git a/src/cli/run-main.test.ts b/src/cli/run-main.test.ts index 160d424083f..8b01e9de2d2 100644 --- a/src/cli/run-main.test.ts +++ b/src/cli/run-main.test.ts @@ -1,4 +1,5 @@ import { describe, expect, it } from "vitest"; +import type { PluginManifestRegistry } from "../plugins/manifest-registry.js"; import { rewriteUpdateFlagArgv, resolveMissingPluginCommandMessage, @@ -6,13 +7,23 @@ import { shouldUseRootHelpFastPath, } from "./run-main.js"; -const memoryWikiCommandAliasRegistry = { +const memoryWikiCommandAliasRegistry: PluginManifestRegistry = { plugins: [ { id: "memory-wiki", + channels: [], + providers: [], + cliBackends: [], + skills: [], + hooks: [], + origin: "bundled", + rootDir: "/tmp/memory-wiki", + source: "bundled", + manifestPath: "/tmp/memory-wiki/openclaw.plugin.json", commandAliases: [{ name: "wiki" }], }, ], + diagnostics: [], }; describe("rewriteUpdateFlagArgv", () => { diff --git a/src/cli/update-cli/update-command.ts b/src/cli/update-cli/update-command.ts index 9d4b3640328..c6b334a7f9b 100644 --- a/src/cli/update-cli/update-command.ts +++ b/src/cli/update-cli/update-command.ts @@ -783,9 +783,6 @@ async function runPostCorePluginUpdate(params: { async function continuePostCoreUpdateInFreshProcess(params: { root: string; channel: "stable" | "beta" | "dev"; - root: string; - channel: "stable" | "beta" | "dev"; - opts: UpdateCommandOptions; opts: UpdateCommandOptions; }): Promise { const entryPath = path.join(params.root, "dist", "entry.js"); @@ -1170,7 +1167,6 @@ export async function updateCommand(opts: UpdateCommandOptions): Promise { pluginsUpdatedInFreshProcess = await continuePostCoreUpdateInFreshProcess({ root: postUpdateRoot, channel, - resultMode: result.mode, opts, }); } diff --git a/src/gateway/server-close.test.ts b/src/gateway/server-close.test.ts index 97e6c138a7d..253f6470a68 100644 --- a/src/gateway/server-close.test.ts +++ b/src/gateway/server-close.test.ts @@ -28,10 +28,10 @@ vi.mock("../logging/subsystem.js", () => ({ })); const { createGatewayCloseHandler } = await import("./server-close.js"); +type GatewayCloseHandlerParams = Parameters[0]; +type GatewayCloseClient = GatewayCloseHandlerParams["clients"] extends Set ? T : never; -function createGatewayCloseTestDeps( - overrides: Partial[0]> = {}, -) { +function createGatewayCloseTestDeps(overrides: Partial = {}) { return { bonjourStop: null, tailscaleCleanup: null, @@ -54,8 +54,12 @@ function createGatewayCloseTestDeps( transcriptUnsub: null, lifecycleUnsub: null, chatRunState: { clear: vi.fn() }, - clients: new Set(), + clients: new Set(), configReloader: { stop: vi.fn(async () => undefined) }, + wss: { + clients: new Set(), + close: (cb: () => void) => cb(), + } as never, httpServer: { close: (cb: (err?: Error | null) => void) => cb(null), closeIdleConnections: vi.fn(), @@ -96,7 +100,7 @@ describe("createGatewayCloseHandler", () => { transcriptUnsub: null, lifecycleUnsub, chatRunState: { clear: vi.fn() }, - clients: new Set(), + clients: new Set(), configReloader: { stop: vi.fn(async () => undefined) }, wss: { close: (cb: () => void) => cb() } as never, httpServer: { diff --git a/src/plugins/channel-plugin-ids.ts b/src/plugins/channel-plugin-ids.ts index 0f357ff5881..a549d764060 100644 --- a/src/plugins/channel-plugin-ids.ts +++ b/src/plugins/channel-plugin-ids.ts @@ -276,6 +276,7 @@ export function resolveChannelPluginIds(params: { export function resolveConfiguredChannelPluginIds(params: { config: OpenClawConfig; + activationSourceConfig?: OpenClawConfig; workspaceDir?: string; env: NodeJS.ProcessEnv; }): string[] {