

















@@ -9,10 +9,11 @@ vi.mock("./channel-tools.js", () => {
99 name,
1010description: `${name} stub`,
1111parameters: { type: "object", properties: {} },
12+ownerOnly: true,
1213execute: vi.fn(),
1314});
1415return {
15-listChannelAgentTools: () => [stubTool("whatsapp_login")],
16+listChannelAgentTools: () => [stubTool("plugin_login")],
1617copyChannelAgentToolMeta: passthrough,
1718getChannelAgentToolMeta: () => undefined,
1819};
@@ -22,7 +23,7 @@ describe("owner-only tool gating", () => {
2223it("removes owner-only tools for unauthorized senders", () => {
2324const tools = createOpenClawCodingTools({ senderIsOwner: false });
2425const toolNames = tools.map((tool) => tool.name);
25-expect(toolNames).not.toContain("whatsapp_login");
26+expect(toolNames).not.toContain("plugin_login");
2627expect(toolNames).not.toContain("cron");
2728expect(toolNames).not.toContain("gateway");
2829expect(toolNames).not.toContain("nodes");
@@ -31,7 +32,7 @@ describe("owner-only tool gating", () => {
3132it("keeps owner-only tools for authorized senders", () => {
3233const tools = createOpenClawCodingTools({ senderIsOwner: true });
3334const toolNames = tools.map((tool) => tool.name);
34-expect(toolNames).toContain("whatsapp_login");
35+expect(toolNames).toContain("plugin_login");
3536expect(toolNames).toContain("cron");
3637expect(toolNames).toContain("gateway");
3738expect(toolNames).toContain("nodes");
@@ -46,7 +47,7 @@ describe("owner-only tool gating", () => {
4647it("defaults to removing owner-only tools when owner status is unknown", () => {
4748const tools = createOpenClawCodingTools();
4849const toolNames = tools.map((tool) => tool.name);
49-expect(toolNames).not.toContain("whatsapp_login");
50+expect(toolNames).not.toContain("plugin_login");
5051expect(toolNames).not.toContain("cron");
5152expect(toolNames).not.toContain("gateway");
5253expect(toolNames).not.toContain("nodes");
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。