fix(clawsweeper): reconcile automerge-openclaw-openclaw-90198 with main (1)

This commit is contained in:
clawsweeper
2026-06-07 09:03:41 +00:00
parent fb8a0aeb1f
commit 8711ada0c4
2 changed files with 24 additions and 1 deletions
@@ -342,6 +342,29 @@ describe("outbound channel resolution", () => {
expect(resolveRuntimePluginRegistryMock).not.toHaveBeenCalled();
});
it("resolves runtime outbound adapters that do not send text directly", async () => {
const setupPlugin = { id: "alpha" };
const runtimePlugin = { id: "alpha", outbound: { deliveryMode: "gateway" } };
getLoadedChannelPluginMock.mockReturnValue(setupPlugin);
getChannelPluginMock.mockReturnValue(undefined);
getActivePluginRegistryMock.mockReturnValue({
channels: [{ plugin: runtimePlugin }],
});
getActivePluginChannelRegistryMock.mockReturnValue({
channels: [{ plugin: setupPlugin }],
});
const channelResolution = await importChannelResolution("runtime-outbound-adapter");
expect(
channelResolution.resolveOutboundChannelPlugin({
channel: "alpha",
cfg: { channels: {} } as never,
allowBootstrap: true,
}),
).toBe(runtimePlugin);
expect(resolveRuntimePluginRegistryMock).not.toHaveBeenCalled();
});
it("keeps setup shells visible for read-only channel lookup", async () => {
const setupPlugin = { id: "alpha" };
const runtimePlugin = { id: "alpha", outbound: { sendText: vi.fn() } };
+1 -1
View File
@@ -141,7 +141,7 @@ function resolveSendCapableMessageAdapter(
}
function channelPluginHasRuntimeOutboundSurface(plugin: ChannelPlugin | undefined): boolean {
return Boolean(plugin?.outbound?.sendText ?? resolveSendCapableMessageAdapter(plugin));
return Boolean(plugin?.outbound ?? resolveSendCapableMessageAdapter(plugin));
}
function resolveRuntimeOutboundPlugin(plugin: ChannelPlugin): ChannelPlugin | undefined {