mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-12 13:00:44 +00:00
fix(config): allow plugin conversation access hook policy (#71221)
This commit is contained in:
committed by
Peter Steinberger
parent
ef9ca09b8e
commit
51dd4f288f
@@ -2,6 +2,7 @@ import { beforeEach, describe, expect, it } from "vitest";
|
||||
import { createPluginRecord } from "../plugins/status.test-helpers.js";
|
||||
import {
|
||||
buildPluginDiagnosticsReport,
|
||||
buildPluginInspectReport,
|
||||
buildPluginSnapshotReport,
|
||||
resetPluginsCliTestState,
|
||||
runPluginsCommand,
|
||||
@@ -64,4 +65,40 @@ describe("plugins cli list", () => {
|
||||
expect(buildPluginDiagnosticsReport).toHaveBeenCalledWith();
|
||||
expect(runtimeLogs).toContain("No plugin issues detected.");
|
||||
});
|
||||
|
||||
it("shows conversation-access hook policy in inspect output", async () => {
|
||||
buildPluginInspectReport.mockReturnValue({
|
||||
workspaceDir: "/workspace",
|
||||
plugin: createPluginRecord({ id: "openclaw-mem0", name: "Mem0" }),
|
||||
shape: "hook-only",
|
||||
capabilityMode: "plain",
|
||||
capabilityCount: 1,
|
||||
capabilities: [],
|
||||
typedHooks: [{ name: "agent_end" }],
|
||||
customHooks: [],
|
||||
tools: [],
|
||||
commands: [],
|
||||
cliCommands: [],
|
||||
services: [],
|
||||
gatewayDiscoveryServices: [],
|
||||
gatewayMethods: [],
|
||||
mcpServers: [],
|
||||
lspServers: [],
|
||||
httpRouteCount: 0,
|
||||
bundleCapabilities: [],
|
||||
diagnostics: [],
|
||||
policy: {
|
||||
allowConversationAccess: true,
|
||||
allowedModels: [],
|
||||
hasAllowedModelsConfig: false,
|
||||
},
|
||||
usesLegacyBeforeAgentStart: false,
|
||||
compatibility: [],
|
||||
});
|
||||
|
||||
await runPluginsCommand(["plugins", "inspect", "openclaw-mem0"]);
|
||||
|
||||
expect(runtimeLogs.join("\n")).toContain("Policy");
|
||||
expect(runtimeLogs.join("\n")).toContain("allowConversationAccess: true");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user