mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-23 18:38:10 +00:00
CLI: load plugins for agents command preaction
This commit is contained in:
@@ -80,6 +80,7 @@ describe("registerPreActionHooks", () => {
|
||||
program.command("update").action(async () => {});
|
||||
program.command("channels").action(async () => {});
|
||||
program.command("directory").action(async () => {});
|
||||
program.command("agents").action(async () => {});
|
||||
program.command("configure").action(async () => {});
|
||||
program.command("onboard").action(async () => {});
|
||||
program
|
||||
@@ -145,6 +146,15 @@ describe("registerPreActionHooks", () => {
|
||||
expect(ensurePluginRegistryLoadedMock).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it("loads plugin registry for agents command", async () => {
|
||||
await runCommand({
|
||||
parseArgv: ["agents"],
|
||||
processArgv: ["node", "openclaw", "agents"],
|
||||
});
|
||||
|
||||
expect(ensurePluginRegistryLoadedMock).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it("skips config guard for doctor and completion commands", async () => {
|
||||
await runCommand({
|
||||
parseArgv: ["doctor"],
|
||||
|
||||
@@ -25,6 +25,7 @@ const PLUGIN_REQUIRED_COMMANDS = new Set([
|
||||
"message",
|
||||
"channels",
|
||||
"directory",
|
||||
"agents",
|
||||
"configure",
|
||||
"onboard",
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user