import { n as GetReplyOptions, u as ReplyPayload } from "./types-CQee7pkj.js"; import { t as FinalizedMsgContext } from "./templating-Cqqe1hGs.js"; import { i as OpenClawConfig } from "./types.openclaw-CpnoYlBx.js"; import { Gr as DispatchReplyWithBufferedBlockDispatcher, Nr as PreparedChannelTurn, Or as ChannelTurnResult, Pr as RunChannelTurnParams, Zr as DispatchFromConfigResult, ar as hasVisibleChannelTurnDispatch, ir as hasFinalChannelTurnDispatch, jr as DispatchedChannelTurnResult, or as resolveChannelTurnDispatchCounts, sr as DurableInboundReplyDeliveryOptions, wr as AssembledChannelTurn } from "./types-BftTUA7h.js"; import { sn as ReplyDispatcher } from "./hook-types-DgRt3F-m.js"; import { t as recordInboundSession } from "./session-B6WNy1o7.js"; //#region src/infra/outbound/reply-payload-normalize.d.ts /** * Outbound-facing subset of reply payload fields accepted from loose producers. */ type OutboundReplyPayload = { text?: string; mediaUrls?: string[]; mediaUrl?: string; presentation?: ReplyPayload["presentation"]; /** * @deprecated Use presentation. Runtime support remains for legacy producers. */ interactive?: ReplyPayload["interactive"]; channelData?: ReplyPayload["channelData"]; sensitiveMedia?: boolean; replyToId?: string; }; //#endregion //#region src/channels/message/inbound-reply-dispatch.d.ts type ReplyOptionsWithoutModelSelected = Omit, "onModelSelected">; type RecordInboundSessionFn = typeof recordInboundSession; type ReplyDispatchFromConfigOptions = Omit; type ChannelInboundEventRunnerParams = RunChannelTurnParams; type PreparedInboundReply = PreparedChannelTurn; type AssembledInboundReply = AssembledChannelTurn; type InboundReplyDispatchResult = ChannelTurnResult; /** Run an already prepared inbound reply through shared session-record + dispatch ordering. */ type PreparedInboundReplyTurnWithBotLoopProtection = PreparedChannelTurn & { botLoopProtection: NonNullable["botLoopProtection"]>; }; type PreparedInboundReplyTurnWithoutBotLoopProtection = Omit, "botLoopProtection"> & { botLoopProtection?: undefined; }; declare function runPreparedInboundReply(params: PreparedInboundReplyTurnWithBotLoopProtection): Promise>; declare function runPreparedInboundReply(params: PreparedInboundReplyTurnWithoutBotLoopProtection): Promise>; declare function runPreparedInboundReply(params: PreparedChannelTurn): Promise>; /** @deprecated Use `runPreparedInboundReply`. */ declare function runPreparedInboundReplyTurn(params: PreparedInboundReplyTurnWithBotLoopProtection): Promise>; declare function runPreparedInboundReplyTurn(params: PreparedInboundReplyTurnWithoutBotLoopProtection): Promise>; declare function runPreparedInboundReplyTurn(params: PreparedChannelTurn): Promise>; declare function runChannelInboundEvent(params: ChannelInboundEventRunnerParams): Promise>; /** @deprecated Use `runChannelInboundEvent`. */ declare function runInboundReplyTurn(params: ChannelInboundEventRunnerParams): Promise>; declare function dispatchChannelInboundReply(params: AssembledInboundReply): Promise; /** Run `dispatchReplyFromConfig` with a dispatcher that always gets its settled callback. */ declare function dispatchReplyFromConfigWithSettledDispatcher(params: { cfg: OpenClawConfig; ctxPayload: FinalizedMsgContext; dispatcher: ReplyDispatcher; onSettled: () => void | Promise; replyOptions?: ReplyDispatchFromConfigOptions; configOverride?: OpenClawConfig; }): Promise; /** Assemble the common inbound reply dispatch dependencies for a resolved route. */ declare function buildInboundReplyDispatchBase(params: { cfg: OpenClawConfig; channel: string; accountId?: string; route: { agentId: string; sessionKey: string; }; storePath: string; ctxPayload: FinalizedMsgContext; core: { channel: { session: { recordInboundSession: RecordInboundSessionFn; }; reply: { dispatchReplyWithBufferedBlockDispatcher: DispatchReplyWithBufferedBlockDispatcher; }; }; }; }): { cfg: OpenClawConfig; channel: string; accountId: string | undefined; agentId: string; routeSessionKey: string; storePath: string; ctxPayload: FinalizedMsgContext; recordInboundSession: typeof recordInboundSession; dispatchReplyWithBufferedBlockDispatcher: DispatchReplyWithBufferedBlockDispatcher; }; type BuildInboundReplyDispatchBaseParams = Parameters[0]; type RecordChannelMessageReplyDispatchParams = { cfg: OpenClawConfig; channel: string; accountId?: string; agentId: string; routeSessionKey: string; storePath: string; ctxPayload: FinalizedMsgContext; recordInboundSession: RecordInboundSessionFn; dispatchReplyWithBufferedBlockDispatcher: DispatchReplyWithBufferedBlockDispatcher; deliver: (payload: OutboundReplyPayload) => Promise; durable?: false | DurableInboundReplyDeliveryOptions; onRecordError: (err: unknown) => void; onDispatchError: (err: unknown, info: { kind: string; }) => void; replyOptions?: ReplyOptionsWithoutModelSelected; }; /** * Resolve the shared dispatch base and immediately record + dispatch one inbound reply turn. * * @deprecated Compatibility reply-dispatch bridge. New channel plugins should * expose a `message` adapter via `defineChannelMessageAdapter(...)` and route * sends through `deliverInboundReplyWithMessageSendContext(...)` or * `sendDurableMessageBatch(...)`. */ declare function dispatchChannelMessageReplyWithBase(params: BuildInboundReplyDispatchBaseParams & Pick): Promise; /** * Resolve the shared dispatch base and immediately record + dispatch one inbound reply turn. * * @deprecated Legacy inbound reply helper. New channel plugins should expose a * `message` adapter via `defineChannelMessageAdapter(...)` and use * `dispatchChannelMessageReplyWithBase` only for compatibility dispatchers that * have not moved to the message lifecycle yet. */ declare function dispatchInboundReplyWithBase(params: Parameters[0]): Promise; /** * Record the inbound session first, then dispatch the reply using normalized outbound delivery. * * @deprecated Compatibility reply-dispatch bridge. New channel plugins should * expose a `message` adapter via `defineChannelMessageAdapter(...)` and route * sends through `deliverInboundReplyWithMessageSendContext(...)` or * `sendDurableMessageBatch(...)`. */ declare function recordChannelMessageReplyDispatch(params: RecordChannelMessageReplyDispatchParams): Promise; /** * Record the inbound session first, then dispatch the reply using normalized outbound delivery. * * @deprecated Legacy inbound reply helper. New channel plugins should expose a * `message` adapter via `defineChannelMessageAdapter(...)` and use * `recordChannelMessageReplyDispatch` only for compatibility dispatchers that * have not moved to the message lifecycle yet. */ declare function recordInboundSessionAndDispatchReply(params: RecordChannelMessageReplyDispatchParams): Promise; /** @deprecated Compatibility helper for legacy reply dispatch bridges. */ declare const buildChannelMessageReplyDispatchBase: typeof buildInboundReplyDispatchBase; /** @deprecated Compatibility helper for legacy reply dispatch results. */ declare const hasFinalChannelMessageReplyDispatch: typeof hasFinalChannelTurnDispatch; /** @deprecated Compatibility helper for legacy reply dispatch results. */ declare const hasVisibleChannelMessageReplyDispatch: typeof hasVisibleChannelTurnDispatch; /** @deprecated Compatibility helper for legacy reply dispatch results. */ declare const resolveChannelMessageReplyDispatchCounts: typeof resolveChannelTurnDispatchCounts; //#endregion export { runInboundReplyTurn as _, buildChannelMessageReplyDispatchBase as a, dispatchChannelMessageReplyWithBase as c, hasFinalChannelMessageReplyDispatch as d, hasVisibleChannelMessageReplyDispatch as f, runChannelInboundEvent as g, resolveChannelMessageReplyDispatchCounts as h, PreparedInboundReply as i, dispatchInboundReplyWithBase as l, recordInboundSessionAndDispatchReply as m, ChannelInboundEventRunnerParams as n, buildInboundReplyDispatchBase as o, recordChannelMessageReplyDispatch as p, InboundReplyDispatchResult as r, dispatchChannelInboundReply as s, AssembledInboundReply as t, dispatchReplyFromConfigWithSettledDispatcher as u, runPreparedInboundReply as v, runPreparedInboundReplyTurn as y };