mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 04:00:31 +00:00
refactor: consolidate plugin sdk surface
This commit is contained in:
@@ -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,
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user