From ccf54f263a3e76adfa00ae070745183b16abb414 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 28 Mar 2026 05:01:50 +0000 Subject: [PATCH] refactor: route slack interactions through channel runtime --- .../src/monitor/events/interactions.block-actions.ts | 2 +- extensions/slack/src/monitor/events/interactions.modal.ts | 2 +- extensions/slack/src/monitor/events/interactions.test.ts | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/extensions/slack/src/monitor/events/interactions.block-actions.ts b/extensions/slack/src/monitor/events/interactions.block-actions.ts index bf069043b8e..e84371bc9c2 100644 --- a/extensions/slack/src/monitor/events/interactions.block-actions.ts +++ b/extensions/slack/src/monitor/events/interactions.block-actions.ts @@ -1,11 +1,11 @@ import type { SlackActionMiddlewareArgs } from "@slack/bolt"; import type { Block, KnownBlock } from "@slack/web-api"; +import { enqueueSystemEvent } from "openclaw/plugin-sdk/channel-runtime"; import { buildPluginBindingResolvedText, parsePluginBindingApprovalCustomId, resolvePluginConversationBindingApproval, } from "openclaw/plugin-sdk/conversation-runtime"; -import { enqueueSystemEvent } from "openclaw/plugin-sdk/infra-runtime"; import { dispatchPluginInteractiveHandler } from "openclaw/plugin-sdk/plugin-runtime"; import { SLACK_REPLY_BUTTON_ACTION_ID, SLACK_REPLY_SELECT_ACTION_ID } from "../../blocks-render.js"; import { authorizeSlackSystemEventSender } from "../auth.js"; diff --git a/extensions/slack/src/monitor/events/interactions.modal.ts b/extensions/slack/src/monitor/events/interactions.modal.ts index 14f7a0af0cd..20c4166d7d8 100644 --- a/extensions/slack/src/monitor/events/interactions.modal.ts +++ b/extensions/slack/src/monitor/events/interactions.modal.ts @@ -1,4 +1,4 @@ -import { enqueueSystemEvent } from "openclaw/plugin-sdk/infra-runtime"; +import { enqueueSystemEvent } from "openclaw/plugin-sdk/channel-runtime"; import { parseSlackModalPrivateMetadata } from "../../modal-metadata.js"; import { authorizeSlackSystemEventSender } from "../auth.js"; import type { SlackMonitorContext } from "../context.js"; diff --git a/extensions/slack/src/monitor/events/interactions.test.ts b/extensions/slack/src/monitor/events/interactions.test.ts index 45a564699cc..928c44cc53b 100644 --- a/extensions/slack/src/monitor/events/interactions.test.ts +++ b/extensions/slack/src/monitor/events/interactions.test.ts @@ -167,15 +167,15 @@ function createContext(overrides?: { describe("registerSlackInteractionEvents", () => { beforeAll(async () => { vi.resetModules(); - const infraRuntime = await import("openclaw/plugin-sdk/infra-runtime"); + const channelRuntime = await import("openclaw/plugin-sdk/channel-runtime"); const pluginRuntime = await import("openclaw/plugin-sdk/plugin-runtime"); const conversationBinding = await import("../../../../../src/plugins/conversation-binding.js"); enqueueSystemEventSpy = vi - .spyOn(infraRuntime, "enqueueSystemEvent") - .mockImplementation(((...args: Parameters) => + .spyOn(channelRuntime, "enqueueSystemEvent") + .mockImplementation(((...args: Parameters) => (enqueueSystemEventMock as (...innerArgs: unknown[]) => boolean)( ...args, - )) as typeof infraRuntime.enqueueSystemEvent); + )) as typeof channelRuntime.enqueueSystemEvent); dispatchPluginInteractiveHandlerSpy = vi .spyOn(pluginRuntime, "dispatchPluginInteractiveHandler") .mockImplementation(((