refactor(plugins): decouple bundled plugin runtime loading

This commit is contained in:
Peter Steinberger
2026-03-29 09:08:06 +01:00
parent 1738d540f4
commit 8e0ab35b0e
582 changed files with 8057 additions and 22869 deletions

View File

@@ -1,8 +1,11 @@
import { Command } from "commander";
import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { repoInstallSpec } from "../../../test/helpers/bundled-plugin-paths.js";
import { loggingState } from "../../logging/state.js";
import { setCommandJsonMode } from "./json-mode.js";
const MATRIX_REPO_INSTALL_SPEC = repoInstallSpec("matrix");
const setVerboseMock = vi.fn();
const emitCliBannerMock = vi.fn();
const ensureConfigReadyMock = vi.fn(async () => {});
@@ -286,8 +289,8 @@ describe("registerPreActionHooks", () => {
vi.clearAllMocks();
await runPreAction({
parseArgv: ["plugins", "install", "./extensions/matrix"],
processArgv: ["node", "openclaw", "plugins", "install", "./extensions/matrix"],
parseArgv: ["plugins", "install", MATRIX_REPO_INSTALL_SPEC],
processArgv: ["node", "openclaw", "plugins", "install", MATRIX_REPO_INSTALL_SPEC],
});
expect(ensureConfigReadyMock).toHaveBeenCalledWith({