





















@@ -741,6 +741,14 @@ describe("message tool secret scoping", () => {
741741742742it("resolves scoped channel SecretRefs even when constructed with a config snapshot", async () => {
743743mockSendResult({ channel: "discord", to: "channel:123" });
744+const plugin = createChannelPlugin({
745+id: "discord",
746+label: "Discord",
747+docsPath: "/channels/discord",
748+blurb: "test",
749+actions: ["send"],
750+});
751+setActivePluginRegistry(createTestRegistry([{ pluginId: "discord", source: "test", plugin }]));
744752const rawConfig = {
745753channels: {
746754discord: {
@@ -794,6 +802,15 @@ describe("message tool secret scoping", () => {
794802795803describe("message tool delivery mode schema", () => {
796804it("hides bestEffort when required durable delivery is not available", () => {
805+const plugin = createChannelPlugin({
806+id: "discord",
807+label: "Discord",
808+docsPath: "/channels/discord",
809+blurb: "test",
810+actions: ["send"],
811+});
812+setActivePluginRegistry(createTestRegistry([{ pluginId: "discord", source: "test", plugin }]));
813+797814const defaultTool = createMessageTool();
798815const scopedTool = createMessageTool({
799816config: {} as never,
@@ -903,6 +920,14 @@ describe("message tool agent routing", () => {
903920904921it("forwards agentThreadId through createOpenClawTools to the message tool", async () => {
905922mockSendResult({ channel: "slack", to: "channel:C123" });
923+const plugin = createChannelPlugin({
924+id: "slack",
925+label: "Slack",
926+docsPath: "/channels/slack",
927+blurb: "test",
928+actions: ["send"],
929+});
930+setActivePluginRegistry(createTestRegistry([{ pluginId: "slack", source: "test", plugin }]));
906931907932const tool = createOpenClawTools({
908933agentSessionKey: "agent:main:slack:channel:c123:thread:111.222",
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。