diff --git a/src/plugin-sdk/reply-dispatch-runtime.ts b/src/plugin-sdk/reply-dispatch-runtime.ts index 13b25f6a8bc..ea774c92726 100644 --- a/src/plugin-sdk/reply-dispatch-runtime.ts +++ b/src/plugin-sdk/reply-dispatch-runtime.ts @@ -1,7 +1,25 @@ export { resolveChunkMode } from "../auto-reply/chunk.js"; export { finalizeInboundContext } from "../auto-reply/reply/inbound-context.js"; -export { - dispatchReplyWithBufferedBlockDispatcher, - dispatchReplyWithDispatcher, -} from "../auto-reply/reply/provider-dispatcher.js"; +import type { + DispatchReplyWithBufferedBlockDispatcher, + DispatchReplyWithDispatcher, +} from "../auto-reply/reply/provider-dispatcher.types.js"; + +export type { + DispatchReplyWithBufferedBlockDispatcher, + DispatchReplyWithDispatcher, +} from "../auto-reply/reply/provider-dispatcher.types.js"; export type { ReplyPayload } from "./reply-payload.js"; + +export const dispatchReplyWithBufferedBlockDispatcher: DispatchReplyWithBufferedBlockDispatcher = + async (params) => { + const { dispatchReplyWithBufferedBlockDispatcher: dispatch } = + await import("../auto-reply/reply/provider-dispatcher.js"); + return await dispatch(params); + }; + +export const dispatchReplyWithDispatcher: DispatchReplyWithDispatcher = async (params) => { + const { dispatchReplyWithDispatcher: dispatch } = + await import("../auto-reply/reply/provider-dispatcher.js"); + return await dispatch(params); +};