

























@@ -1,10 +1,7 @@
11import { beforeEach, describe, expect, it, vi } from "vitest";
22import type { OpenClawConfig } from "../../config/config.js";
33import { handlePluginsCommand } from "./commands-plugins.js";
4-import {
5-buildPluginsCommandParams,
6-type ConfigSnapshotMock,
7-} from "./commands.test-harness.js";
4+import { buildPluginsCommandParams, type ConfigSnapshotMock } from "./commands.test-harness.js";
8596const readConfigFileSnapshotMock = vi.hoisted(() => vi.fn());
107const validateConfigObjectWithPluginsMock = vi.hoisted(() => vi.fn());
@@ -42,10 +39,12 @@ vi.mock("../../config/config.js", () => ({
4239transform: (
4340currentConfig: OpenClawConfig,
4441context: { snapshot: ConfigSnapshotMock; previousHash: string | null; attempt: number },
45-) => Promise<{ nextConfig: OpenClawConfig; result?: unknown }> | {
46-nextConfig: OpenClawConfig;
47-result?: unknown;
48-};
42+) =>
43+| Promise<{ nextConfig: OpenClawConfig; result?: unknown }>
44+| {
45+nextConfig: OpenClawConfig;
46+result?: unknown;
47+};
4948}) => {
5049const snapshot = (await readConfigFileSnapshotMock()) as ConfigSnapshotMock;
5150const previousHash = snapshot.hash ?? null;
@@ -358,7 +357,7 @@ describe("handlePluginsCommand", () => {
358357359358it("returns an explicit unauthorized reply for native /plugins list", async () => {
360359const params = buildPluginsParams("/plugins list", buildCfg());
361-params.command.senderIsOwner = false;
360+params.command.isAuthorizedSender = false;
362361params.ctx.Provider = "telegram";
363362params.ctx.Surface = "telegram";
364363params.ctx.CommandSource = "native";
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。