openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
58 lines • 4.03 kB
TypeScript
import { $ as DispatchReplyWithBufferedBlockDispatcher, Eg as DurableInboundReplyDeliveryParams, L_ as ChannelBotLoopProtectionFacts, N_ as ChannelTurnDroppedHistoryOptions, P_ as ChannelTurnRecordOptions, Qh as ChannelInboundEventRunnerParams, R_ as recordChannelBotPairLoopAndCheckSuppression, Tg as DurableInboundReplyDeliveryOptions, Xk as recordInboundSession, Yh as AssembledInboundReply, __ as hasVisibleChannelTurnDispatch, b_ as recordDroppedChannelTurnHistory, eg as InboundReplyDispatchResult, f as GetReplyOptions, g_ as hasFinalChannelTurnDispatch, i as FinalizedMsgContext, oM as ReplyPayload, og as runChannelInboundEvent, pm as deliverInboundReplyWithMessageSendContext, rg as dispatchChannelInboundReply, sg as runPreparedInboundReply, tg as PreparedInboundReply, v_ as resolveChannelTurnDispatchCounts } from "../config-contracts--zSNHFlu.js";
import { r as OpenClawConfig } from "../types.openclaw-A0y1x1SF.js";
/** Outbound fields accepted from loose producers. */
type OutboundReplyPayload = Pick<ReplyPayload, "text" | "mediaUrls" | "mediaUrl" | "presentation" | "presentationTextMode" | "interactive" | "channelData" | "sensitiveMedia" | "replyToId" | "location" | "videoAsNote">;
type ReplyOptionsWithoutModelSelected = Omit<Omit<GetReplyOptions, "onBlockReply">, "onModelSelected">;
type RecordInboundSessionFn = typeof recordInboundSession;
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<typeof buildInboundReplyDispatchBase>[0];
type RecordInboundSessionAndDispatchReplyParams = {
cfg: OpenClawConfig;
channel: string;
accountId?: string;
agentId: string;
routeSessionKey: string;
storePath: string;
ctxPayload: FinalizedMsgContext;
recordInboundSession: RecordInboundSessionFn;
dispatchReplyWithBufferedBlockDispatcher: DispatchReplyWithBufferedBlockDispatcher;
deliver: (payload: OutboundReplyPayload) => Promise<void>;
durable?: false | DurableInboundReplyDeliveryOptions;
onRecordError: (err: unknown) => void;
onDispatchError: (err: unknown, info: {
kind: string;
}) => void;
replyOptions?: ReplyOptionsWithoutModelSelected;
};
export declare function dispatchInboundReplyWithBase(params: BuildInboundReplyDispatchBaseParams & Pick<RecordInboundSessionAndDispatchReplyParams, "deliver" | "durable" | "onRecordError" | "onDispatchError" | "replyOptions">): Promise<void>;
export { type AssembledInboundReply, type ChannelBotLoopProtectionFacts, type ChannelTurnDroppedHistoryOptions as ChannelInboundDroppedHistoryOptions, type ChannelTurnDroppedHistoryOptions, type ChannelInboundEventRunnerParams, type ChannelTurnRecordOptions, type ChannelTurnRecordOptions as InboundReplyRecordOptions, type DurableInboundReplyDeliveryParams, type InboundReplyDispatchResult, type PreparedInboundReply, deliverInboundReplyWithMessageSendContext, dispatchChannelInboundReply, hasFinalChannelTurnDispatch as hasFinalInboundReplyDispatch, hasVisibleChannelTurnDispatch as hasVisibleInboundReplyDispatch, recordChannelBotPairLoopAndCheckSuppression, recordDroppedChannelTurnHistory as recordDroppedChannelInboundHistory, recordDroppedChannelTurnHistory, resolveChannelTurnDispatchCounts as resolveInboundReplyDispatchCounts, runChannelInboundEvent, runPreparedInboundReply };