refactor: consolidate plugin sdk surface

This commit is contained in:
Peter Steinberger
2026-03-20 18:50:25 +00:00
parent 46854a84a4
commit 62ddc9d9e0
294 changed files with 2071 additions and 1268 deletions

View File

@@ -1,7 +1,7 @@
import type { OpenClawConfig } from "openclaw/plugin-sdk/discord";
import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env";
import type { Mock } from "vitest";
import { expect, vi } from "vitest";
import type { OpenClawConfig } from "../../../extensions/discord/src/runtime-api.js";
export type NativeCommandSpecMock = {
name: string;
@@ -319,6 +319,16 @@ vi.mock("openclaw/plugin-sdk/acp-runtime", async () => {
};
});
vi.mock("openclaw/plugin-sdk/command-auth", async () => {
const actual = await vi.importActual<typeof import("openclaw/plugin-sdk/command-auth")>(
"openclaw/plugin-sdk/command-auth",
);
return {
...actual,
listNativeCommandSpecsForConfig: listNativeCommandSpecsForConfigMock,
listSkillCommandsForAgents: listSkillCommandsForAgentsMock,
};
});
vi.mock("openclaw/plugin-sdk/reply-runtime", async () => {
const actual = await vi.importActual<typeof import("openclaw/plugin-sdk/reply-runtime")>(
"openclaw/plugin-sdk/reply-runtime",
@@ -326,8 +336,6 @@ vi.mock("openclaw/plugin-sdk/reply-runtime", async () => {
return {
...actual,
resolveTextChunkLimit: () => 2000,
listNativeCommandSpecsForConfig: listNativeCommandSpecsForConfigMock,
listSkillCommandsForAgents: listSkillCommandsForAgentsMock,
};
});